From 7fb9ff1decd8a9a377a55f294252480ad75b6b3f Mon Sep 17 00:00:00 2001 From: zhengxiaopeng Date: Sat, 8 Aug 2015 11:38:59 +0800 Subject: [PATCH 1/8] Support article catalogue --- layout/_partial/article.ejs | 6 ++++ source/css/_partial/article.styl | 49 +++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 7c8f3d3..11fff1c 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -22,6 +22,12 @@

<% } %> <% } else { %> + <% if (!index && post.toc){ %> +
+ 文章目录 + <%- toc(post.content) %> +
+<% } %> <%- post.content %> <% } %> diff --git a/source/css/_partial/article.styl b/source/css/_partial/article.styl index 54c2c13..f02de37 100644 --- a/source/css/_partial/article.styl +++ b/source/css/_partial/article.styl @@ -325,4 +325,51 @@ $article-share-link img display: block max-width: 100% - margin: 0 auto \ No newline at end of file + margin: 0 auto + +/* toc */ +.toc-article + background #F9F9F9 + margin 2em 0 0 0.2em + padding 1em + border-radius 0px + .toc-title + font-size 120% + strong + padding 0.3em 1 +ol.toc + width 100% + margin 1em 2em 0 0 +#toc + line-height 1em + font-size 0.8em + float right + .toc + padding 0 + li + list-style-type none + .toc-child + padding-left 0em +#toc.toc-aside + display none + width 13% + position fixed + right 2% + top 320px + overflow hidden + line-height 1.5em + font-size 1em + color color-heading + opacity .6 + transition opacity 1s ease-out + strong + padding 0.3em 0 + color color-font + &:hover + transition opacity .3s ease-out + opacity 1 + a + transition color 1s ease-out + &:hover + color color-theme + transition color .3s ease-out \ No newline at end of file From ffeb7b877070e23c04cb41004cb038fb07d49eb7 Mon Sep 17 00:00:00 2001 From: zhengxiaopeng Date: Sat, 8 Aug 2015 11:47:31 +0800 Subject: [PATCH 2/8] Fix article catalogue I18N --- languages/en.yml | 1 + languages/zh-CN.yml | 1 + layout/_partial/article.ejs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/languages/en.yml b/languages/en.yml index b3cc0ac..5998708 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -18,6 +18,7 @@ widget: article: comments: 'Comments' share: 'Share' + catalogue: 'Catalogue' profile: follow: 'FOLLOW' post: 'post' diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 7bd8d7f..19677ec 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -18,6 +18,7 @@ widget: article: comments: '评论' share: '分享到' + catalogue: '文章目录' profile: follow: '关注我' post: '文章' diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 11fff1c..86873bb 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -24,7 +24,7 @@ <% } else { %> <% if (!index && post.toc){ %>
- 文章目录 + <%= __('article.catalogue') %> <%- toc(post.content) %>
<% } %> From 63754e7b56890e4ed6222408d6bf342e5fb22e44 Mon Sep 17 00:00:00 2001 From: Rain Wang Date: Wed, 12 Aug 2015 22:37:39 +0100 Subject: [PATCH 3/8] Make article nav support i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the “older” and “newer” links in article navigation support i18n Indonesian translated by Google. --- languages/en.yml | 4 +++- languages/id.yml | 2 ++ languages/zh-CN.yml | 4 +++- layout/_partial/post/nav.ejs | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/languages/en.yml b/languages/en.yml index 5998708..e907716 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -8,6 +8,8 @@ index: nav: next: 'Next' prev: 'Prev' + older: 'Older' + newer: 'Newer' widget: recents: 'recents' archives: 'archives' @@ -24,4 +26,4 @@ profile: post: 'post' tag: 'tag' posts: 'posts' - tags: 'tags' \ No newline at end of file + tags: 'tags' diff --git a/languages/id.yml b/languages/id.yml index 6e496c7..ef521b4 100644 --- a/languages/id.yml +++ b/languages/id.yml @@ -8,6 +8,8 @@ index: nav: next: 'Berikutnya' prev: 'Sebelumnya' + older: 'Lebih Tua' + newer: 'Lebih baru' widget: recents: 'terbaru' archives: 'arsip' diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 19677ec..2229c4e 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -8,6 +8,8 @@ index: nav: next: '下一页' prev: '上一页' + older: '下一篇' + newer: '上一篇' widget: recents: '最新文章' archives: '归档' @@ -24,4 +26,4 @@ profile: post: '文章' tag: '标签' posts: '文章' - tags: '标签' \ No newline at end of file + tags: '标签' diff --git a/layout/_partial/post/nav.ejs b/layout/_partial/post/nav.ejs index 0406e5b..acd8a0b 100644 --- a/layout/_partial/post/nav.ejs +++ b/layout/_partial/post/nav.ejs @@ -2,7 +2,7 @@ -<% } %> \ No newline at end of file +<% } %> From f4a553ab4c3ff55be2f703f698b0ecdd024fba30 Mon Sep 17 00:00:00 2001 From: Tokoro Date: Fri, 14 Aug 2015 17:12:12 +0900 Subject: [PATCH 4/8] Created a language file for Japanese --- languages/ja.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 languages/ja.yml diff --git a/languages/ja.yml b/languages/ja.yml new file mode 100644 index 0000000..2bc191b --- /dev/null +++ b/languages/ja.yml @@ -0,0 +1,29 @@ +index: + home: 'ホーム' + search: '検索' + archive: 'アーカイブ' + category: 'カテゴリ' + uncategorized: '未分類' + tag: 'タグ' +nav: + next: '次' + prev: '前' + older: '古い記事' + newer: '新しい記事' +widget: + recents: '最近の記事' + archives: 'アーカイブ' + categories: 'カテゴリ' + links: 'リンク' + tags: 'タグ' + tag_cloud: 'タグクラウド' +article: + comments: 'コメント' + share: '共有' + catalogue: 'カタログ' +profile: + follow: 'フォローする' + post: '投稿' + tag: 'タグ' + posts: '投稿' + tags: 'タグ' From bd70cb57a6d8ad4f9c3c40a201db487f7ccbc1d9 Mon Sep 17 00:00:00 2001 From: Sr WoOoW Date: Wed, 2 Sep 2015 20:30:31 +0200 Subject: [PATCH 5/8] go go go more speed for my hexo blog ! --- _config.yml.example | 1 + languages/es.yml | 30 ++++++++++++++++++++ layout/_partial/after-footer.ejs | 2 +- layout/_partial/google_site_verification.ejs | 4 +++ layout/_partial/head.ejs | 4 +-- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 languages/es.yml create mode 100644 layout/_partial/google_site_verification.ejs diff --git a/_config.yml.example b/_config.yml.example index 386f892..ce8985c 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -41,6 +41,7 @@ links: Hexo: http://hexo.io # Miscellaneous +google_site_verification: google_analytics: favicon: favicon.png twitter: diff --git a/languages/es.yml b/languages/es.yml new file mode 100644 index 0000000..964f169 --- /dev/null +++ b/languages/es.yml @@ -0,0 +1,30 @@ +#By SrWoOoW +index: + home: 'Inicio' + search: 'Buscar' + archive: 'Archivo' + category: 'Categoria' + uncategorized: 'Sin categoría' + tag: 'Etiqueta' +nav: + next: 'Siguiente ' + prev: 'Anterior' + older: 'Más viejo' + newer: 'Más nuevo' +widget: + recents: 'Recientes' + archives: 'Archivos' + categories: 'Categorias' + links: 'Links' + tags: 'Etiquetas' + tag_cloud: 'Nube de etiquetas' +article: + comments: 'Comentarios' + share: 'Compartir' + catalogue: 'Catálogo' +profile: + follow: 'SEGUIR' + post: 'Entrada' + tag: 'Etiqueta' + posts: 'Entradas' + tags: 'Etiquetas' diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 8cafae8..4b8a5ab 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -24,7 +24,7 @@ <% } %> - + <% if (theme.fancybox){ %> <%- css('fancybox/jquery.fancybox') %> diff --git a/layout/_partial/google_site_verification.ejs b/layout/_partial/google_site_verification.ejs new file mode 100644 index 0000000..ef41626 --- /dev/null +++ b/layout/_partial/google_site_verification.ejs @@ -0,0 +1,4 @@ +<% if (theme.google_site_verification){ %> + + +<% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 10f4ce8..c90bcea 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -28,8 +28,8 @@ <% if (theme.favicon){ %> <% } %> - - + + <%- css('css/style') %> <%- css('font-awesome/css/font-awesome.min') %> <%- partial('google-analytics') %> From 9b060f1e819d71b16eb088ea1ee79083e1ef1373 Mon Sep 17 00:00:00 2001 From: Sr WoOoW Date: Thu, 3 Sep 2015 17:01:24 +0200 Subject: [PATCH 6/8] v2 can change the cdn --- _config.yml.example | 3 +++ layout/_partial/after-footer.ejs | 2 +- layout/_partial/cdn_after_footer.ejs | 5 +++++ layout/_partial/cdn_head.ejs | 7 +++++++ layout/_partial/google_site_verification.ejs | 1 - layout/_partial/head.ejs | 4 ++-- 6 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 layout/_partial/cdn_after_footer.ejs create mode 100644 layout/_partial/cdn_head.ejs diff --git a/_config.yml.example b/_config.yml.example index ce8985c..bf18639 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -40,6 +40,9 @@ contacts: links: Hexo: http://hexo.io +# CDN +cdn: useso #If your site loads slowly change it to "google" , because "useso" is slow out of China + # Miscellaneous google_site_verification: google_analytics: diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 4b8a5ab..0ebafce 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -24,7 +24,7 @@ <% } %> - +<%- partial('cdn_after_footer') %> <% if (theme.fancybox){ %> <%- css('fancybox/jquery.fancybox') %> diff --git a/layout/_partial/cdn_after_footer.ejs b/layout/_partial/cdn_after_footer.ejs new file mode 100644 index 0000000..9286bb4 --- /dev/null +++ b/layout/_partial/cdn_after_footer.ejs @@ -0,0 +1,5 @@ +<% if (theme.cdn == "google"){ %> + +<% } else if (theme.cdn == "useso"){ %> + +<% } %> diff --git a/layout/_partial/cdn_head.ejs b/layout/_partial/cdn_head.ejs new file mode 100644 index 0000000..31fc9b6 --- /dev/null +++ b/layout/_partial/cdn_head.ejs @@ -0,0 +1,7 @@ +<% if (theme.cdn == "google"){ %> + + +<% } else if (theme.cdn == "useso"){ %> + + +<% } %> diff --git a/layout/_partial/google_site_verification.ejs b/layout/_partial/google_site_verification.ejs index ef41626..cd0b1bf 100644 --- a/layout/_partial/google_site_verification.ejs +++ b/layout/_partial/google_site_verification.ejs @@ -1,4 +1,3 @@ <% if (theme.google_site_verification){ %> - <% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index c90bcea..3772eea 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -28,11 +28,11 @@ <% if (theme.favicon){ %> <% } %> - - + <%- partial('cdn_head') %> <%- css('css/style') %> <%- css('font-awesome/css/font-awesome.min') %> <%- partial('google-analytics') %> + <%- partial('google_site_verification') %> <% if( theme.customstylesheet ){ %> <%- css('css/'+theme.customstylesheet) %> <% } %> From 375e272e27714961e43e4a9e3824b7a2ca147765 Mon Sep 17 00:00:00 2001 From: NetForHack Date: Wed, 23 Sep 2015 05:50:58 +0300 Subject: [PATCH 7/8] Add Russian language --- languages/ru.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 languages/ru.yml diff --git a/languages/ru.yml b/languages/ru.yml new file mode 100644 index 0000000..4193484 --- /dev/null +++ b/languages/ru.yml @@ -0,0 +1,29 @@ +index: + home: 'Главная' + search: 'Поиск' + archive: 'архив' + category: 'категории' + uncategorized: 'без категории' + tag: 'тэг' +nav: + next: 'Далее' + prev: 'Назад' + older: 'Старые' + newer: 'Новые' +widget: + recents: 'недавние' + archives: 'архивы' + categories: 'категории' + links: 'ссылки' + tags: 'тэги' + tag_cloud: 'облако тэгов' +article: + comments: 'Комментарии' + share: 'Поделиться' + catalogue: 'Каталог' +profile: + follow: 'Подписаться' + post: 'пост' + tag: 'тэг' + posts: 'посты' + tags: 'тэги' From 8dc8e76aa751e96ecbefb1a3e57fe81984564a2f Mon Sep 17 00:00:00 2001 From: Hans Chan Date: Wed, 28 Oct 2015 18:33:40 +0800 Subject: [PATCH 8/8] update readme copy `source/*` --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5eedeb1..0e24723 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ $ git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus 1. Rename `themes\icarus\_config.yml.example` to `themes\icarus\_config.yml`; 2. Copy `themes\icarus\_config.yml.site.example` to your hexo blog's root directory and rename it to `_config.yml`; -3. Then modify `theme` setting in `_config.yml` to `icarus`. +3. Copy `themes\icarus\_source\*` into your hexo blog's directory `source`; +4. Then modify `theme` setting in `_config.yml` to `icarus`. ### Update