diff --git a/README.md b/README.md index 4e197a4d0..a11d857f3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ > Nature, Pure | 原质,纯粹

-Version +Version Author Hexo node.js @@ -31,7 +31,7 @@ ## Introduction 介绍 -An elegant, pure & Material Design theme for Hexo. +An elegant, Pure & Material Design Theme for Hexo. 优雅、纯粹、质感的 Hexo 主题。 @@ -71,6 +71,11 @@ cd material git checkout {branch/tags name} ``` +---- + +> ATTENTION! As the theme is developing, the theme config template will changes. To avoid conflict for users who are using `git pull` to upgrade the theme, we save the theme config template as `_config.template.yml`. You should make a copy of it and rename to `_config.yml`, then configure `_config.yml` when using the theme. +> **注意!** 在主题的开发迭代过程中,主题的配置文件模板 可能会改动。为了避免使用 `git pull` 更新主题的用户出现冲突,我们将 主题配置文件模板 命名为 `_config.template.yml`。配置主题时,你应该拷贝一份 `_config.template.yml` 并将其重命名为 `_config.yml`。 + ## Docs 文档 [Material Theme Docs](https://material.viosey.com/docs/) @@ -86,7 +91,7 @@ All kinds of contributions (enhancements, new features, documentation & code imp Before you start your contributing, please read the [Contributing Rules Wiki](https://github.com/viosey/hexo-theme-material/wiki) first. -欢迎各种形式的贡献,包括但不限于优化,添加功能,文档 & 代码的改进,问题和 bugs 的报告。期待您的 `Pull Request`。 +欢迎各种形式的贡献,包括但不限于优化,添加功能,文档 & 代码的改进,问题和 bugs 的报告。期待你的 `Pull Request`。 在参与贡献之前,请阅读[项目贡献 Wiki](https://github.com/viosey/hexo-theme-material/wiki),了解如何为 Material 主题贡献。 @@ -119,16 +124,18 @@ Proudly using BrowserStack. ### jsDelivr -[![](https://data.jsdelivr.com/v1/package/npm/hexo-material/badge)](https://www.jsdelivr.com/package/npm/hexo-material) - Thanks jsDelivr for providing MaterialCDN service. > **jsDelivr** – Open Source CDN. free, fast, and reliable. You can using the files from GitHub or NPM and serve them using jsDelivr. -[` -https://cdn.jsdelivr.net/gh/viosey/hexo-theme-material/source/ -`](https://cdn.jsdelivr.net/gh/viosey/hexo-theme-material/source/) +[![](https://data.jsdelivr.com/v1/package/npm/hexo-material/badge)](https://www.jsdelivr.com/package/npm/hexo-material) + +[`http://cdn.jsdelivr.net/npm/hexo-material/source/`](http://cdn.jsdelivr.net/npm/hexo-material/source/) + +[![](https://data.jsdelivr.com/v1/package/gh/viosey/hexo-theme-material/badge)](https://www.jsdelivr.com/package/gh/viosey/hexo-theme-material) + +[`https://cdn.jsdelivr.net/gh/viosey/hexo-theme-material/source/`](https://cdn.jsdelivr.net/gh/viosey/hexo-theme-material/source/) ## Render 渲染 -![](https://qiniu.viosey.com/img/Materia-overview-tiny.png) +![Materia-overview-tiny.png](https://i.loli.net/2017/09/28/59cccb0b25520.png) diff --git a/_config.template.yml b/_config.template.yml index b1bf9b364..da187f465 100644 --- a/_config.template.yml +++ b/_config.template.yml @@ -221,11 +221,11 @@ sidebar: # Comment Systems # Available value of "use": -# disqus | disqus_click | changyan | livere | gitment | valine -# If you want to use gitment,you should get the client_id and client_secret form https://github.com/settings/applications/new -# If you want to use valine,you should get the app_id and app_key form https://leancloud.cn ,more setting please see https://github.com/xCss/Valine +# disqus | disqus_click | changyan | livere | gitment | gitalk | valine +# If you want to use gitment or gitalk,you should get the client_id and client_secret form https://github.com/settings/applications/new +# If you want to use valine,you should get the app_id and app_key form https://leancloud.cn ,more setting please see https://valine.js.org comment: - use: + use: shortname: # duoshuo or disqus shortname changyan_appid: changyan_conf: @@ -235,8 +235,19 @@ comment: gitment_owner: # git repo's owner gitment_client_id: # github app client id gitment_client_secret : # github app client secret - valine_leancloud_appId: # leancloud application app id - valine_leancloud_appKey: # leancloud application app key + valine_leancloud_appId: # leancloud application app id + valine_leancloud_appKey: # leancloud application app key + valine_notify: false # valine mail notify (true/false) https://github.com/xCss/Valine/wiki + valine_verify: false # valine verify code (true/false) + valine_pageSize: 10 # comment list page size + valine_avatar: identicon # gravatar style https://valine.js.org/#/avatar + valine_lang: zh-cn # i18n + valine_placeholder: Just go go # valine comment input placeholder(like: Please leave your footprints ) + valine_guest_info: nick,mail,link #valine comment header info + gitalk_repo: # git repo of the hexo + gitalk_owner: # git repo's owner + gitalk_client_id: # github app client id + gitalk_client_secret: # github app client secret # Search Systems # Available value: diff --git a/languages/nl_NL.yml b/languages/nl_NL.yml new file mode 100644 index 000000000..58daf6a30 --- /dev/null +++ b/languages/nl_NL.yml @@ -0,0 +1,29 @@ +sidebar: + homepage: "Home" + archive: "Archief" + article_num: "Aantal artikelen" +post: + visitor: "Bezoekers" + views: "Bekeken" + continue: "Lees meer" + older: "Ouder" + newer: "Nieuwer" + qrcode: "Lees dit artikel op andere apparaten" + comments_load_button: "Lees reacties (Zorg dat disq.us, disquscdn.com en disqus.com correct geladen kunnen worden)" + permalink: "Link naar dit artikel: " +share: + article_rss: "Artikel RSS" + comment_rss: "Reactie RSS" + toTwitter: "Deel op Twitter" + toFacebook: "Deel op Facebook" + toLinkedIn: "Deel op LinkedIn" + toTelegram: "Deel via Telegram" + toGplus: "Deel op Google+" + toWeibo: "Deel op Weibo" + toQQ: "Deel via QQ" +title: + category: "Categorieën" + tag: "Label" +misc: + home: "Home" + theme: "Thema" diff --git a/languages/ru.yml b/languages/ru.yml new file mode 100644 index 000000000..e59edaeed --- /dev/null +++ b/languages/ru.yml @@ -0,0 +1,29 @@ +sidebar: + homepage: "Главная страница" + archive: "Архив" + article_num: "Количество статей" +post: + visitor: "Посетители" + views: "Просмотры" + continue: "Читать далее" + older: "Старые" + newer: "Новые" + qrcode: "Читать эту статью на другом устройстве" + comments_load_button: "Читать комментарии (Убедитесь, что disq.us, disquscdn.com и disqus.com могут корректно загрузиться)" + permalink: "Ссылка на эту статью: " +share: + article_rss: "RSS статьи" + comment_rss: "RSS комментариев" + toTwitter: "Поделиться на Twitter" + toFacebook: "Поделиться на Facebook" + toLinkedIn: "Поделиться на LinkedIn" + toTelegram: "Поделиться на Telegram" + toGplus: "Поделиться на Google+" + toWeibo: "Поделиться на Weibo" + toQQ: "Поделиться на QQ" +title: + category: "Категории" + tag: "Тег" +misc: + home: "Главная" + theme: "Тема" diff --git a/layout/_partial/config_font.ejs b/layout/_partial/config_font.ejs index dda51d922..1dcecbadd 100644 --- a/layout/_partial/config_font.ejs +++ b/layout/_partial/config_font.ejs @@ -69,51 +69,13 @@ font-weight: 500; src: local('Roboto MediumItalic'), local('Roboto-MediumItalic'), url('https://cdnjs.cat.net/ajax/libs/mdui/0.2.1/fonts/roboto/Roboto-MediumItalic.woff2') format('woff2'), url('https://cdnjs.cat.net/ajax/libs/mdui/0.2.1/fonts/roboto/Roboto-MediumItalic.woff') format('woff'); } - @font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: local('Material Icons'), - local('MaterialIcons-Regular'), - url(https://cdnjs.cat.net/ajax/libs/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.woff2) format('woff2'), - url(https://cdnjs.cat.net/ajax/libs/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.woff) format('woff'), - url(https://cdnjs.cat.net/ajax/libs/material-design-icons/3.0.1/iconfont/MaterialIcons-Regular.ttf) format('truetype'); - } <% } %> - -<% if(theme.vendors.material_icons) { %> - -<% } else if(theme.fonts.use === "catnet") { %> -<% } else if(theme.vendors.materialcdn) { %> - -<% } else if(theme.fonts.use === "google") { %> - -<% } else if(theme.fonts.use === "ustc") { %> - + + +<% if(theme.vendors.materialcdn) { %> + <%- cssLsload({path:(theme.vendors.materialcdn + '/css/material-icons.css'),key:'material_icons'}) %> <% } else { %> - + <%- cssLsload({path:('css/material-icons.css'),key:'material_icons'}) %> <% } %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 766119c7e..6852f5845 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -3,21 +3,27 @@ + Version: 1.5.2 --> <%- partial('_widget/dnsprefetch') %> + + + + + <% var title = page.title; @@ -46,54 +52,18 @@ <%= config.title %> - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - <% if(theme.head.site_verification.google) { %><% } %> - <% if(theme.head.site_verification.baidu) { %><% } %> + + + + - - <% if(theme.url.rss) { %> - <% if(config.feed.type == "atom"){ %> - - <% } else if(config.feed.type == "rss2") { %> - - <% } else { %> - <% } %> - <% } %> + + + + + + + + + <% if(theme.vendors.materialcdn) { %> <%- cssLsload({path:(theme.vendors.materialcdn + '/css/material.min.css'),key:'material_css'}) %> @@ -151,25 +127,45 @@ <%- jsLsload({path:('js/jquery.min.js'),key:'jq_js'}) %> <% } %> + + + + + + + + + + + + <% if(theme.head.site_verification.google) { %><% } %> + <% if(theme.head.site_verification.baidu) { %><% } %> + + + <% if(theme.url.rss) { %> + <% if(config.feed.type == "atom"){ %> + + <% } else if(config.feed.type == "rss2") { %> + + <% } else { %> + <% } %> + <% } %> + - + - + <% if(page.tags && page.tags.each) { page.tags.each(function(tag){ %> <% })} %> <% if( (is_post()) ) { %> - - + + <% } %> - - - - - + <% if( (page.current === 1) && (is_home()) ) { %> diff --git a/layout/_partial/import_js.ejs b/layout/_partial/import_js.ejs index 90235be01..27c73cb5d 100644 --- a/layout/_partial/import_js.ejs +++ b/layout/_partial/import_js.ejs @@ -158,5 +158,5 @@ lsloader.runInlineScript(item.id,item.id); } })() -console.log('\n %c © Material Theme | Version: 1.5.0 | https://github.com/viosey/hexo-theme-material %c \n', 'color:#455a64;background:#e0e0e0;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;', 'color:#455a64;background:#e0e0e0;padding:5px 0;border-top-right-radius:5px;border-bottom-right-radius:5px;'); +console.log('\n %c © Material Theme | Version: 1.5.2 | https://github.com/viosey/hexo-theme-material %c \n', 'color:#455a64;background:#e0e0e0;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;', 'color:#455a64;background:#e0e0e0;padding:5px 0;border-top-right-radius:5px;border-bottom-right-radius:5px;'); diff --git a/layout/_widget/comment/disqus_click/main.ejs b/layout/_widget/comment/disqus_click/main.ejs index 090c21951..4d9232dd6 100644 --- a/layout/_widget/comment/disqus_click/main.ejs +++ b/layout/_widget/comment/disqus_click/main.ejs @@ -26,12 +26,13 @@ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); color: #fff; background-color: <%= theme.uiux.button_color %>; - text-shadow: 0 + text-shadow: 0; + display: none }

- +
diff --git a/layout/_widget/comment/gitalk/common.ejs b/layout/_widget/comment/gitalk/common.ejs new file mode 100644 index 000000000..c1f700678 --- /dev/null +++ b/layout/_widget/comment/gitalk/common.ejs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layout/_widget/comment/gitalk/enter.ejs b/layout/_widget/comment/gitalk/enter.ejs new file mode 100644 index 000000000..e39b96eef --- /dev/null +++ b/layout/_widget/comment/gitalk/enter.ejs @@ -0,0 +1,10 @@ + +
+ <%- partial('_widget/comment/' + theme.comment.use + '/main') %> +
+ \ No newline at end of file diff --git a/layout/_widget/comment/gitalk/main.ejs b/layout/_widget/comment/gitalk/main.ejs new file mode 100644 index 000000000..ff346681d --- /dev/null +++ b/layout/_widget/comment/gitalk/main.ejs @@ -0,0 +1,19 @@ + +
+ + + + + + \ No newline at end of file diff --git a/layout/_widget/comment/livere/main.ejs b/layout/_widget/comment/livere/main.ejs index 6a966bb00..338e3512b 100644 --- a/layout/_widget/comment/livere/main.ejs +++ b/layout/_widget/comment/livere/main.ejs @@ -1,5 +1,5 @@
- - \ No newline at end of file diff --git a/layout/_widget/comment/valine/enter.ejs b/layout/_widget/comment/valine/enter.ejs index e7301542a..51a398de6 100644 --- a/layout/_widget/comment/valine/enter.ejs +++ b/layout/_widget/comment/valine/enter.ejs @@ -1,2 +1,2 @@ -
+
<%- partial('_widget/comment/' + theme.comment.use + '/main') %> \ No newline at end of file diff --git a/layout/_widget/comment/valine/main.ejs b/layout/_widget/comment/valine/main.ejs index e6fe133fa..a0fbfb53c 100644 --- a/layout/_widget/comment/valine/main.ejs +++ b/layout/_widget/comment/valine/main.ejs @@ -1,11 +1,21 @@ + + \ No newline at end of file diff --git a/layout/_widget/page-gallery.ejs b/layout/_widget/page-gallery.ejs index 9cd068d52..57f5899d1 100644 --- a/layout/_widget/page-gallery.ejs +++ b/layout/_widget/page-gallery.ejs @@ -1,7 +1,7 @@ <% if(theme.vendors.materialcdn) { %> - + <% } else { %> - + <% } %> diff --git a/layout/_widget/page-links.ejs b/layout/_widget/page-links.ejs index b06840302..951a18a92 100644 --- a/layout/_widget/page-links.ejs +++ b/layout/_widget/page-links.ejs @@ -91,7 +91,7 @@ <% for (var i in site.data.links) { %>