diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d7c961e9..00000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -Thumbs.db -db.json -*.log -node_modules/ -.deploy*/ \ No newline at end of file diff --git a/docs/2021/01/06/auth/index.html b/2021/01/06/auth/index.html similarity index 93% rename from docs/2021/01/06/auth/index.html rename to 2021/01/06/auth/index.html index 8d691ee1..ad61cdd2 100644 --- a/docs/2021/01/06/auth/index.html +++ b/2021/01/06/auth/index.html @@ -58,10 +58,11 @@
-

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

+

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"
@@ -255,7 +259,7 @@

Deploy to remote sites

oneone
-
2021-01-06
+
2022-03-28
diff --git a/CNAME b/CNAME deleted file mode 100644 index 83c583a6..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -easy-git.github.io \ No newline at end of file diff --git a/docs/CommandPanel/index.html b/CommandPanel/index.html similarity index 93% rename from docs/CommandPanel/index.html rename to CommandPanel/index.html index ab7ae933..1f2aa798 100644 --- a/docs/CommandPanel/index.html +++ b/CommandPanel/index.html @@ -58,10 +58,11 @@
diff --git a/docs/archives/index.html b/archives/2021/01/index.html similarity index 90% rename from docs/archives/index.html rename to archives/2021/01/index.html index 90fb65b2..962328c0 100644 --- a/docs/archives/index.html +++ b/archives/2021/01/index.html @@ -58,10 +58,11 @@ diff --git a/docs/favicon.png b/favicon.png similarity index 100% rename from docs/favicon.png rename to favicon.png diff --git a/docs/auth/ssh-generate.html b/git.html similarity index 76% rename from docs/auth/ssh-generate.html rename to git.html index 0953c8f7..8abb4c5d 100644 --- a/docs/auth/ssh-generate.html +++ b/git.html @@ -58,10 +58,11 @@ diff --git a/docs/home/git-install.html b/home/git-install.html similarity index 78% rename from docs/home/git-install.html rename to home/git-install.html index 49a4ec07..3b45befa 100644 --- a/docs/home/git-install.html +++ b/home/git-install.html @@ -58,10 +58,11 @@ diff --git a/docs/home/install.html b/home/install.html similarity index 93% rename from docs/home/install.html rename to home/install.html index 6734d354..efc73f29 100644 --- a/docs/home/install.html +++ b/home/install.html @@ -58,10 +58,11 @@ diff --git a/docs/question/username.html b/question/username.html similarity index 92% rename from docs/question/username.html rename to question/username.html index ab224024..7981b259 100644 --- a/docs/question/username.html +++ b/question/username.html @@ -58,10 +58,11 @@ diff --git a/scaffolds/draft.md b/scaffolds/draft.md deleted file mode 100644 index 498e95ba..00000000 --- a/scaffolds/draft.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: {{ title }} -tags: ---- diff --git a/scaffolds/page.md b/scaffolds/page.md deleted file mode 100644 index f01ba3cd..00000000 --- a/scaffolds/page.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: {{ title }} -date: {{ date }} ---- diff --git a/scaffolds/post.md b/scaffolds/post.md deleted file mode 100644 index 1f9b9a46..00000000 --- a/scaffolds/post.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: {{ title }} -date: {{ date }} -tags: ---- diff --git a/docs/setting/autoRefresh.html b/setting/autoRefresh.html similarity index 94% rename from docs/setting/autoRefresh.html rename to setting/autoRefresh.html index 0d9fba6a..571c5299 100644 --- a/docs/setting/autoRefresh.html +++ b/setting/autoRefresh.html @@ -58,10 +58,11 @@ diff --git a/docs/static/add.gif b/static/add.gif similarity index 100% rename from docs/static/add.gif rename to static/add.gif diff --git a/docs/static/annotate.png b/static/annotate.png similarity index 100% rename from docs/static/annotate.png rename to static/annotate.png diff --git a/docs/static/autoRefresh.png b/static/autoRefresh.png similarity index 100% rename from docs/static/autoRefresh.png rename to static/autoRefresh.png diff --git a/docs/static/blame.png b/static/blame.png similarity index 100% rename from docs/static/blame.png rename to static/blame.png diff --git a/docs/static/branch-create-1.gif b/static/branch-create-1.gif similarity index 100% rename from docs/static/branch-create-1.gif rename to static/branch-create-1.gif diff --git a/docs/static/branch-create-2.gif b/static/branch-create-2.gif similarity index 100% rename from docs/static/branch-create-2.gif rename to static/branch-create-2.gif diff --git a/docs/static/branch-switch.png b/static/branch-switch.png similarity index 100% rename from docs/static/branch-switch.png rename to static/branch-switch.png diff --git a/docs/static/branch-view.png b/static/branch-view.png similarity index 100% rename from docs/static/branch-view.png rename to static/branch-view.png diff --git a/docs/static/cancel_add.png b/static/cancel_add.png similarity index 100% rename from docs/static/cancel_add.png rename to static/cancel_add.png diff --git a/docs/static/cancel_all_add.png b/static/cancel_all_add.png similarity index 100% rename from docs/static/cancel_all_add.png rename to static/cancel_all_add.png diff --git a/docs/static/cancel_change.png b/static/cancel_change.png similarity index 100% rename from docs/static/cancel_change.png rename to static/cancel_change.png diff --git a/docs/static/clone.gif b/static/clone.gif similarity index 100% rename from docs/static/clone.gif rename to static/clone.gif diff --git a/docs/static/clone.jpg b/static/clone.jpg similarity index 100% rename from docs/static/clone.jpg rename to static/clone.jpg diff --git a/static/commandpanel-pull.png b/static/commandpanel-pull.png new file mode 100644 index 00000000..efdf8e9c Binary files /dev/null and b/static/commandpanel-pull.png differ diff --git a/static/commandpanel-push.png b/static/commandpanel-push.png new file mode 100644 index 00000000..ea56c2d4 Binary files /dev/null and b/static/commandpanel-push.png differ diff --git a/docs/static/commandpanel.png b/static/commandpanel.png similarity index 100% rename from docs/static/commandpanel.png rename to static/commandpanel.png diff --git a/docs/static/commit.gif b/static/commit.gif similarity index 100% rename from docs/static/commit.gif rename to static/commit.gif diff --git a/docs/static/create_remote_repos.gif b/static/create_remote_repos.gif similarity index 100% rename from docs/static/create_remote_repos.gif rename to static/create_remote_repos.gif diff --git a/docs/static/for_username.gif b/static/for_username.gif similarity index 100% rename from docs/static/for_username.gif rename to static/for_username.gif diff --git a/static/git1.png b/static/git1.png new file mode 100644 index 00000000..92cbb2b4 Binary files /dev/null and b/static/git1.png differ diff --git a/docs/static/gitee_1.png b/static/gitee_1.png similarity index 100% rename from docs/static/gitee_1.png rename to static/gitee_1.png diff --git a/docs/static/gitee_2.png b/static/gitee_2.png similarity index 100% rename from docs/static/gitee_2.png rename to static/gitee_2.png diff --git a/static/hx_ext.png b/static/hx_ext.png new file mode 100644 index 00000000..5305b0b7 Binary files /dev/null and b/static/hx_ext.png differ diff --git a/docs/static/init.png b/static/init.png similarity index 100% rename from docs/static/init.png rename to static/init.png diff --git a/docs/static/intro.gif b/static/intro.gif similarity index 100% rename from docs/static/intro.gif rename to static/intro.gif diff --git a/docs/static/log-details.png b/static/log-details.png similarity index 100% rename from docs/static/log-details.png rename to static/log-details.png diff --git a/docs/static/log-search.png b/static/log-search.png similarity index 100% rename from docs/static/log-search.png rename to static/log-search.png diff --git a/docs/static/log.png b/static/log.png similarity index 100% rename from docs/static/log.png rename to static/log.png diff --git a/docs/static/oauth-gitee.png b/static/oauth-gitee.png similarity index 100% rename from docs/static/oauth-gitee.png rename to static/oauth-gitee.png diff --git a/docs/static/oauth.min.png b/static/oauth.min.png similarity index 100% rename from docs/static/oauth.min.png rename to static/oauth.min.png diff --git a/docs/static/pay.png b/static/pay.png similarity index 100% rename from docs/static/pay.png rename to static/pay.png diff --git a/docs/static/quote.png b/static/quote.png similarity index 100% rename from docs/static/quote.png rename to static/quote.png diff --git a/docs/static/quote_chinese.png b/static/quote_chinese.png similarity index 100% rename from docs/static/quote_chinese.png rename to static/quote_chinese.png diff --git a/docs/static/relevancy.png b/static/relevancy.png similarity index 100% rename from docs/static/relevancy.png rename to static/relevancy.png diff --git a/docs/static/repo_github_search.gif b/static/repo_github_search.gif similarity index 100% rename from docs/static/repo_github_search.gif rename to static/repo_github_search.gif diff --git a/docs/static/repo_init_set.jpg b/static/repo_init_set.jpg similarity index 100% rename from docs/static/repo_init_set.jpg rename to static/repo_init_set.jpg diff --git a/docs/static/setting.png b/static/setting.png similarity index 100% rename from docs/static/setting.png rename to static/setting.png diff --git a/docs/static/sourceCodeView.png b/static/sourceCodeView.png similarity index 100% rename from docs/static/sourceCodeView.png rename to static/sourceCodeView.png diff --git a/static/ssh-keygen.png b/static/ssh-keygen.png new file mode 100644 index 00000000..a8ece3b3 Binary files /dev/null and b/static/ssh-keygen.png differ diff --git a/docs/static/stash.png b/static/stash.png similarity index 100% rename from docs/static/stash.png rename to static/stash.png diff --git a/docs/static/stash_pop.png b/static/stash_pop.png similarity index 100% rename from docs/static/stash_pop.png rename to static/stash_pop.png diff --git a/docs/static/stash_show.gif b/static/stash_show.gif similarity index 100% rename from docs/static/stash_show.gif rename to static/stash_show.gif diff --git a/docs/static/tag_create_01.png b/static/tag_create_01.png similarity index 100% rename from docs/static/tag_create_01.png rename to static/tag_create_01.png diff --git a/docs/static/tag_create_02.png b/static/tag_create_02.png similarity index 100% rename from docs/static/tag_create_02.png rename to static/tag_create_02.png diff --git a/docs/static/voice.png b/static/voice.png similarity index 100% rename from docs/static/voice.png rename to static/voice.png diff --git a/docs/static/wincred.png b/static/wincred.png similarity index 100% rename from docs/static/wincred.png rename to static/wincred.png diff --git a/themes/.gitkeep b/themes/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/themes/book/LICENSE b/themes/book/LICENSE deleted file mode 100644 index d663ebe8..00000000 --- a/themes/book/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 kaiiiz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/themes/book/README.md b/themes/book/README.md deleted file mode 100644 index a073bd0d..00000000 --- a/themes/book/README.md +++ /dev/null @@ -1,89 +0,0 @@ -

- -
A simple, elegant, book-like hexo theme with some useful features. -
-

- -![book-preview](https://kaiiiz.github.io/hexo-theme-book-demo/images/header.png) - -## ⚠ Notice - -Since I have already migrated my note from hexo to [hugo](https://gohugo.io/), the development progress may be slow down in the future. If you want to add more features to this theme, fill free to fork and modify it by yourself. Though I will not put a lot efforts in this project, any suggestions are still welcome. - -However, I suggest that you should try hugo first before using hexo (if you never used both). Hugo is writen by go-lang, and it is faster, powerful and lighter than hexo in my opinion. After doing some research, I realized that hugo can meet all of my requirements and also provide a more logical way to customize a theme at the same time which is amazing, you guys should give it a try! - -## 💿 Installation - -``` -git clone https://github.com/kaiiiz/hexo-theme-book.git themes/book -``` - -If you don't have scss renderer, follow this: - -``` -npm install hexo-renderer-scss --save -``` - -Modify `theme` entry in `_config.yml` - -``` -theme: book -``` - -### Change markdown renderer - -For better render quality, I suggest that you should change the default renderer. - -The detail, see [change markdown renderer](https://github.com/kaiiiz/hexo-theme-book/wiki/Change-markdown-renderer) - -## 🎈 Update - -Jump into the theme folder, run `git pull`. If you use `/source/_data/book.yml`, please note the diffrence of updated `_config.yml`. - -### Smooth Update - -For smoothly updating, I recommand to create a config file named `book.yml` in `/source/_data` folder (If it doesn't exist, create one) - -> **Notice: source folder is under your hexo working directory, not the theme one!** - -Copy the contents of `/themes/book/_config.yml` to `/source/_data/book.yml`, it will replace the contents of config in `/themes/book/_config.yml`. Now you can configure it independently and also, you can update theme more smoothly. - -## ⚒ Configurations - -The detail of config, see [Configurations](https://github.com/kaiiiz/hexo-theme-book/wiki/Configuration) - -## 🎁 Features - -**External Library Integration:** - -Comments system: - -* [utterances](https://github.com/utterance/utterances) -* [disqus](https://disqus.com/) -* [gitalk](https://github.com/gitalk/gitalk) - -Others: - -* [zooming](https://github.com/kingdido999/zooming) -* [google analytics](https://analytics.google.com/) - -**Code Syntax Highlight:** - -Using the built-in systax highlight system ([highlight.js](https://highlightjs.org/)) supported from hexo itself, so no other configuration is needed. - -However, there are multiple themes integrated from [tomorrow-theme](https://github.com/chriskempson/tomorrow-theme). You can change the theme in `_config.yml`. - -| Normal | Night | Night Eighties | Night Blue | Night Bright -| --- | --- | --- | --- | --- | -| ![](https://github.com/ChrisKempson/Tomorrow-Theme/raw/master/Images/Tomorrow.png) | ![](https://github.com/ChrisKempson/Tomorrow-Theme/raw/master/Images/Tomorrow-Night.png) | ![](https://raw.githubusercontent.com/ChrisKempson/Tomorrow-Theme/master/Images/Tomorrow-Night-Eighties.png) | ![](https://raw.githubusercontent.com/ChrisKempson/Tomorrow-Theme/master/Images/Tomorrow-Night-Blue.png) | ![](https://raw.githubusercontent.com/ChrisKempson/Tomorrow-Theme/master/Images/Tomorrow-Night-Bright.png) - -**Powerful and Fully-Customized Sidebar Menu:** - -Checkout [Menu Realtime Demo](https://kaiiiz.github.io/hexo-theme-book-demo/demo/menu-realtime/) - -**Responsive Layout:** - -Book will adapt to different viewpoints in order to give you the best reading experience. - -![](https://kaiiiz.github.io/hexo-theme-book-demo/images/responsive.png) - diff --git a/themes/book/_config.yml b/themes/book/_config.yml deleted file mode 100644 index 809dafb3..00000000 --- a/themes/book/_config.yml +++ /dev/null @@ -1,35 +0,0 @@ -home_page: home.md # filepath under /source/ -menu_page: menu.md # filepath under /source/ -author_img: # filepath of author image -favicon_url: favicon.png # filepath of favicon - -zoom_image: true -codeblock: - # Code Highlight theme - # Available values: normal | night | night eighties | night blue | night bright | solarized | solarized dark | galactic - highlight_theme: normal - -comments: - utterances: - enable: false - user: # your github user name - repo: # your github repo name - theme: 'github-light' # github-light | github-dark | github-dark-orange | icy-dark | dark-blue | photon-dark - disqus: - enable: false - shortname: # your disqus shortname - gitalk: - enable: false - githubID: # your github id - repo: # GitHub repository e.g. kaiiiz.github.io - ClientID: # GitHub Application Client ID - ClientSecret: # GitHub Application Client Secret - adminUser: # GitHub repository owner and collaborators - labels: 'gitalk' # GitHub issue labels - distractionFreeMode: true - -google_analytics: # UA-XXXXX-Y - -menu: - home: / - connecting: /connecting \ No newline at end of file diff --git a/themes/book/layout/_components/brand.ejs b/themes/book/layout/_components/brand.ejs deleted file mode 100644 index 1ab5aa78..00000000 --- a/themes/book/layout/_components/brand.ejs +++ /dev/null @@ -1,6 +0,0 @@ -
- - - <%= config.title.toUpperCase() %> - -
\ No newline at end of file diff --git a/themes/book/layout/_components/menu.ejs b/themes/book/layout/_components/menu.ejs deleted file mode 100644 index 84051db5..00000000 --- a/themes/book/layout/_components/menu.ejs +++ /dev/null @@ -1,5 +0,0 @@ - - -<%- js('js/book-menu') %> \ No newline at end of file diff --git a/themes/book/layout/_components/post-meta.ejs b/themes/book/layout/_components/post-meta.ejs deleted file mode 100644 index a23d1ed2..00000000 --- a/themes/book/layout/_components/post-meta.ejs +++ /dev/null @@ -1,54 +0,0 @@ -
- -
- - -
- <% if (page.author_img) { %> -
- ... -
- <% } else if (theme.author_img) { %> -
- ... -
- <% } else { %> -
-
- <% } %> -
- - -
-
<%= page.author ? page.author : config.author %>
-
<%= page.date ? page.date.format(config.date_format) : "" %>
-
-
- - <% if ( (page.categories && page.categories.length) || (page.tags && page.tags.length) ) { %> -
- - - - <% } %> - -
-
\ No newline at end of file diff --git a/themes/book/layout/_components/sidebar-toggle.ejs b/themes/book/layout/_components/sidebar-toggle.ejs deleted file mode 100644 index 86f02d9b..00000000 --- a/themes/book/layout/_components/sidebar-toggle.ejs +++ /dev/null @@ -1,31 +0,0 @@ - - - \ No newline at end of file diff --git a/themes/book/layout/_components/toc.ejs b/themes/book/layout/_components/toc.ejs deleted file mode 100644 index d43bfd64..00000000 --- a/themes/book/layout/_components/toc.ejs +++ /dev/null @@ -1,9 +0,0 @@ -
-
-
- Expand all - Back to top - Go to bottom -
- -<%- js('js/book-toc') %> \ No newline at end of file diff --git a/themes/book/layout/_lib/comments.ejs b/themes/book/layout/_lib/comments.ejs deleted file mode 100644 index ba7328cf..00000000 --- a/themes/book/layout/_lib/comments.ejs +++ /dev/null @@ -1,40 +0,0 @@ -<% if(theme.comments.utterances.enable) { %> - -<% } %> - -<% if(theme.comments.disqus.enable) { %> -
- - -<% } %> - -<% if(theme.comments.gitalk.enable) { %> - - -
- -<% } %> \ No newline at end of file diff --git a/themes/book/layout/_lib/google-analytics.ejs b/themes/book/layout/_lib/google-analytics.ejs deleted file mode 100644 index 13221253..00000000 --- a/themes/book/layout/_lib/google-analytics.ejs +++ /dev/null @@ -1,13 +0,0 @@ -<% if (theme.google_analytics){ %> - - - -<% } %> \ No newline at end of file diff --git a/themes/book/layout/_lib/zooming-image.ejs b/themes/book/layout/_lib/zooming-image.ejs deleted file mode 100644 index 296e5fdc..00000000 --- a/themes/book/layout/_lib/zooming-image.ejs +++ /dev/null @@ -1,9 +0,0 @@ -<% if (theme.zoom_image && (page.zoom_image === undefined || page.zoom_image)){ %> - - -<% } %> \ No newline at end of file diff --git a/themes/book/layout/_partials/head.ejs b/themes/book/layout/_partials/head.ejs deleted file mode 100644 index 40531f59..00000000 --- a/themes/book/layout/_partials/head.ejs +++ /dev/null @@ -1,35 +0,0 @@ - - - - - <% if (theme.favicon_url) { %> - - <% } %> - - - <% if (page.title) { %> - <%= page.title + ' - ' + config.title %> - <% } else{%> - <%= config.title %> - <% } %> - - - - - - - - - <%- css('css/book') %> - <%- js('js/book') %> - - - - - - - - - <%- partial('_lib/google-analytics') %> - <%- partial('_lib/zooming-image') %> - \ No newline at end of file diff --git a/themes/book/layout/_partials/navbar.ejs b/themes/book/layout/_partials/navbar.ejs deleted file mode 100644 index 7c772171..00000000 --- a/themes/book/layout/_partials/navbar.ejs +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/themes/book/layout/_partials/post-info.ejs b/themes/book/layout/_partials/post-info.ejs deleted file mode 100644 index 28a3d711..00000000 --- a/themes/book/layout/_partials/post-info.ejs +++ /dev/null @@ -1,7 +0,0 @@ -
- <% if (page.post_meta === undefined || page.post_meta) { %> - <%- partial('_components/post-meta') %> - <% } %> - - <%- partial('_components/toc') %> -
\ No newline at end of file diff --git a/themes/book/layout/archive.ejs b/themes/book/layout/archive.ejs deleted file mode 100644 index 1cf7c004..00000000 --- a/themes/book/layout/archive.ejs +++ /dev/null @@ -1,58 +0,0 @@ -
- - <% if(is_archive()){ %> -

Archives

- <% } else if(is_category()) { %> -

Category - <%= page.category %>

- <% } else if(is_tag()) { %> -

Tag - <%= page.tag %>

- <% } %> - - <% if(is_current('archives')) { %> - - <% - var years = {}; - site.posts.sort('date').reverse().forEach(function(post){ - var year = post.date.year() - if(years[year]===undefined){ - years[year] = []; - } - years[year].push(post); - }); - %> - <% } else { %> - - <% - var years = {}; - page.posts.sort('date').reverse().forEach(function(post){ - var year = post.date.year() - if(years[year]===undefined){ - years[year] = []; - } - years[year].push(post); - }); - %> - <% } %> - - <% Object.keys(years).reverse().forEach(function(year){ %> -
-

<%= year %>

- -
- <% }) %> - - <% if(!is_current('archives') && page.total > 1) {%> - - <% } %> -
\ No newline at end of file diff --git a/themes/book/layout/categories.ejs b/themes/book/layout/categories.ejs deleted file mode 100644 index 3dcb0d31..00000000 --- a/themes/book/layout/categories.ejs +++ /dev/null @@ -1,9 +0,0 @@ -<% const categoriesList = list_categories({ show_count: false }); %> -
-

Categories

- <% if (categoriesList !== "") { %> - <%-categoriesList%> - <% } else { %> -

None.

- <% } %> -
\ No newline at end of file diff --git a/themes/book/layout/index.ejs b/themes/book/layout/index.ejs deleted file mode 100644 index 237fb622..00000000 --- a/themes/book/layout/index.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('post') %> \ No newline at end of file diff --git a/themes/book/layout/layout.ejs b/themes/book/layout/layout.ejs deleted file mode 100644 index 9ab641c3..00000000 --- a/themes/book/layout/layout.ejs +++ /dev/null @@ -1,38 +0,0 @@ - - - -<%- partial('_partials/head') %> - - - -
-
- <%- partial('_components/brand') %> - <%- partial('_components/menu') %> -
- - <%- partial('_components/sidebar-toggle') %> - -
-
-
-
- <%- partial('_partials/navbar') %> -
-
- <%- body %> -
-
-
- <%- partial('_partials/post-info') %> -
-
-
- - -
- - - - -<%- js('js/book') %> \ No newline at end of file diff --git a/themes/book/layout/page.ejs b/themes/book/layout/page.ejs deleted file mode 100644 index 31770ae8..00000000 --- a/themes/book/layout/page.ejs +++ /dev/null @@ -1,9 +0,0 @@ - -
-

<%=page.title%>

- <%-page.content%> -
- -
- <%-paginator()%> -
diff --git a/themes/book/layout/post.ejs b/themes/book/layout/post.ejs deleted file mode 100644 index dc7ccd07..00000000 --- a/themes/book/layout/post.ejs +++ /dev/null @@ -1,11 +0,0 @@ -
- <%- page.content %> -
- -<% if(page.comments === undefined || page.comments) { %> -
- <%- partial('_lib/comments') %> -
-<% } %> - -<%- js('js/book-post') %> \ No newline at end of file diff --git a/themes/book/layout/tags.ejs b/themes/book/layout/tags.ejs deleted file mode 100644 index 847ce845..00000000 --- a/themes/book/layout/tags.ejs +++ /dev/null @@ -1,9 +0,0 @@ -<% const tagsList = list_tags({ show_count: false }); %> -
-

Tags

- <% if (tagsList !== "") { %> - <%-tagsList%> - <% } else { %> -

None.

- <% } %> -
\ No newline at end of file diff --git a/themes/book/scripts/merge-configs.js b/themes/book/scripts/merge-configs.js deleted file mode 100644 index ca1e8048..00000000 --- a/themes/book/scripts/merge-configs.js +++ /dev/null @@ -1,10 +0,0 @@ -/* global hexo */ - -'use strict'; - -hexo.on('generateBefore', function () { - if (hexo.locals.get) { - var data = hexo.locals.get('data') - data && data.book && (hexo.theme.config = data.book) - } -}) \ No newline at end of file diff --git a/themes/book/scripts/render.js b/themes/book/scripts/render.js deleted file mode 100644 index 5a440d70..00000000 --- a/themes/book/scripts/render.js +++ /dev/null @@ -1,62 +0,0 @@ -/* global hexo */ - -'use strict'; - -var ejs = require('ejs'); - -var menu_file, home_file; - -// before_post_render - -hexo.extend.filter.register('before_post_render', function (data) { - // preprocess markdown file -}) - -// after_post_render - -hexo.extend.filter.register('after_post_render', function (data) { - // checkbox in list - let checkbox_pattern = /
  • ([\s]*)| checked="true">| checked>)/g; - let checkbox_replacement = "
  • $1 *:first-child { - margin-top: 0 !important; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-weight: bold; - margin-bottom: $line-margin; - margin-top: $line-margin * 1.7; - } - - h1, - h2 { - padding-bottom: 0.4rem; - border-bottom: 1px solid $border-color - } - - h1 { - font-size: $font-size-largest; - } - - h2 { - font-size: $font-size-large; - margin-top: 2rem !important; - } - - h3 { - font-size: $font-size-medium; - } - - h4 { - font-size: $font-size-small; - } - - h5 { - font-size: $font-size-smaller; - } - - h6 { - font-size: $font-size-smallest; - color: grey; - } - - p { - margin-bottom: $line-margin; - } - - hr { - border: 1px solid $border-color; - background-color: $border-color; - margin: $line-margin 0; - } - - .table-wrapper { - max-width: 100%; - margin: 1.25rem 0; - overflow: auto; - - table { - width: 100%; - border-spacing: 0px; - border-collapse: collapse; - - th, - td { - padding: 0.7rem; - border: 1px solid $border-color; - text-align: left; - } - } - } - - ul, - ol { - list-style-position: outside; - margin: 0 0 $line-margin 1.4rem; - - ol { - margin-top: 0; - margin-bottom: 0; - } - - ul { - margin-top: 0; - margin-bottom: 0; - } - - p { - margin: 0; - } - } - - blockquote { - margin: 1.125rem 0 1.125rem 0; - padding: 0.2rem 1rem; - - p { - margin-bottom: 0.5rem; - } - - p:last-child { - margin-bottom: 0; - } - - ul:last-child { - margin-bottom: 0; - } - - &.right { - border-left: none; - border-right: .1rem solid #dadee4; - } - } - - @mixin md-container($border-color, $background-color) { - margin: 1.125rem 1.125rem 1.125rem 0; - padding: 0.2rem 1rem; - background-color: $background-color; - border-left: .1rem solid $border-color; - - p { - margin-bottom: 0.5rem; - } - - p:last-child { - margin-bottom: 0; - } - - ul:last-child { - margin-bottom: 0; - } - } - - .note { - @include md-container(#6ab0de, #e7f2fa) - } - - .tip { - @include md-container(#1abc9c, #dbfaf4) - } - - .attention { - @include md-container(#f0b37e, #ffedcc) - } - - .video-container { - position: relative; - margin-bottom: 1.5rem; - padding-bottom: 56.25%; - height: 0; - overflow: hidden; - - iframe { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - } - } - - figcaption { - text-align: center; - font-size: $font-size-smaller; - margin: 0.5rem 0; - } - - img { - display: block; - margin-left: auto; - margin-right: auto; - } - - iframe { - width: 100%; - } - - .checkbox-item { - list-style-type: none; - - input { - margin-left: -1rem; - margin-right: 0.4rem; - } - } -} diff --git a/themes/book/source/css/_components/sidebar-toggle.scss b/themes/book/source/css/_components/sidebar-toggle.scss deleted file mode 100644 index fb9b84fb..00000000 --- a/themes/book/source/css/_components/sidebar-toggle.scss +++ /dev/null @@ -1,34 +0,0 @@ -.sidebar-toggle { - position: fixed; - bottom: 0.6rem; - left: $sidebar-width + 0.7rem; - transition: left 200ms; - - display: flex; - justify-content: center; - align-items: center; - border: 1px solid #686868; - border-radius: 50%; - width: 9px; - height: 9px; - - &.extend { - left: 0.7rem; - } - - @media all and (max-width: $pc-media) { - display: none; - } - - > .sidebar-toggle-inner { - width: 4px; - height: 4px; - border-radius: 50%; - background-color: #686868; - display: none; - - &.show { - display: block; - } - } -} \ No newline at end of file diff --git a/themes/book/source/css/_components/toc.scss b/themes/book/source/css/_components/toc.scss deleted file mode 100644 index c47613ae..00000000 --- a/themes/book/source/css/_components/toc.scss +++ /dev/null @@ -1,40 +0,0 @@ -.book-tocbot { - // max-height: onload initialized - overflow: auto; - position: relative; - padding-right: 0.875rem; - transition: max-height 0.15s ease-in-out; - - ul { - list-style: none; - position: inherit; - overflow: hidden; - - li { - margin-left: 0.25rem; - } - } - - .toc-link::before { - background-color: white !important; - } - - .is-active-link::before { - background-color: $book-primary-color !important; - } -} - -.book-tocbot-menu { - margin: 1rem 0.75rem; - - a { - display: block; - margin: 0.375rem 0; - color: #999; - cursor: pointer; - } - - a:hover { - color: gray; - } -} diff --git a/themes/book/source/css/_partials/book-archive.scss b/themes/book/source/css/_partials/book-archive.scss deleted file mode 100644 index 20b3f7c2..00000000 --- a/themes/book/source/css/_partials/book-archive.scss +++ /dev/null @@ -1,29 +0,0 @@ -.book-archive { - h1, - h2 { - margin: 0; - } - - h1 { - font-size: $font-size-max; - font-weight: bold; - padding-bottom: 0.5rem; - margin-bottom: 1rem; - } - - h2 { - font-size: $font-size-medium; - padding-bottom: 0.75rem; - margin-bottom: 0.75rem; - border-bottom: 1px solid $border-color; - } - - .years { - padding-bottom: 1.25rem; - } - - .archive-list-item { - list-style: none; - margin: 0; - } -} diff --git a/themes/book/source/css/_partials/book-content.scss b/themes/book/source/css/_partials/book-content.scss deleted file mode 100644 index 66431b34..00000000 --- a/themes/book/source/css/_partials/book-content.scss +++ /dev/null @@ -1,27 +0,0 @@ -.book-content { - padding: 0 $post-horizontal-pd-lg; - - @media all and (max-width: $pc-media) { - padding: 0 1.25rem; - } - - @import "../_components/post"; - @import "../_components/comments"; - @import "../_components/highlight/highlight"; -} - -.book-post-info { - position: fixed; - font-size: $font-size-smaller; - - @media all and (min-width: $pc-media) { - max-width: $post-info-max-width-xl; - } - - @media all and (min-width: $pad-media) and (max-width: $pcs-media) { - max-width: $post-info-max-width-lg; - } - - @import "../_components/post-meta"; - @import "../_components/toc"; -} diff --git a/themes/book/source/css/_partials/book-navbar.scss b/themes/book/source/css/_partials/book-navbar.scss deleted file mode 100644 index 3b259a9d..00000000 --- a/themes/book/source/css/_partials/book-navbar.scss +++ /dev/null @@ -1,23 +0,0 @@ -.book-navbar { - padding-top: 0; - padding-right: $post-horizontal-pd-lg; - padding-bottom: 1.5rem; - padding-left: $post-horizontal-pd-lg; - - i { - color: $book-primary-link-color; - } - - @media all and (min-width: $pc-media) { - display: none; - } - - @media all and (max-width: $pcs-media) { - display: block; - } - - @media all and (max-width: $pc-media) { - padding-right: $post-horizontal-pd-md; - padding-left: $post-horizontal-pd-md; - } -} diff --git a/themes/book/source/css/_partials/book-sidebar.scss b/themes/book/source/css/_partials/book-sidebar.scss deleted file mode 100644 index 496d9784..00000000 --- a/themes/book/source/css/_partials/book-sidebar.scss +++ /dev/null @@ -1,30 +0,0 @@ -.book-sidebar { - position: fixed; - width: $sidebar-width; - height: 100%; - z-index: 500; - - background-color: #f7f8f9; - transition: transform 0.2s; - - &.show { - transform: translateX(0); - } - - &.hide { - transform: translateX(-100%); - } - - @media all and (min-width: $pc-media) { - transform: translateX(0); - } - - @media all and (max-width: $pcs-media) { - transform: translateX(-100%); - } - - @import "../_components/brand"; - @import "../_components/menu"; -} - -@import "../_components/sidebar-toggle"; \ No newline at end of file diff --git a/themes/book/source/css/_variables.scss b/themes/book/source/css/_variables.scss deleted file mode 100644 index 48d4a99b..00000000 --- a/themes/book/source/css/_variables.scss +++ /dev/null @@ -1,55 +0,0 @@ -$book-primary-color: #004ed0; -$book-primary-link-color: rgb(47, 47, 47); -$book-primary-link-hover-color: rgb(128, 128, 128); -$book-link-color: #004ed0; -$book-link-visited-color: #7170db; -$book-link-hover-color: rgb(109, 109, 109); -$border-color: #e7e7e7; - -// font size -$font-size-base : 1.2rem; -$font-size-min : .5rem; -$font-size-smallest : .6rem; -$font-size-smaller : .7rem; -$font-size-small : .8rem; -$font-size-medium : 1rem; -$font-size-large : 1.125rem; -$font-size-larger : 1.2rem; -$font-size-largest : 1.4rem; -$font-size-max : 1.6rem; - -// medias -$pc-media : 1280px; -$pcs-media : 1279px; -$pad-media : 960px; -$pads-media : 959px; - -// code highlight -$code-font-family : consolas, Menlo, monospace; -$code-border-radius : 3px; -$code-foreground : #555; -$code-background : #eee; - -$content-font-family : sans-serif; - -// layout definition -$content-padding-xl : 2.2rem; -$content-padding-lg : 1.5rem; -$content-padding-md : .75rem; - -$post-info-max-width-xl : 10rem; -$post-info-max-width-lg : 8.5rem; - -$post-horizontal-pd-lg : 4rem; -$post-horizontal-pd-md : 1.25rem; - -$sidebar-width : 12rem; -$sidebar-starting-pd : 1.25rem; -$sidebar-ending-pd : .6rem; -$sidebar-brand-height : 2rem; -$sidebar-brand-fsize : .8rem; -$sidebar-menu-depth : .5rem; -$sidebar-menu-spacing : .625rem; - -// post style -$line-margin : 1rem; \ No newline at end of file diff --git a/themes/book/source/css/book.scss b/themes/book/source/css/book.scss deleted file mode 100644 index a80b164d..00000000 --- a/themes/book/source/css/book.scss +++ /dev/null @@ -1,103 +0,0 @@ -@import "variables"; - -.book-container { - width: 100%; - height: 100%; -} - -html { - margin: 0; - height: 100%; - font-size: $font-size-base; -} - -blockquote { - border: 1px solid #eee; - border-left-color: #008000; - border-left-width: 4px; - padding: 15px 0 15px 15px; - margin-bottom: 30px; -} - -body { - font-size: $font-size-small; -} - -h1, h2, h3, h4, h5, h6 { - margin-top: 2rem; - margin-bottom: 1rem; -} - -a { - color: $book-link-color; -} - -a:visited { - color: $book-link-visited-color; -} - -a:hover { - color: $book-link-hover-color; - text-decoration: none; -} - -img { - max-width: 100%; - max-height: 100%; -} - -.right { - text-align: right; -} - -.left { - text-align: left; -} - -.off-canvas-overlay { - background: rgba(0, 0, 0, 0.2); - position: fixed; - display: none; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 499; - - &.show { - display: block; - } - - @media all and (min-width: $pc-media) { - display: none !important; - } -} - -.off-canvas-content { - height: 100%; - font-family: $content-font-family; - transition: margin 200ms; - - @import "_partials/book-content"; - - &.extend { - margin-left: 0; - } - - @media all and (min-width: $pc-media) { - margin-left: $sidebar-width; - padding: $content-padding-xl $content-padding-xl; - } - - @media all and (min-width: $pad-media) and (max-width: $pcs-media) { - padding: $content-padding-xl $content-padding-lg; - } - - @media all and (max-width: $pads-media) { - padding: $content-padding-xl $content-padding-md; - } -} - -@import "_partials/book-navbar"; -@import "_partials/book-sidebar"; -@import "_partials/book-archive"; diff --git a/themes/book/source/favicon.png b/themes/book/source/favicon.png deleted file mode 100755 index 8bf9363f..00000000 Binary files a/themes/book/source/favicon.png and /dev/null differ diff --git a/themes/book/source/js/book-menu.js b/themes/book/source/js/book-menu.js deleted file mode 100644 index cd0591a6..00000000 --- a/themes/book/source/js/book-menu.js +++ /dev/null @@ -1,114 +0,0 @@ -function collapse(name, body, i) { - if (name.classList.contains('accordion')) { - var acco_body = name.querySelector('.accordion-body'); - acco_body.appendChild(body); - return name; - } - - var accordion = document.createElement('div'); - accordion.setAttribute("class", "accordion"); - - var acco_body = document.createElement('div'); - acco_body.setAttribute("class", "accordion-body"); - acco_body.appendChild(body); - - var checkbox = document.createElement('input'); - checkbox.setAttribute("type", "checkbox"); - checkbox.setAttribute("id", "accordion-" + i); - checkbox.setAttribute("hidden", ""); - - var label = document.createElement('label'); - label.textContent = name.textContent - label.setAttribute("class", "accordion-header c-hand"); - label.setAttribute("for", "accordion-" + i); - - var icon = document.createElement('i'); - icon.setAttribute("class", "icon icon-arrow-down"); - label.appendChild(icon); - - accordion.appendChild(checkbox); - accordion.appendChild(label); - accordion.appendChild(acco_body); - - name.parentNode.replaceChild(accordion, name); -} - -// clear invalid syntax -function clear_invalid_syntax() { - document.querySelectorAll('.book-menu > :not(ul):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6)').forEach((e) => { - e.parentNode.removeChild(e); - }) -} - -// pack accordion -function pack_menu_accordion() { - document.querySelectorAll('.book-menu > ul').forEach((e, idx) => { - var sibling = e.previousElementSibling; - while (sibling != null) { - if (sibling.tagName == "H1" || sibling.tagName == "H2" || - sibling.tagName == "H3" || sibling.tagName == "H4" || - sibling.tagName == "H5" || sibling.tagName == "H6") { - break; - } - sibling = sibling.previousElementSibling; - } - if (!sibling || sibling.tagName == "H1") { - e.classList.add('uncollapsible'); - } - else { - collapse(sibling, e, idx); - } - }) -} - -// highlight current tab -function highlight_current_tab() { - document.querySelectorAll('.book-menu a').forEach((item) => { - if (!item.getAttribute('href')) return // if href has no value - // normalized url - let sharp = window.location.href.search('#'); - let url = window.location.href - if (sharp != -1) { - url = url.slice(0, sharp); - } - if (url.slice(-1) == '/') { - url = url.slice(0, -1); - } - if (item.href === url) { - item.classList.add('current-tab') - var parent = item.parentNode; - while (!parent.classList.contains("book-menu")) { - if (parent.classList.contains("accordion")) { - break; - } - parent = parent.parentNode; - } - if (parent.classList.contains("accordion")) { - parent.querySelector('input').setAttribute("checked", ""); - } - } - }) -} - -function show_sidebar() { - var menu = document.getElementById('menu'); - menu.classList.remove('hide'); -} - -/* ----- onload ----- */ - -clear_invalid_syntax() -pack_menu_accordion() -highlight_current_tab() -show_sidebar() - -// restore sidebar position after reloading page -window.addEventListener('beforeunload', () => { - let sidebarPos = document.querySelector('.book-menu').scrollTop - window.localStorage.setItem('sidebarPos', sidebarPos) -}) - -if (window.localStorage.sidebarPos) { - let sidebarPos = window.localStorage.sidebarPos - document.querySelector('.book-menu').scrollTop = sidebarPos -} \ No newline at end of file diff --git a/themes/book/source/js/book-post.js b/themes/book/source/js/book-post.js deleted file mode 100644 index 95277f41..00000000 --- a/themes/book/source/js/book-post.js +++ /dev/null @@ -1,31 +0,0 @@ -// add figcaption under image -document.querySelectorAll('img').forEach(function(img){ - if(img.getAttribute('alt')) { - let parent = img.parentNode; - let figcaption = document.createElement('figcaption'); - figcaption.innerHTML = img.getAttribute('alt'); - parent.insertBefore(figcaption, img.nextSibling); - } -}) - -// add table wrapper -document.querySelectorAll('.book-post > table, li > table').forEach(function(table){ - let parent = table.parentNode; - let wrapper = document.createElement('div'); - wrapper.className = 'table-wrapper' - parent.insertBefore(wrapper, table); - wrapper.appendChild(table); -}) - -// add footnotes tooltips -document.querySelectorAll('sup.footnote-ref').forEach(function(fn){ - let parent = fn.parentNode; - let wrapper = document.createElement('span'); - let link = fn.childNodes[0].getAttribute("href") // #fn1 - link = link.substr(1, link.length) // fn1 - let fn_content = document.getElementById(link).innerText.replace(/↩/g, '') - wrapper.className = 'tooltip' - wrapper.setAttribute("data-tooltip", fn_content) - parent.insertBefore(wrapper, fn); - wrapper.appendChild(fn); -}) \ No newline at end of file diff --git a/themes/book/source/js/book-toc.js b/themes/book/source/js/book-toc.js deleted file mode 100644 index 07761f7b..00000000 --- a/themes/book/source/js/book-toc.js +++ /dev/null @@ -1,86 +0,0 @@ -tocbot.init({ - tocSelector: '.book-tocbot', - contentSelector: '.book-content', - headingSelector: 'h1, h2, h3, h4, h5', - collapseDepth: 2, - orderedList: false, - scrollSmooth: false, -}) - -function expand_toc() { - var b = document.querySelector(".book-toc-expand") - tocbot.init({ - tocSelector: '.book-tocbot', - contentSelector: '.book-content', - headingSelector: 'h1, h2, h3, h4, h5', - collapseDepth: 6, - orderedList: false, - scrollSmooth: false, - }) - b.setAttribute("onclick", "collapse_toc()") - b.innerHTML = "Collapse all" -} - -function collapse_toc() { - var b = document.querySelector(".book-toc-expand") - tocbot.init({ - tocSelector: '.book-tocbot', - contentSelector: '.book-content', - headingSelector: 'h1, h2, h3, h4, h5', - collapseDepth: 2, - orderedList: false, - scrollSmooth: false, - }) - b.setAttribute("onclick", "expand_toc()") - b.innerHTML = "Expand all" -} - -function go_top() { - window.scrollTo(0, 0) - setTimeout(update_maxHeight, 150) // wait animation -} - -function go_bottom() { - window.scrollTo(0, document.body.scrollHeight) - setTimeout(update_maxHeight, 150) // wait animation -} - -function get_maxHeight() { - let meta = document.querySelector('.book-post-meta') - let tocbot_menu = document.querySelector('.book-tocbot-menu') - - let meta_pos = (meta == null) ? new DOMRect(0, 0, 0, 0) : meta.getBoundingClientRect() - let tocbot_menu_pos = (tocbot_menu == null) ? new DOMRect(0, 0, 0, 0) : tocbot_menu.getBoundingClientRect() - - let screenHeight = window.innerHeight - let maxHeight = screenHeight - meta_pos.y - meta_pos.height - tocbot_menu_pos.height - screenHeight * 0.15 - - return maxHeight -} - -function update_maxHeight() { - let scrollY = window.scrollY - let meta = document.querySelector('.book-post-meta') - let tocbot = document.querySelector('.book-tocbot') - let maxHeight = get_maxHeight() - - if (meta == null) { - tocbot.style.maxHeight = maxHeight + "px" - } - else if (scrollY > 600) { - meta.classList.add('hide') - tocbot.style.maxHeight = maxHeight + "px" - } - else { - meta.classList.remove('hide') - tocbot.style.maxHeight = maxHeight + "px" - } -} - -window.addEventListener('load', () => { - let tocbot = document.querySelector('.book-tocbot') - let maxHeight = get_maxHeight() - tocbot.style.maxHeight = maxHeight + "px" -}) -window.addEventListener('resize', update_maxHeight) -window.addEventListener('scroll', update_maxHeight) \ No newline at end of file diff --git a/themes/book/source/js/book.js b/themes/book/source/js/book.js deleted file mode 100644 index ee58389a..00000000 --- a/themes/book/source/js/book.js +++ /dev/null @@ -1,13 +0,0 @@ -function hide_canvas() { - let sidebar = document.querySelector('.book-sidebar') - let overlay = document.querySelector('.off-canvas-overlay') - sidebar.classList.remove('show') - overlay.classList.remove('show') -} - -function open_sidebar() { - let sidebar = document.querySelector('.book-sidebar') - let overlay = document.querySelector('.off-canvas-overlay') - sidebar.classList.add('show') - overlay.classList.add('show') -}