diff options
author | sun6eal <jacob.sun.meta@gmail.com> | 2019-05-11 17:18:50 +0300 |
---|---|---|
committer | sun6eal <jacob.sun.meta@gmail.com> | 2019-05-11 17:18:50 +0300 |
commit | f1a91687c746068901a82db39bae7b2eb2dc2d3e (patch) | |
tree | 25883f66ed0fcc9729a4e952d2fc87029449ba37 | |
parent | 7b99005b9efa3993c0c3007f336fbf84d341c95d (diff) |
update
-rw-r--r-- | README-zh.md | 37 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | static/css/edidor.css | 79 | ||||
-rw-r--r-- | static/js/edidor.js | 7 |
4 files changed, 87 insertions, 43 deletions
diff --git a/README-zh.md b/README-zh.md index e69de29..13f3c39 100644 --- a/README-zh.md +++ b/README-zh.md @@ -0,0 +1,37 @@ +# Edidor +类似编辑器的hugo主题. + +感谢[@GoHugoIO](https://twitter.com/GoHugoIO) 的 [推荐](https://twitter.com/GoHugoIO/status/1127175277673631744) + +# 演示 +[链接](https://ziox.xyz/) + +# 截图 +![screenshot](https://raw.githubusercontent.com/jacobsun/edidor/master/images/screenshot.png) +![screenshot](https://raw.githubusercontent.com/jacobsun/edidor/master/images/tags.png) +![screenshot](https://raw.githubusercontent.com/jacobsun/edidor/master/images/comment.png) + + + +# 安装 +在hugo网站根目录运行: + +``` +cd themes +git clone https://github.com/jacobsun/edidor +``` +或者(推荐这种方式) + +``` +cd themes +git submodule add https://github.com/jacobsun/edidor +``` + +# 使用 +复制 `exampleSite/config.toml` 到网站根目录, 运行`hogo server`预览. + +# 问题 +主题多语言还不完整, 只有几处有. + +# 许可方式 +MIT @@ -1,8 +1,12 @@ # Edidor +[中文](https://github.com/jacobsun/edidor/blob/master/README-zh.md) + A hugo theme that looks like an editor. +Thanks for [@GoHugoIO](https://twitter.com/GoHugoIO)'s [promotion](https://twitter.com/GoHugoIO/status/1127175277673631744) + # Demo -[Live](http://ziox.xyz/) +[Live](https://ziox.xyz/) # Screenshot ![screenshot](https://raw.githubusercontent.com/jacobsun/edidor/master/images/screenshot.png) @@ -29,6 +33,5 @@ git submodule add https://github.com/jacobsun/edidor Copy `config.toml` in `exampleSite` to your site root folder, you are good to go, you can also find more information there. - # License MIT diff --git a/static/css/edidor.css b/static/css/edidor.css index cc53aec..3a98b08 100644 --- a/static/css/edidor.css +++ b/static/css/edidor.css @@ -17,6 +17,10 @@ a { text-decoration: none; } +a:hover { + text-decoration: none !important; +} + button { background-color: none; border : none; @@ -28,6 +32,25 @@ ul { list-style-type: none; } +hr { + margin: 0.24rem 0; + border: 0.005rem groove rgb(153, 204, 255); +} + +pre, +code { + font-size : 0.12rem; + font-family: 'Fira Code', Inconsolata, 'Deja Vu Sans Mono', 'Source Code Pro', Consolas, monospace; + border : 1px solid #101114; + background : #1A1C21; + box-shadow : 0px 1px 3px 2px #30343C; + padding : 0.08rem 0.12rem; +} + +code { + padding: 0.01rem 0.05rem; +} + .clearfix::after { content: ""; display: table; @@ -236,12 +259,6 @@ ul { .wrapper { padding : 0.2rem 0.3rem; - padding : 0.2rem 0.3rem; - position: absolute; - top : 0; - right : 0; - left : 0; - bottom : 0; } .main h1, @@ -294,13 +311,7 @@ ul { margin-left : 0.3rem; } -.main pre { - font-size : 0.12rem; - font-family: 'Fira Code', Inconsolata, 'Deja Vu Sans Mono', 'Source Code Pro', Consolas, monospace; - border : 1px solid #101114; - background : #1A1C21; - box-shadow : 0px 1px 3px 2px #30343C; -} + /* post */ .article { @@ -325,16 +336,18 @@ ul { color: #C6C6C7; } -.article-meta { - margin-bottom: 0.4rem; -} - .article-meta, .item-meta { font-size: 0.12rem; - color : #939BAB; } +.article-meta, +.item-meta, +.footnotes { + color: #939BAB; +} + + .article-meta ul { list-style-type: none; margin : 0; @@ -442,14 +455,17 @@ a.terms-title { margin-bottom: 0.16rem; } -/* */ +blockquote.twitter-tweet { + color: #C6C6C7; +} + @media (max-width: 900px) { .status li:last-child { display: none; } } -@media (max-width: 525px) { +@media (max-width: 650px) { .status li:nth-last-child(2) { display: none; } @@ -459,7 +475,7 @@ a.terms-title { } } -@media (max-width: 420px) { +@media (max-width: 550px) { .status li:nth-last-child(3) { display: none; } @@ -469,26 +485,15 @@ a.terms-title { } } -@media (max-width: 360px) { - .menu>li:first-child { - float : none; - margin: 0 -0.08rem; +@media (max-width: 450px) { + .footer .status, .footer .social { + float: none; } - .sidebar { width: 40%; } -} - -@media (max-width: 320px) { - .status li:nth-last-child(4) { - display: none; - } -} - -@media (max-width: 290px) { - .footer .status { - float: left; + .status li:nth-last-child(2), .status li:nth-last-child(3){ + display: list-item; } } diff --git a/static/js/edidor.js b/static/js/edidor.js index 33b7b43..cb7f73d 100644 --- a/static/js/edidor.js +++ b/static/js/edidor.js @@ -24,9 +24,7 @@ const w = document.documentElement.clientWidth const h = document.documentElement.clientHeight - if (w <= 290) { - middle.style.height = `${h - 120}px` - } else if (w <= 360) { + if (w <= 450) { middle.style.height = `${h - 90}px` } else { middle.style.height = `${h - 60}px` @@ -106,7 +104,8 @@ } function activeToggleMenu () { - document.querySelector('.toggle-sidebar').addEventListener('click', e => { + const toggle = document.querySelector('.toggle-sidebar') + toggle && toggle.addEventListener('click', e => { pane.classList.toggle('hide') }) } |