Skip to content

Commit

Permalink
reset site to github
Browse files Browse the repository at this point in the history
  • Loading branch information
QiShaoXuan committed Jan 21, 2020
1 parent 872dc15 commit 8dbd7c3
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
title: "CSS Tricks",
description: "some CSS tricks, 一些常用的 CSS 样式, 一点 CSS 技巧",
dest: "./dist",
base: "/css_tricks/",
head: [
["link", { rel: "icon", href: "/images/favicon.png" }],
["meta", { name: "theme-color", content: "#00adb5" }],
Expand Down
3 changes: 2 additions & 1 deletion docs/.vuepress/plugins/comment/initComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default function initComment() {
body.appendChild(script);
script.onload = () => {
const commentConfig = Object.assign(CONFIG.gitalk, {
id: `/css_tricks${location.pathname}`
// id: `/css_tricks${location.pathname}`
id: location.pathname
});
const gitalk = new Gitalk(commentConfig);
gitalk.render("gitalk-container");
Expand Down
90 changes: 90 additions & 0 deletions middle.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>CSS Tricks has been migrated</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}

p {
margin: 0;
color: #333;
text-align: center;
}

body {
display: flex;
justify-content: center;
}

article {
margin-top: 15%;
}

article p {
font-size: 22px;
}

a {
color: #00adb5;
}

section {
margin-top: 30px;
}

section p {
font-size: 18px;
}
</style>
</head>
<body>
<article>
<p>CSS Tricks 已经迁移至<a
href="http://css-tricks.neatbang.com/">这里</a>,如果你已收藏当前网址,请在跳转后更新
</p>
<p>CSS Tricks has been migrated <a
href="http://css-tricks.neatbang.com/">here</a>, please update after the jump if you have a favorite current url
</p>

<section>
<p>
页面会在 <span class="second"></span> 秒后跳转
</p>
<p>
The page will jump after <span
class="second"></span> seconds
</p>
</section>
</article>

</body>
<script>
const secondSpans = document.querySelectorAll('.second')
countdown(5, secondSpans, () => {
window.location.href = 'http://css-tricks.neatbang.com/'
})

function countdown(second, doms, callback) {

doms.forEach((dom) => {
dom.innerText = second
})

if (second == 0) {
return callback && callback()
}

setTimeout(() => {
countdown(second - 1, doms, callback)
}, 1000)
}
</script>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"docs:dev": "npx vuepress dev docs",
"dev": "npm run docs:dev",
"build": "npm run build:readme && vuepress build docs",
"deploy": "gh-pages -d dist -b deploy",
"deploy": "gh-pages -d dist",
"deploy:build": "npm run build && npm run deploy",
"build:readme": "node ./build/buildReadme.js"
},
Expand Down

0 comments on commit 8dbd7c3

Please sign in to comment.