├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── stale.yml └── workflows │ └── publish.yml ├── LICENSE ├── _config.yml ├── languages ├── default.yml ├── en.yml ├── zh-CN.yml └── zh-TW.yml ├── layout ├── archive.pug ├── category.pug ├── includes │ ├── 404.pug │ ├── additional-js.pug │ ├── footer.pug │ ├── head.pug │ ├── head │ │ ├── Open_Graph.pug │ │ ├── analytics.pug │ │ ├── config.pug │ │ ├── config_site.pug │ │ ├── google_adsense.pug │ │ ├── noscript.pug │ │ ├── preconnect.pug │ │ ├── pwa.pug │ │ └── site_verification.pug │ ├── header │ │ ├── index.pug │ │ ├── index_intro.pug │ │ ├── menu_item.pug │ │ ├── nav.pug │ │ ├── post-info.pug │ │ └── social.pug │ ├── layout.pug │ ├── loading │ │ ├── loading-js.pug │ │ └── loading.pug │ ├── mixins │ │ ├── article-sort.pug │ │ ├── post-ui-blog.pug │ │ └── post-ui.pug │ ├── page │ │ ├── categories.pug │ │ ├── default-page.pug │ │ ├── flat.pug │ │ ├── flink.pug │ │ └── tags.pug │ ├── pagination.pug │ ├── post │ │ ├── post-copyright.pug │ │ └── reward.pug │ ├── rightside.pug │ ├── sidebar.pug │ ├── third-party │ │ ├── aplayer.pug │ │ ├── card-post-count │ │ │ ├── disqus.pug │ │ │ ├── fb.pug │ │ │ ├── index.pug │ │ │ ├── twikoo.pug │ │ │ ├── valine.pug │ │ │ └── waline.pug │ │ ├── chat │ │ │ ├── chatra.pug │ │ │ ├── crisp.pug │ │ │ ├── daovoice.pug │ │ │ ├── gitter.pug │ │ │ ├── index.pug │ │ │ └── tidio.pug │ │ ├── comments │ │ │ ├── disqus.pug │ │ │ ├── disqusjs.pug │ │ │ ├── facebook_comments.pug │ │ │ ├── gitalk.pug │ │ │ ├── index.pug │ │ │ ├── js.pug │ │ │ ├── livere.pug │ │ │ ├── twikoo.pug │ │ │ ├── utterances.pug │ │ │ ├── valine.pug │ │ │ └── waline.pug │ │ ├── effect.pug │ │ ├── math │ │ │ ├── index.pug │ │ │ ├── katex.pug │ │ │ ├── mathjax.pug │ │ │ └── mermaid.pug │ │ ├── newest-comments │ │ │ ├── disqus-comment.pug │ │ │ ├── github-issues.pug │ │ │ ├── index.pug │ │ │ ├── twikoo-comment.pug │ │ │ ├── valine.pug │ │ │ └── waline.pug │ │ ├── pangu.pug │ │ ├── pjax.pug │ │ ├── prismjs.pug │ │ ├── search │ │ │ ├── algolia.pug │ │ │ ├── index.pug │ │ │ └── local-search.pug │ │ ├── share │ │ │ ├── add-this.pug │ │ │ ├── addtoany.pug │ │ │ ├── index.pug │ │ │ └── share-js.pug │ │ └── subtitle.pug │ └── widget │ │ ├── card_ad.pug │ │ ├── card_announcement.pug │ │ ├── card_archives.pug │ │ ├── card_author.pug │ │ ├── card_categories.pug │ │ ├── card_newest_comment.pug │ │ ├── card_post_toc.pug │ │ ├── card_recent_post.pug │ │ ├── card_self.pug │ │ ├── card_tags.pug │ │ ├── card_webinfo.pug │ │ └── index.pug ├── index.pug ├── page.pug ├── post.pug └── tag.pug ├── package.json ├── scripts ├── events │ ├── 404.js │ ├── init.js │ └── welcome.js ├── filters │ ├── post_lazyload.js │ └── random_cover.js ├── helpers │ ├── aside_archives.js │ ├── aside_categories.js │ ├── inject_head_js.js │ ├── page.js │ ├── posts-chart.js │ └── related_post.js └── tag │ ├── button.js │ ├── gallery.js │ ├── hide.js │ ├── inlineImg.js │ ├── label.js │ ├── mermaid.js │ ├── note.js │ └── tabs.js └── source ├── css ├── _global │ ├── dist │ │ └── function.css │ ├── function.styl │ └── index.styl ├── _highlight │ ├── dist │ │ └── theme.css │ ├── highlight.styl │ ├── highlight │ │ ├── diff.styl │ │ ├── dist │ │ │ ├── diff.css │ │ │ └── index.css │ │ └── index.styl │ ├── prismjs │ │ ├── diff.styl │ │ ├── dist │ │ │ ├── diff.css │ │ │ ├── index.css │ │ │ └── line-number.css │ │ ├── index.styl │ │ └── line-number.styl │ └── theme.styl ├── _layout │ ├── 404.styl │ ├── aside.styl │ ├── chat.styl │ ├── comments.styl │ ├── footer.styl │ ├── head.styl │ ├── loading.styl │ ├── pagination.styl │ ├── post.styl │ ├── relatedposts.styl │ ├── reward.styl │ ├── rightside.styl │ ├── sidebar.styl │ └── third-party.styl ├── _mode │ ├── darkmode.styl │ ├── dist │ │ └── readmode.css │ └── readmode.styl ├── _page │ ├── archives.styl │ ├── categories.styl │ ├── common.styl │ ├── dist │ │ ├── categories.css │ │ ├── common.css │ │ └── tags.css │ ├── flink.styl │ ├── homepage.styl │ └── tags.styl ├── _revision │ ├── archive.styl │ ├── carousel.styl │ ├── dashborad.styl │ ├── douban.styl │ ├── footer.styl │ ├── myself.styl │ ├── nav.styl │ ├── project.styl │ ├── travel.styl │ └── weibo.styl ├── _search │ ├── algolia.styl │ ├── dist │ │ ├── algolia.css │ │ └── local-search.css │ ├── index.styl │ └── local-search.styl ├── _tags │ ├── button.styl │ ├── dist │ │ ├── button.css │ │ ├── hexo.css │ │ ├── hide.css │ │ ├── inlineImg.css │ │ ├── myself.css │ │ └── tabs.css │ ├── gallery.styl │ ├── hexo.styl │ ├── hide.styl │ ├── inlineImg.styl │ ├── label.styl │ ├── note.styl │ └── tabs.styl ├── _third-party │ ├── githubcalendar.css │ └── normalize.min.css ├── fm │ └── fm-style.css ├── index.styl ├── things │ ├── sortable.min.css │ ├── things.styl │ └── weibo.css └── var.styl ├── img ├── 3dIcon │ ├── icon_basket-1.png │ ├── icon_basket-2.png │ ├── icon_basket-3.png │ ├── icon_basket.png │ ├── icon_delete.png │ ├── icon_download.png │ ├── icon_mail.png │ ├── icon_plus.png │ ├── icon_wechat.png │ ├── icon_works.png │ └── objects │ │ ├── Basketball Color.png │ │ ├── Chair.png │ │ ├── Cloud.png │ │ ├── Desktop.png │ │ ├── Plant 1.png │ │ ├── Plant 2.png │ │ ├── Weight Color.png │ │ ├── bucket a.png │ │ ├── cam 1.png │ │ ├── cube a.png │ │ ├── gamepad.png │ │ ├── red book 2.png │ │ ├── rocket.png │ │ └── speaker a.png ├── 404.jpg ├── algolia.svg ├── alipay.jpg ├── avator.JPG ├── bg │ ├── bg-1.jpg │ ├── bg-2.jpg │ ├── bg-3.jpg │ ├── bg-4.jpg │ └── bg-5.jpg ├── cube-logo.png ├── curioso │ ├── 1.jpg │ ├── 10.JPG │ ├── 11.jpg │ ├── 12.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.JPG │ ├── 5.JPG │ ├── 6.JPG │ ├── 7.JPG │ ├── 8.JPG │ └── 9.JPG ├── favicon.png ├── friend_404.gif ├── index-1.jpg ├── kp-logo.png ├── logo.png ├── paypal.jpg ├── posts-img │ └── 16907 │ │ ├── blog.png │ │ ├── index.png │ │ ├── media.png │ │ └── profile.png ├── pwa │ ├── icon-128x128.png │ ├── icon-144x144.png │ ├── icon-152x152.png │ ├── icon-192x192.png │ ├── icon-256x256.png │ ├── icon-384x384.png │ ├── icon-512x512.png │ ├── icon-72x72.png │ └── icon-96x96.png ├── random.svg ├── ring-logo.png ├── store.png └── wechat.jpg ├── js ├── bg-music.js ├── carousel.js ├── channel.js ├── chart │ ├── gantt.js │ ├── githubcalendar.js │ ├── heatmap.js │ ├── map.js │ ├── radar.js │ └── sun.js ├── main.js ├── search │ ├── algolia.js │ └── local-search.js ├── things │ ├── sortable.min.js │ └── things.js ├── travel.js ├── tw_cn.js ├── utils.js └── visitorMap.js └── sitemap_template.xml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 22 | 23 | 24 | ## I want to create a Bug report 25 | 26 | 27 | 28 | - [] Yes, I have read [Hexo Docs page](https://hexo.io/docs/), especially [Templates](https://hexo.io/docs/templates.html), [Variables](https://hexo.io/docs/variables.html), [Helpers](https://hexo.io/docs/helpers.html) and [Troubleshooting](https://hexo.io/docs/troubleshooting.html). 29 | - [] Yes, I have read [Butterfly Documentation](https://butterfly.js.org/posts/21cfbf15/). 30 | - [] And yes, I already searched for current [issues](https://github.com/jerryc127/hexo-theme-butterfly/issues?utf8=%E2%9C%93&q=is%3Aissue) and this did not help me. 31 | 32 | ## Butterfly Information 33 | 34 | 35 | 36 | **Butterfly Version:** 37 | 38 | 39 | **Platform:** 40 | 41 | 42 | **Browser:** 43 | 44 | ## Expected behavior 45 | 46 | ## Actual behavior 47 | 48 | ## Steps to reproduce the behavior 49 | 1. Go to '...' 50 | 2. Click on '....' 51 | 3. Scroll down to '....' 52 | 4. See error 53 | 54 | 55 | 56 | ## Screenshots 57 | 58 | 59 | ## Website 60 | 61 | ## Describe the bug 62 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | - bug 10 | - enhancement 11 | - documentation 12 | # Label to use when marking an issue as stale 13 | staleLabel: wontfix 14 | # Comment to post when marking an issue as stale. Set to `false` to disable 15 | markComment: > 16 | This issue has been automatically marked as stale because it has not had 17 | recent activity. It will be closed if no further activity occurs. Thank you 18 | for your contributions. 19 | # Comment to post when closing a stale issue. Set to `false` to disable 20 | closeComment: false -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: npm publish 2 | 3 | on: 4 | release: 5 | types: [created] 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | # Setup .npmrc file to publish to npm 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: '12.x' 15 | registry-url: 'https://registry.npmjs.org' 16 | - run: npm install 17 | - run: npm publish 18 | env: 19 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} -------------------------------------------------------------------------------- /languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | index: 2 | Home: 主页 3 | 4 | footer: 5 | framework: 框架 6 | theme: 主题 7 | 8 | copy: 9 | success: 复制成功 10 | error: 复制错误 11 | noSupport: 浏览器不支持 12 | 13 | page: 14 | articles: 文章总览 15 | tag: 标签 16 | category: 分类 17 | archives: 归档 18 | 19 | card_post_count: 条评论 20 | 21 | sticky: 置顶 22 | no_title: 无题 23 | 24 | post: 25 | created: 发表于 26 | updated: 更新于 27 | wordcount: 字数总计 28 | min2read: 阅读时长 29 | min2read_unit: 分钟 30 | page_pv: 阅读量 31 | comments: 评论数 32 | copyright: 33 | author: 文章作者 34 | link: 文章链接 35 | copyright_notice: 版权声明 36 | copyright_content: '本博客所有文章除特别声明外,均采用 37 | %s 许可协议。转载请注明来自 %s!' 38 | recommend: 相关推荐 39 | edit: 编辑 40 | 41 | search: 搜索 42 | algolia_search: 43 | input_placeholder: 搜索文章 44 | hits_empty: '找不到您查询的内容:${query}' 45 | hits_stats: '找到 ${hits} 条结果,用时 ${time} 毫秒' 46 | 47 | local_search: 48 | label: 本地搜索 49 | input_placeholder: 搜索文章 50 | hits_empty: '找不到您查询的内容:${query}' 51 | 52 | pagination: 53 | prev: 上一篇 54 | next: 下一篇 55 | 56 | comment: 评论 57 | 58 | aside: 59 | articles: 文章 60 | tags: 标签 61 | categories: 分类 62 | card_announcement: 公告 63 | card_categories: 分类 64 | card_tags: 标签 65 | card_archives: 归档 66 | card_recent_post: 最新文章 67 | card_webinfo: 68 | headline: 网站资讯 69 | article_name: 文章数目 70 | runtime: 71 | name: 已运行时间 72 | unit: 天 73 | last_push_date: 74 | name: 最后更新时间 75 | site_wordcount: 本站总字数 76 | site_uv_name: 本站访客数 77 | site_pv_name: 本站总访问量 78 | more_button: 查看更多 79 | card_newest_comments: 80 | headline: 最新评论 81 | loading_text: 正在加载中... 82 | error: 无法获取评论,请确认相关配置是否正确 83 | zero: 没有评论 84 | image: 图片 85 | link: 链接 86 | code: 代码 87 | card_toc: 目录 88 | 89 | date_suffix: 90 | just: 刚刚 91 | min: 分钟前 92 | hour: 小时前 93 | day: 天前 94 | month: 个月前 95 | 96 | donate: 打赏 97 | share: 分享 98 | 99 | rightside: 100 | readmode_title: 阅读模式 101 | font_plus_title: 放大字体 102 | font_minus_title: 缩小字体 103 | translate_title: 简繁转换 104 | night_mode_title: 浅色和深色模式转换 105 | back_to_top: 回到顶部 106 | toc: 目录 107 | scroll_to_comment: 直达评论 108 | setting: 设置 109 | aside: 单栏和双栏切换 110 | 111 | copy_copyright: 112 | author: 作者 113 | link: 链接 114 | source: 来源 115 | info: 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 116 | 117 | Snackbar: 118 | chs_to_cht: 你已切换为繁体 119 | cht_to_chs: 你已切换为简体 120 | day_to_night: 你已切换为深色模式 121 | night_to_day: 你已切换为浅色模式 122 | 123 | loading: 加载中... 124 | 125 | error404: 126 | error_title: 页面没有找到 127 | back_button: 回到主页 128 | -------------------------------------------------------------------------------- /languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | footer: 2 | framework: 框架 3 | theme: 主題 4 | 5 | copy: 6 | success: 複製成功 7 | error: 複製錯誤 8 | noSupport: 瀏覽器不支援 9 | 10 | page: 11 | articles: 文章總覽 12 | tag: 標籤 13 | category: 分類 14 | archives: 歸檔 15 | 16 | card_post_count: 條評論 17 | 18 | sticky: 置頂 19 | no_title: 無題 20 | 21 | post: 22 | created: 發表於 23 | updated: 更新於 24 | wordcount: 字數總計 25 | min2read: 閱讀時長 26 | min2read_unit: 分鐘 27 | page_pv: 閱讀量 28 | comments: 評論數 29 | copyright: 30 | author: 文章作者 31 | link: 文章連結 32 | copyright_notice: 版權聲明 33 | copyright_content: '本部落格所有文章除特別聲明外,均採用 34 | %s 許可協議。轉載請註明來自 %s!' 35 | recommend: 相關推薦 36 | edit: 編輯 37 | 38 | search: 搜尋 39 | algolia_search: 40 | input_placeholder: 搜尋文章 41 | hits_empty: '找不到您查詢的內容:${query}' 42 | hits_stats: '找到 ${hits} 條結果,用時 ${time} 毫秒' 43 | 44 | local_search: 45 | label: 本地搜尋 46 | input_placeholder: 搜尋文章 47 | hits_empty: '找不到您查詢的內容:${query}' 48 | 49 | pagination: 50 | prev: 上一篇 51 | next: 下一篇 52 | 53 | comment: 評論 54 | 55 | aside: 56 | articles: 文章 57 | tags: 標籤 58 | categories: 分類 59 | card_announcement: 公告 60 | card_categories: 分類 61 | card_tags: 標籤 62 | card_archives: 歸檔 63 | card_recent_post: 最新文章 64 | card_webinfo: 65 | headline: 網站資訊 66 | article_name: 文章數目 67 | runtime: 68 | name: 已運行時間 69 | unit: 天 70 | last_push_date: 71 | name: 最後更新時間 72 | site_wordcount: 本站總字數 73 | site_uv_name: 本站訪客數 74 | site_pv_name: 本站總訪問量 75 | more_button: 檢視更多 76 | card_newest_comments: 77 | headline: 最新評論 78 | loading_text: 正在載入中... 79 | error: 無法獲取評論,請確認相關配置是否正確 80 | zero: 沒有評論 81 | image: 圖片 82 | link: 連結 83 | code: 代碼 84 | card_toc: 目錄 85 | 86 | date_suffix: 87 | just: 剛剛 88 | min: 分鐘前 89 | hour: 小時前 90 | day: 天前 91 | month: 個月前 92 | 93 | donate: 打賞 94 | share: 分享 95 | 96 | rightside: 97 | readmode_title: 閱讀模式 98 | font_plus_title: 放大字型 99 | font_minus_title: 縮小字型 100 | translate_title: 簡繁轉換 101 | night_mode_title: 淺色和深色模式轉換 102 | back_to_top: 回到頂部 103 | toc: 目錄 104 | scroll_to_comment: 直達評論 105 | setting: 設定 106 | aside: 單欄和雙欄切換 107 | 108 | copy_copyright: 109 | author: 作者 110 | link: 連結 111 | source: 來源 112 | info: 著作權歸作者所有。商業轉載請聯絡作者獲得授權,非商業轉載請註明出處。 113 | 114 | Snackbar: 115 | chs_to_cht: 你已切換為繁體 116 | cht_to_chs: 你已切換為簡體 117 | day_to_night: 你已切換為深色模式 118 | night_to_day: 你已切換為淺色模式 119 | 120 | loading: 載入中... 121 | 122 | error404: 123 | error_title: 頁面沒有找到 124 | back_button: 回到主頁 125 | -------------------------------------------------------------------------------- /layout/archive.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | include ./includes/mixins/article-sort.pug 5 | #archive 6 | .article-sort-title= _p('page.articles') + ' - ' + site.posts.length 7 | +articleSort(page.posts) 8 | include includes/pagination.pug -------------------------------------------------------------------------------- /layout/category.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | if theme.category_ui == 'index' 5 | include ./includes/mixins/post-ui.pug 6 | #recent-posts.recent-posts.category_ui 7 | +postUI 8 | include includes/pagination.pug 9 | else 10 | include ./includes/mixins/article-sort.pug 11 | #category 12 | .article-sort-title= _p('page.category') + ' - ' + page.category 13 | +articleSort(page.posts) 14 | include includes/pagination.pug -------------------------------------------------------------------------------- /layout/includes/404.pug: -------------------------------------------------------------------------------- 1 | - var top_img = theme.error_404.background || theme.default_top_img 2 | - var bg_img = `background-image: url('${url_for(top_img)}')` 3 | 4 | #body-wrap.error 5 | div(style='display: none') 6 | include ./header/index.pug 7 | 8 | #error-wrap 9 | .error-content 10 | .error-img(style=bg_img) 11 | .error-info 12 | h1.error_title= '404' 13 | .error_subtitle= theme.error_404.subtitle 14 | a.button--animated(href=config.root) 15 | i.fas.fa-rocket 16 | = _p('error404.back_button') -------------------------------------------------------------------------------- /layout/includes/additional-js.pug: -------------------------------------------------------------------------------- 1 | div 2 | script(src=url_for(theme.CDN.utils)) 3 | script(src=url_for(theme.CDN.main)) 4 | 5 | if theme.translate.enable 6 | script(src=url_for(theme.CDN.translate)) 7 | 8 | if theme.medium_zoom 9 | script(src=url_for(theme.CDN.medium_zoom)) 10 | 11 | if theme.instantpage 12 | script(src=url_for(theme.CDN.instantpage) type="module") 13 | 14 | if theme.lazyload.enable 15 | script(src=url_for(theme.CDN.lazyload)) 16 | 17 | if theme.snackbar.enable 18 | script(src=url_for(theme.CDN.snackbar)) 19 | 20 | if theme.pangu.enable 21 | !=partial('includes/third-party/pangu.pug', {}, {cache: true}) 22 | 23 | //- search 24 | if theme.algolia_search.enable 25 | script(src=url_for(theme.CDN.algolia_js)) 26 | else if theme.local_search.enable 27 | script(src=url_for(theme.CDN.local_search)) 28 | 29 | if theme.preloader 30 | !=partial('includes/loading/loading-js', {}, {cache: true}) 31 | 32 | .js-pjax 33 | if needLoadCountJs 34 | !=partial('includes/third-party/card-post-count/index', {}, {cache: true}) 35 | 36 | if loadSubJs 37 | include ./third-party/subtitle.pug 38 | 39 | include ./third-party/math/index.pug 40 | 41 | if commentsJsLoad 42 | include ./third-party/comments/js.pug 43 | 44 | !=partial('includes/third-party/prismjs', {}, {cache: true}) 45 | 46 | if theme.aside.enable && theme.newest_comments.enable 47 | if theme.pjax.enable 48 | !=partial('includes/third-party/newest-comments/index', {}, {cache: true}) 49 | else if (!is_post() && page.aside !== false) 50 | !=partial('includes/third-party/newest-comments/index', {}, {cache: true}) 51 | 52 | !=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)}) 53 | 54 | !=partial('includes/third-party/effect', {}, {cache: true}) 55 | 56 | !=partial('includes/third-party/chat/index', {}, {cache: true}) 57 | 58 | if theme.aplayerInject && theme.aplayerInject.enable 59 | if theme.pjax.enable || theme.aplayerInject.per_page 60 | include ./third-party/aplayer.pug 61 | else if page.aplayer 62 | include ./third-party/aplayer.pug 63 | 64 | if theme.pjax.enable 65 | !=partial('includes/third-party/pjax', {}, {cache: true}) 66 | 67 | if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv 68 | script(async data-pjax src=url_for(theme.CDN.busuanzi)) 69 | -------------------------------------------------------------------------------- /layout/includes/footer.pug: -------------------------------------------------------------------------------- 1 | #footer-wrap 2 | #footer-section 3 | #footer-columns 4 | each colValue, colLable in theme.footer_text 5 | .footer-column 6 | each secVal,secLab in colValue 7 | .footer-column-section 8 | label=secLab 9 | ul.footer-link 10 | each val, lab in secVal 11 | li 12 | a(href=val)=lab 13 | #footer-info 14 | a.copyright(href=theme.footer_copyright_address)=theme.footer_copyright 15 | a.icp(href=theme.footer_icp_address)=theme.footer_icp 16 | 17 | 18 | //- if theme.footer.owner.enable 19 | //- - var now = new Date() 20 | //- - var nowYear = now.getFullYear() 21 | //- if theme.footer.owner.since && theme.footer.owner.since != nowYear 22 | //- .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}` 23 | //- else 24 | //- .copyright!= `©${nowYear} By ${config.author}` 25 | //- if theme.footer.copyright 26 | //- .framework-info 27 | //- span= _p('footer.framework') + ' ' 28 | //- a(href='https://hexo.io')= 'Hexo' 29 | //- span.footer-separator | 30 | //- span= _p('footer.theme') + ' ' 31 | //- a(href='https://github.com/jerryc127/hexo-theme-butterfly')= 'Butterfly' 32 | //- if theme.footer.custom_text 33 | //- .footer_custom_text!=`${theme.footer.custom_text}` 34 | -------------------------------------------------------------------------------- /layout/includes/head/Open_Graph.pug: -------------------------------------------------------------------------------- 1 | if theme.Open_Graph_meta 2 | - let contentType = is_post() ? 'article' : 'website' 3 | - let metaImage = (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : '' 4 | - let fb_appId = theme.facebook_comments.app_id || '' 5 | - let fb_admins = theme.facebook_comments.user_id || '' 6 | 7 | != open_graph({type: contentType, image: metaImage, fb_admins: fb_admins, fb_app_id: fb_appId}) 8 | 9 | else 10 | meta(name="description" content=page_description()) 11 | 12 | -------------------------------------------------------------------------------- /layout/includes/head/analytics.pug: -------------------------------------------------------------------------------- 1 | if theme.baidu_analytics 2 | script. 3 | var _hmt = _hmt || []; 4 | (function() { 5 | var hm = document.createElement("script"); 6 | hm.src = "https://hm.baidu.com/hm.js?!{theme.baidu_analytics}"; 7 | var s = document.getElementsByTagName("script")[0]; 8 | s.parentNode.insertBefore(hm, s); 9 | })(); 10 | 11 | if theme.google_analytics 12 | script(async src=`https://www.googletagmanager.com/gtag/js?id=${theme.google_analytics}`) 13 | script. 14 | window.dataLayer = window.dataLayer || []; 15 | function gtag(){dataLayer.push(arguments);} 16 | gtag('js', new Date()); 17 | gtag('config', '!{theme.google_analytics}'); 18 | 19 | if theme.tencent_analytics 20 | script. 21 | var _mtac = {}; 22 | (function() { 23 | var mta = document.createElement("script"); 24 | mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4"; 25 | mta.setAttribute("name", "MTAH5"); 26 | mta.setAttribute("sid", "!{theme.tencent_analytics}"); 27 | var s = document.getElementsByTagName("script")[0]; 28 | s.parentNode.insertBefore(mta, s); 29 | })(); 30 | 31 | if theme.cnzz_analytics 32 | script(async data-pjax src=`https://s4.cnzz.com/z_stat.php?id=${theme.cnzz_analytics}&web_id=${theme.cnzz_analytics}`) 33 | 34 | if theme.cloudflare_analytics 35 | script(defer data-pjax src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon=`{"token": "${theme.cloudflare_analytics}"}`) 36 | 37 | if theme.microsoft_clarity 38 | script. 39 | (function(c,l,a,r,i,t,y){ 40 | c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; 41 | t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; 42 | y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); 43 | })(window, document, "clarity", "script", "!{theme.microsoft_clarity}"); -------------------------------------------------------------------------------- /layout/includes/head/config_site.pug: -------------------------------------------------------------------------------- 1 | - 2 | let isHighlightShrink 3 | if (theme.highlight_shrink == 'none') isHighlightShrink = 'undefined' 4 | else if (page.highlight_shrink === true || page.highlight_shrink === false) isHighlightShrink = page.highlight_shrink 5 | else isHighlightShrink = theme.highlight_shrink 6 | 7 | var pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable 8 | var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true ) 9 | 10 | let titleVal = pageTitle.replace(/'/ig,"\\'") 11 | - 12 | 13 | script#config-diff. 14 | var GLOBAL_CONFIG_SITE = { 15 | title: '!{titleVal}', 16 | isPost: !{is_post()}, 17 | isHome: !{is_home()}, 18 | isHighlightShrink: !{isHighlightShrink}, 19 | isToc: !{showToc}, 20 | postUpdate: '!{full_date(page.updated)}' 21 | } 22 | -------------------------------------------------------------------------------- /layout/includes/head/google_adsense.pug: -------------------------------------------------------------------------------- 1 | if (theme.google_adsense && theme.google_adsense.enable) 2 | script(async src=theme.google_adsense.js) 3 | 4 | if theme.google_adsense.auto_ads 5 | script. 6 | (adsbygoogle = window.adsbygoogle || []).push({ 7 | google_ad_client: '!{theme.google_adsense.client}', 8 | enable_page_level_ads: '!{theme.google_adsense.enable_page_level_ads}' 9 | }); -------------------------------------------------------------------------------- /layout/includes/head/noscript.pug: -------------------------------------------------------------------------------- 1 | noscript. 2 | -------------------------------------------------------------------------------- /layout/includes/head/preconnect.pug: -------------------------------------------------------------------------------- 1 | link(rel="preconnect" href="//cdn.jsdelivr.net") 2 | 3 | if theme.google_analytics 4 | link(rel="preconnect" href="//www.google-analytics.com" crossorigin='') 5 | 6 | if theme.baidu_analytics 7 | link(rel="preconnect" href="//hm.baidu.com") 8 | 9 | if theme.tencent_analytics 10 | link(rel="preconnect" href="//pingjs.qq.com") 11 | 12 | if theme.cnzz_analytics 13 | link(rel="preconnect" href="//s4.cnzz.com") 14 | 15 | if theme.cloudflare_analytics 16 | link(rel="preconnect" href="//static.cloudflareinsights.com") 17 | 18 | if theme.microsoft_clarity 19 | link(rel="preconnect" href="//www.clarity.ms") 20 | 21 | if theme.blog_title_font && theme.blog_title_font.font_link && theme.blog_title_font.font_link.indexOf('//fonts.googleapis.com') != -1 22 | link(rel="preconnect" href="//fonts.googleapis.com" crossorigin='') 23 | 24 | if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv 25 | link(rel="preconnect" href="//busuanzi.ibruce.info") -------------------------------------------------------------------------------- /layout/includes/head/pwa.pug: -------------------------------------------------------------------------------- 1 | link(rel="manifest" href=url_for(theme.pwa.manifest)) 2 | if(theme.pwa.theme_color) 3 | meta(name="msapplication-TileColor" content=theme.pwa.theme_color) 4 | if(theme.pwa.apple_touch_icon) 5 | link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon)) 6 | if(theme.pwa.favicon_32_32) 7 | link(rel="icon" type="image/png" sizes="32x32" href=url_for(theme.pwa.favicon_32_32)) 8 | if(theme.pwa.favicon_16_16) 9 | link(rel="icon" type="image/png" sizes="16x16" href=url_for(theme.pwa.favicon_16_16)) 10 | if(theme.pwa.mask_icon) 11 | link(rel="mask-icon" href=url_for(theme.pwa.mask_icon) color="#5bbad5") 12 | -------------------------------------------------------------------------------- /layout/includes/head/site_verification.pug: -------------------------------------------------------------------------------- 1 | if theme.site_verification 2 | each item in theme.site_verification 3 | meta(name=item.name content=item.content) -------------------------------------------------------------------------------- /layout/includes/header/index.pug: -------------------------------------------------------------------------------- 1 | if !theme.disable_top_img && page.top_img !== false 2 | if is_post() 3 | - var top_img = page.top_img || page.cover || page.randomcover 4 | else if is_page() 5 | - var top_img = page.top_img || theme.default_top_img 6 | else if is_tag() 7 | - var top_img = theme.tag_per_img && theme.tag_per_img[page.tag] 8 | - top_img = top_img ? top_img : (theme.tag_img !== false ? theme.tag_img || theme.default_top_img : false) 9 | else if is_category() 10 | - var top_img = theme.category_per_img && theme.category_per_img[page.category] 11 | - top_img = top_img ? top_img : (theme.category_img !== false ? theme.category_img || theme.default_top_img : false) 12 | else if is_home() 13 | - var top_img = theme.index_img !== false ? theme.index_img || theme.default_top_img : false 14 | else if is_archive() 15 | - var top_img = theme.archive_img !== false ? theme.archive_img || theme.default_top_img : false 16 | else 17 | - var top_img = page.top_img || theme.default_top_img 18 | 19 | if top_img !== false 20 | - var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}` 21 | - var bg_img = top_img ? imgSource : '' 22 | - var site_title = is_archive() ? _p('page.archives') : page.title || page.tag || page.category || config.title 23 | - var isHomeClass = is_home() ? 'full_page' : 'not-home-page' 24 | - is_post() ? isHomeClass = 'post-bg' : isHomeClass 25 | if page.type === 'blog' 26 | - var isHomeClass = 'full_page' 27 | else 28 | - var isHomeClass = 'not-top-img' 29 | else 30 | - var top_img = false 31 | - var isHomeClass = 'not-top-img' 32 | 33 | header#page-header(class=isHomeClass style=bg_img) 34 | !=partial('includes/header/nav', {}, {cache: true}) 35 | if top_img !== false 36 | if is_post() 37 | include ./post-info.pug 38 | else if is_home() 39 | #site-info 40 | h1#site-title=site_title 41 | if theme.subtitle.enable 42 | - var loadSubJs = true 43 | #site-subtitle 44 | span#subtitle 45 | if(theme.social) 46 | #site_social_icons 47 | !=fragment_cache('social', function(){return partial('includes/header/social')}) 48 | else if page.type === 'blog' 49 | !=partial('includes/header/index_intro.pug', {}, {cache: true}) 50 | //- #scroll-down 51 | //- i.fas.fa-angle-down.scroll-down-effects 52 | else 53 | #page-site-info 54 | h1#site-title=site_title -------------------------------------------------------------------------------- /layout/includes/header/index_intro.pug: -------------------------------------------------------------------------------- 1 | 2 | script(type="text/javascript" src="https://static.sketchfab.com/api/sketchfab-viewer-1.10.1.js") 3 | #carousel 4 | .sketchfab-embed-wrapper(style="width: 100%;height: 100%") 5 | //- iframe(id="sketchfab-model" title="Gaming Guy Room" frameborder="0" allowfullscreen="" mozallowfullscreen="true" webkitallowfullscreen="true" allow="fullscreen; autoplay; vr" xr-spatial-tracking="xr-spatial-tracking" execution-while-out-of-viewport="execution-while-out-of-viewport" execution-while-not-rendered="execution-while-not-rendered" web-share="web-share" src="https://sketchfab.com/models/25e0e77ab56140be9fa6cb65cb4de96f/embed?autospin=0&autostart=1&preload=1" style="height: 1603.2px;") 6 | iframe(id="sketchfab-model" sandbox="allow-scripts allow-same-origin allow-popups allow-forms" title="Gaming Guy Room" frameborder="0" allowfullscreen="" mozallowfullscreen="true" webkitallowfullscreen="true" allow="fullscreen; autoplay; vr" xr-spatial-tracking="xr-spatial-tracking" execution-while-out-of-viewport="execution-while-out-of-viewport" execution-while-not-rendered="execution-while-not-rendered" web-share="web-share" src="" style="height: 1603.2px;") 7 | 8 | each content,page in theme.carousel_contents 9 | .carousel-box 10 | //- | !{content.bg_img} 11 | .site-hi Hi, I'm KP. 12 | .site-info 13 | .site-subtitle 14 | | !{content.subtitle} 15 | h1.site-title 16 | | !{content.title} 17 | a(onclick="plusSlides(1)") Next 18 | 19 | #carousel-indictors 20 | span.carousel-dot(onclick="currentSlide(1)") 21 | span.carousel-dot(onclick="currentSlide(2)") 22 | span.carousel-dot(onclick="currentSlide(3)") 23 | span.carousel-dot(onclick="currentSlide(4)") 24 | script(src="/blog-cn/js/carousel.js") 25 | != page.content 26 | 27 | //- script(data-pjax type='module' src="/blog-cn/js/threejs/unreal_bloom.js") 28 | 29 | -------------------------------------------------------------------------------- /layout/includes/header/menu_item.pug: -------------------------------------------------------------------------------- 1 | if theme.menu 2 | //- for mobile sidebar 3 | - let sidebarChildHide = theme.hide_sidebar_menu_child ? 'hide' : '' 4 | 5 | .menus_items 6 | each value, label in theme.menu 7 | if typeof value !== 'object' 8 | .menus_item 9 | a.site-page(href=url_for(trim(value.split('||')[0]))) 10 | if value.split('||')[1] 11 | i.fa-fw(class=trim(value.split('||')[1])) 12 | span=' ' 13 | else 14 | .menus_item 15 | a.site-page(href='javascript:void(0);') 16 | if label.split('||')[1] 17 | i.fa-fw(class=trim(label.split('||')[1])) 18 | span=' '+ trim(label.split('||')[0]) 19 | //- i.fas.fa-chevron-down.expand(class=sidebarChildHide) 20 | ul.menus_item_child 21 | each val,lab in value 22 | li 23 | a.site-page.child(href=url_for(trim(val.split('||')[0]))) 24 | if val.split('||')[1] 25 | i.fa-fw(class=trim(val.split('||')[1])) 26 | span=' '+ lab -------------------------------------------------------------------------------- /layout/includes/header/nav.pug: -------------------------------------------------------------------------------- 1 | nav#nav 2 | span#blog_name 3 | a(href=url_for('/home/')) 4 | if theme.logo.img 5 | img#site-logo(src= theme.logo.img) 6 | else 7 | img#site-logo(src='/blog-cn/img/kp-logo.png') 8 | #head-page-title 9 | if theme.logo.title 10 | a#page-name(href=url_for('/home/')) #[=theme.logo.title ]
11 | else 12 | a#page-name(href=url_for('/home/')) #[=config.title]
13 | a#site-slogan(href=url_for('/home/')) #[="HOME"] 14 | 15 | #menus 16 | if (theme.algolia_search.enable || theme.local_search.enable) 17 | #search-button 18 | a.site-page.social-icon.search 19 | i.fas.fa-search.fa-fw 20 | span=' '+_p('') 21 | !=partial('includes/header/menu_item', {}, {cache: true}) 22 | 23 | #toggle-menu 24 | a.site-page 25 | i.fas.fa-bars.fa-fw -------------------------------------------------------------------------------- /layout/includes/header/social.pug: -------------------------------------------------------------------------------- 1 | each url, icon in theme.social 2 | a.social-icon(href=url_for(trim(url.split('||')[0])) target="_blank" 3 | title=url.split('||')[1] === undefined ? '' : trim(url.split('||')[1])) 4 | i(class=icon) -------------------------------------------------------------------------------- /layout/includes/layout.pug: -------------------------------------------------------------------------------- 1 | - var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : '' 2 | - var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : '' 3 | - var pageType = is_post() ? 'post' : 'page' 4 | 5 | doctype html 6 | html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside) 7 | head 8 | include ./head.pug 9 | body 10 | if theme.preloader 11 | !=partial('includes/loading/loading', {}, {cache: true}) 12 | 13 | if theme.background 14 | #web_bg 15 | 16 | !=partial('includes/sidebar', {}, {cache: true}) 17 | if page.type !== '404' 18 | #body-wrap(class=pageType) 19 | include ./header/index.pug 20 | if page.type!=='blog' 21 | main#content-inner.layout(class=hideAside) 22 | if body 23 | div!= body 24 | else 25 | block content 26 | if theme.aside.enable && page.aside !== false 27 | include widget/index.pug 28 | 29 | - var footerBg = theme.footer_bg 30 | if (footerBg) 31 | if (footerBg === true) 32 | - var footer_bg = bg_img 33 | else 34 | - var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}` 35 | else 36 | - var footer_bg = '' 37 | 38 | footer#footer(style=footer_bg) 39 | !=partial('includes/footer', {}, {cache: true}) 40 | else 41 | include ./404.pug 42 | 43 | include ./rightside.pug 44 | !=partial('includes/third-party/search/index', {}, {cache: true}) 45 | include ./additional-js.pug -------------------------------------------------------------------------------- /layout/includes/loading/loading-js.pug: -------------------------------------------------------------------------------- 1 | script. 2 | var preloader = { 3 | endLoading: () => { 4 | document.body.style.overflow = 'auto'; 5 | document.getElementById('loading-box').classList.add("loaded") 6 | }, 7 | initLoading: () => { 8 | document.body.style.overflow = ''; 9 | document.getElementById('loading-box').classList.remove("loaded") 10 | 11 | } 12 | } 13 | window.addEventListener('load',preloader.endLoading()) -------------------------------------------------------------------------------- /layout/includes/loading/loading.pug: -------------------------------------------------------------------------------- 1 | #loading-box 2 | .loading-left-bg 3 | .loading-right-bg 4 | .spinner-box 5 | .configure-border-1 6 | .configure-core 7 | .configure-border-2 8 | .configure-core 9 | .loading-word= _p('loading') 10 | -------------------------------------------------------------------------------- /layout/includes/mixins/article-sort.pug: -------------------------------------------------------------------------------- 1 | mixin articleSort(posts) 2 | .article-sort 3 | - var year 4 | - posts.each(function (article) { 5 | - let tempYear = date(article.date, 'YYYY') 6 | - let no_cover = article.cover === false || !theme.cover.archives_enable ? 'no-article-cover' : '' 7 | - let title = article.title || _p('no_title') 8 | if tempYear !== year 9 | - year = tempYear 10 | .article-sort-item.year= year 11 | .article-sort-item(class=no_cover) 12 | if article.cover && theme.cover.archives_enable 13 | a.article-sort-item-img(href=url_for(article.path) title=title) 14 | img(src=url_for(article.cover) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`) 15 | .article-sort-item-info 16 | .article-sort-item-time 17 | i.far.fa-calendar-alt 18 | time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))= date(article.date, config.date_format) 19 | a.article-sort-item-title(href=url_for(article.path) title=title)= title 20 | - }) -------------------------------------------------------------------------------- /layout/includes/page/categories.pug: -------------------------------------------------------------------------------- 1 | != page.content 2 | .category-lists 3 | .category-title.is-center= _p('page.category') 4 | | - 5 | span.category-amount= site.categories.length 6 | div!= list_categories() 7 | 8 | .tag-cloud-list.is-center 9 | .tag-cloud-title.is-center= _p('page.tag') 10 | | - 11 | span.tag-cloud-amount= site.tags.length 12 | !=cloudTags({source: site.tags, minfontsize: 1, maxfontsize: 2, limit: 0, unit: 'em'}) 13 | 14 | 15 | -------------------------------------------------------------------------------- /layout/includes/page/default-page.pug: -------------------------------------------------------------------------------- 1 | #article-container 2 | //- if top_img === false 3 | //- h1.page-title= page.title 4 | != page.content -------------------------------------------------------------------------------- /layout/includes/page/flat.pug: -------------------------------------------------------------------------------- 1 | != page.content -------------------------------------------------------------------------------- /layout/includes/page/flink.pug: -------------------------------------------------------------------------------- 1 | #article-container 2 | if top_img === false 3 | h1.page-title= page.title 4 | 5 | .flink 6 | if site.data.link 7 | each i in site.data.link 8 | if i.class_name 9 | h2!= i.class_name 10 | if i.class_desc 11 | .flink-desc!=i.class_desc 12 | .flink-list 13 | each item in i.link_list 14 | .flink-list-item 15 | a(href=url_for(item.link) title=item.name target="_blank") 16 | img(src=url_for(item.avatar) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt=item.name ) 17 | span.flink-item-name= item.name 18 | span.flink-item-desc(title=item.descr)= item.descr 19 | != page.content 20 | 21 | -------------------------------------------------------------------------------- /layout/includes/page/tags.pug: -------------------------------------------------------------------------------- 1 | .tag-cloud-title.is-center= _p('page.tag') 2 | | - 3 | span.tag-cloud-amount= site.tags.length 4 | .tag-cloud-list.is-center 5 | !=cloudTags({source: site.tags, minfontsize: 1.2, maxfontsize: 4, limit: 0, color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'}) -------------------------------------------------------------------------------- /layout/includes/pagination.pug: -------------------------------------------------------------------------------- 1 | - 2 | var options = { 3 | prev_text: '', 4 | next_text: '', 5 | mid_size: 1, 6 | escape: false 7 | } 8 | 9 | if is_post() 10 | - let prev = theme.post_pagination === 1 ? page.prev : page.next 11 | - let next = theme.post_pagination === 1 ? page.next : page.prev 12 | nav#pagination.pagination-post 13 | if(prev) 14 | - var hasPageNext = next ? 'pull-left' : 'pull-full' 15 | .prev-post(class=hasPageNext) 16 | - var pagination_cover = prev.cover === false ? prev.randomcover : prev.cover 17 | a(href=url_for(prev.path)) 18 | img.prev-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of previous post') 19 | .pagination-info 20 | .label=_p('pagination.prev') 21 | .prev_info=prev.title 22 | 23 | if(next) 24 | - var hasPagePrev = prev ? 'pull-right' : 'pull-full' 25 | - var pagination_cover = next.cover == false ? next.randomcover : next.cover 26 | .next-post(class=hasPagePrev) 27 | a(href=url_for(next.path)) 28 | img.next-cover(src=url_for(pagination_cover) onerror=`onerror=null;src='${url_for(theme.error_img.post_page)}'` alt='cover of next post') 29 | .pagination-info 30 | .label=_p('pagination.next') 31 | .next_info=next.title 32 | else 33 | nav#pagination 34 | .pagination 35 | if is_home() 36 | - options.format = 'page/%d/#content-inner' 37 | !=paginator(options) -------------------------------------------------------------------------------- /layout/includes/post/post-copyright.pug: -------------------------------------------------------------------------------- 1 | if theme.post_copyright.enable && page.copyright !== false 2 | - let author = page.copyright_author ? page.copyright_author : config.author 3 | - let authorHref = page.copyright_author_href ? page.copyright_author_href : `mailto:${config.email}` 4 | - let url = page.copyright_url ? page.copyright_url : page.permalink 5 | - let info = page.copyright_info ? page.copyright_info : _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title) 6 | .post-copyright 7 | .post-copyright__author 8 | span.post-copyright-meta= _p('post.copyright.author') + ": " 9 | span.post-copyright-info 10 | a(href=authorHref)=author 11 | .post-copyright__type 12 | span.post-copyright-meta= _p('post.copyright.link') + ": " 13 | span.post-copyright-info 14 | a(href=url_for(url))= theme.post_copyright.decode ? decodeURI(url) : url 15 | .post-copyright__notice 16 | span.post-copyright-meta= _p('post.copyright.copyright_notice') + ": " 17 | span.post-copyright-info!= info 18 | -------------------------------------------------------------------------------- /layout/includes/post/reward.pug: -------------------------------------------------------------------------------- 1 | .post-reward 2 | .reward-button.button--animated 3 | i.fas.fa-qrcode 4 | = ' ' + _p('donate') 5 | .reward-main 6 | ul.reward-all 7 | each item in theme.reward.QR_code 8 | - var clickTo = item.link ? item.link : item.img 9 | li.reward-item 10 | a(href=url_for(clickTo) target='_blank') 11 | img.post-qr-code-img(src=url_for(item.img) alt=item.text) 12 | .post-qr-code-desc=item.text 13 | 14 | -------------------------------------------------------------------------------- /layout/includes/rightside.pug: -------------------------------------------------------------------------------- 1 | #rightside 2 | #rightside-config-hide 3 | if is_post() && theme.readmode 4 | button#readmode(type="button" title=_p('rightside.readmode_title')) 5 | i.fas.fa-book-open 6 | if theme.change_font_size 7 | button#font-plus(type="button" title=_p('rightside.font_plus_title')) 8 | i.fas.fa-plus 9 | button#font-minus(type="button" title=_p('rightside.font_minus_title')) 10 | i.fas.fa-minus 11 | if theme.translate.enable 12 | button#translateLink(type="button" title=_p('rightside.translate_title'))= theme.translate.default 13 | if theme.darkmode.enable && theme.darkmode.button 14 | button#darkmode(type="button" title=_p('rightside.night_mode_title')) 15 | i.fas.fa-moon 16 | if theme.aside.enable && theme.aside.button && page.aside !== false 17 | button#hide-aside-btn(type="button" title=_p('rightside.aside')) 18 | i.fas.fa-arrows-alt-h 19 | if theme.chat_btn 20 | button#chat_btn(type="button" title=_p("rightside.chat_btn")) 21 | i.fas.fa-comment 22 | button(type="button") 23 | a(href="https://zkpeace.com/blog-en/home" style="font-size: 10px") EN 24 | #rightside-config-show 25 | if is_post() 26 | if (theme.readmode || theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button) || theme.change_font_size) 27 | button#rightside_config(type="button" title=_p("rightside.setting")) 28 | i.fas.fa-cog.fa-spin 29 | if showToc 30 | button#mobile-toc-button.close(type="button" title=_p("rightside.toc")) 31 | i.fas.fa-list-ul 32 | else if theme.translate.enable || (theme.darkmode.enable && theme.darkmode.button) || theme.change_font_size || theme.music.enable 33 | button#rightside_config(type="button" title=_p("rightside.setting")) 34 | i.fas.fa-cog 35 | button#background-music(type="button" onclick="bgMusic()" title=_p("rightside.music")) 36 | //- if theme.chat_btn 37 | //- button#chat_btn(type="button" title=_p("rightside.chat_btn")) 38 | //- i.fas.fa-comment 39 | if commentsJsLoad 40 | a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment")) 41 | i.fas.fa-comments 42 | button#go-up(type="button" title=_p("rightside.back_to_top")) 43 | i.fas.fa-arrow-up -------------------------------------------------------------------------------- /layout/includes/sidebar.pug: -------------------------------------------------------------------------------- 1 | #sidebar 2 | #menu-mask 3 | #sidebar-menus 4 | //- .author-avatar 5 | //- if theme.lazyload.enable 6 | //- img.avatar-img(data-lazy-src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar") 7 | //- else 8 | //- img.avatar-img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar") 9 | //- .site-data 10 | //- if site.posts.length 11 | //- .data-item.is-center 12 | //- .data-item-link 13 | //- a(href=url_for(config.archive_dir) + '/') 14 | //- .headline= _p('aside.articles') 15 | //- .length-num= site.posts.length 16 | 17 | //- if site.tags.length 18 | //- .data-item.is-center 19 | //- .data-item-link 20 | //- a(href=url_for(config.tag_dir) + '/' ) 21 | //- .headline= _p('aside.tags') 22 | //- .length-num= site.tags.length 23 | 24 | //- if site.categories.length 25 | //- .data-item.is-center 26 | //- .data-item-link 27 | //- a(href=url_for(config.category_dir) + '/') 28 | //- .headline= _p('aside.categories') 29 | //- .length-num= site.categories.length 30 | //- hr 31 | !=partial('includes/header/menu_item', {}, {cache: true}) 32 | -------------------------------------------------------------------------------- /layout/includes/third-party/aplayer.pug: -------------------------------------------------------------------------------- 1 | link(rel='stylesheet' href=url_for(theme.CDN.aplayer_css) media="print" onload="this.media='all'") 2 | script(src=url_for(theme.CDN.aplayer_js)) 3 | script(src=url_for(theme.CDN.meting_js)) -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/disqus.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (() => { 3 | const getCount = () => { 4 | if (window.DISQUSWIDGETS === undefined) { 5 | var d = document, s = d.createElement('script'); 6 | s.src = 'https://!{theme.disqus.shortname}.disqus.com/count.js'; 7 | s.id = 'dsq-count-scr'; 8 | (d.head || d.body).appendChild(s); 9 | } else { 10 | DISQUSWIDGETS.getCount({reset: true}); 11 | } 12 | } 13 | 14 | window.pjax ? getCount() : window.addEventListener('load', getCount) 15 | 16 | })() 17 | -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/fb.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (()=>{ 3 | function loadFBComment () { 4 | if (typeof FB === 'object') FB.XFBML.parse() 5 | else { 6 | let ele = document.createElement('script') 7 | ele.setAttribute('src','https://connect.facebook.net/!{theme.facebook_comments.lang}/sdk.js#xfbml=1&version=v9.0') 8 | ele.setAttribute('async', 'true') 9 | ele.setAttribute('defer', 'true') 10 | ele.setAttribute('crossorigin', 'anonymous') 11 | document.body.appendChild(ele) 12 | } 13 | } 14 | window.pjax ? loadFBComment() : window.addEventListener('load', loadFBComment) 15 | })() 16 | -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/index.pug: -------------------------------------------------------------------------------- 1 | case theme.comments.use[0] 2 | when 'Twikoo' 3 | include ./twikoo.pug 4 | when 'Disqus' 5 | when 'Disqusjs' 6 | include ./disqus.pug 7 | when 'Valine' 8 | include ./valine.pug 9 | when 'Waline' 10 | include ./waline.pug 11 | when 'Facebook Comments' 12 | include ./fb.pug -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/twikoo.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (() => { 3 | const getCommentUrl = () => { 4 | const eleGroup = document.querySelectorAll('#recent-posts .article-title') 5 | let urlArray = [] 6 | eleGroup.forEach(i=>{ 7 | urlArray.push(i.getAttribute('href')) 8 | }) 9 | return urlArray 10 | } 11 | 12 | const getCount = () => { 13 | const runTwikoo = () => { 14 | twikoo.getCommentsCount({ 15 | envId: '!{theme.twikoo.envId}', 16 | region: '!{theme.twikoo.region}', 17 | urls: getCommentUrl(), 18 | includeReply: false 19 | }).then(function (res) { 20 | document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => { 21 | item.innerText = res[index].count 22 | }) 23 | }).catch(function (err) { 24 | console.log(err) 25 | }) 26 | } 27 | 28 | if (typeof twikoo === 'object') { 29 | runTwikoo() 30 | } else { 31 | getScript('!{theme.CDN.twikoo}').then(runTwikoo) 32 | } 33 | } 34 | 35 | window.pjax ? getCount() : window.addEventListener('load', getCount) 36 | 37 | })() -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/valine.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (() => { 3 | function loadValine () { 4 | function initValine () { 5 | let initData = { 6 | el: '#vcomment', 7 | appId: '#{theme.valine.appId}', 8 | appKey: '#{theme.valine.appKey}', 9 | } 10 | 11 | const valine = new Valine(initData) 12 | } 13 | 14 | if (typeof Valine === 'function') initValine() 15 | else getScript('!{url_for(theme.CDN.valine)}').then(initValine) 16 | } 17 | 18 | window.pjax ? loadValine() : window.addEventListener('load', loadValine) 19 | })() 20 | -------------------------------------------------------------------------------- /layout/includes/third-party/card-post-count/waline.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (() => { 3 | function loadWaline () { 4 | function initWaline () { 5 | let initData = { 6 | el: '#waline-wrap', 7 | serverURL: '!{theme.waline.serverURL}', 8 | } 9 | 10 | const waline = new Waline(initData) 11 | } 12 | 13 | if (typeof Waline === 'function') initWaline() 14 | else getScript('!{url_for(theme.CDN.waline)}').then(initWaline) 15 | } 16 | 17 | window.pjax ? loadWaline() : window.addEventListener('load', loadWaline) 18 | })() 19 | -------------------------------------------------------------------------------- /layout/includes/third-party/chat/chatra.pug: -------------------------------------------------------------------------------- 1 | //- https://chatra.io/help/api/ 2 | script. 3 | (function(d, w, c) { 4 | w.ChatraID = '#{theme.chatra.id}'; 5 | var s = d.createElement('script'); 6 | w[c] = w[c] || function() { 7 | (w[c].q = w[c].q || []).push(arguments); 8 | }; 9 | s.async = true; 10 | s.src = 'https://call.chatra.io/chatra.js'; 11 | if (d.head) d.head.appendChild(s); 12 | })(document, window, 'Chatra'); 13 | 14 | if (!{theme.chat_btn}) { 15 | var chatBtnFn = () => { 16 | var chatBtn = document.getElementById("chat_btn") 17 | chatBtn.addEventListener("click", function(){ 18 | Chatra('openChat') 19 | }); 20 | } 21 | chatBtnFn() 22 | } else { 23 | if (!{theme.chat_hide_show}) { 24 | function chatBtnHide () { 25 | Chatra('hide') 26 | } 27 | function chatBtnShow () { 28 | Chatra('show') 29 | } 30 | } 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /layout/includes/third-party/chat/crisp.pug: -------------------------------------------------------------------------------- 1 | script. 2 | window.$crisp = []; 3 | window.CRISP_WEBSITE_ID = "!{theme.crisp.website_id}"; 4 | (function () { 5 | d = document; 6 | s = d.createElement("script"); 7 | s.src = "https://client.crisp.chat/l.js"; 8 | s.async = 1; 9 | d.getElementsByTagName("head")[0].appendChild(s); 10 | })(); 11 | $crisp.push(["safe", true]) 12 | 13 | if (!{theme.chat_btn}) { 14 | $crisp.push(["do", "chat:hide"]) 15 | $crisp.push(["on", "chat:closed", function() { 16 | $crisp.push(["do", "chat:hide"]) 17 | }]) 18 | var chatBtnFn = () => { 19 | var chatBtn = document.getElementById("chat_btn") 20 | chatBtn.addEventListener("click", function(){ 21 | $crisp.push(["do", "chat:show"]) 22 | $crisp.push(["do", "chat:open"]) 23 | 24 | }); 25 | } 26 | chatBtnFn() 27 | } else { 28 | if (!{theme.chat_hide_show}) { 29 | function chatBtnHide () { 30 | $crisp.push(["do", "chat:hide"]) 31 | } 32 | function chatBtnShow () { 33 | $crisp.push(["do", "chat:show"]) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /layout/includes/third-party/chat/daovoice.pug: -------------------------------------------------------------------------------- 1 | //- https://guide.daocloud.io/daovoice/javascript-api-5869833.html 2 | script. 3 | (function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/!{theme.daovoice.app_id}.js","daovoice") 4 | 5 | script. 6 | var isChatBtn = !{theme.chat_btn} 7 | daovoice('init', { 8 | app_id: '!{theme.daovoice.app_id}',},{ 9 | launcher: { 10 | disableLauncherIcon: isChatBtn // 悬浮 ICON 是否显示 11 | }, 12 | }); 13 | daovoice('update'); 14 | 15 | if (isChatBtn) { 16 | var chatBtnFn = () => { 17 | var chatBtn = document.getElementById("chat_btn") 18 | chatBtn.addEventListener("click", function(){ 19 | daovoice('show') 20 | }); 21 | } 22 | chatBtnFn() 23 | } else { 24 | if (!{theme.chat_hide_show}) { 25 | function chatBtnHide () { 26 | daovoice('update', {},{ 27 | launcher: { 28 | disableLauncherIcon: true // 悬浮 ICON 是否显示 29 | }, 30 | }); 31 | } 32 | function chatBtnShow () { 33 | daovoice('update', {},{ 34 | launcher: { 35 | disableLauncherIcon: false // 悬浮 ICON 是否显示 36 | }, 37 | }); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /layout/includes/third-party/chat/gitter.pug: -------------------------------------------------------------------------------- 1 | if theme.chat_btn 2 | script. 3 | ((window.gitter = {}).chat = {}).options = { 4 | disableDefaultChat: true, 5 | }; 6 | document.addEventListener('gitter-sidecar-ready', (e) => { 7 | const GitterChat = e.detail.Chat 8 | let chat 9 | 10 | function initGitter () { 11 | chat = new GitterChat({ 12 | room: '#{theme.gitter.room}', 13 | activationElement: '#chat_btn' 14 | }); 15 | } 16 | 17 | initGitter() 18 | 19 | if (!{theme.pjax.enable}) { 20 | document.addEventListener('pjax:complete', () => { 21 | chat.destroy() 22 | initGitter() 23 | }) 24 | } 25 | 26 | }) 27 | else 28 | script. 29 | ((window.gitter = {}).chat = {}).options = { 30 | room: '#{theme.gitter.room}', 31 | }; 32 | 33 | if (!{theme.chat_hide_show}) { 34 | function chatBtnHide () { 35 | document.getElementsByClassName('gitter-open-chat-button')[0].style.display= 'none' 36 | } 37 | 38 | function chatBtnShow () { 39 | document.getElementsByClassName('gitter-open-chat-button')[0].style.display= 'block' 40 | } 41 | } 42 | 43 | script(src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer) 44 | -------------------------------------------------------------------------------- /layout/includes/third-party/chat/index.pug: -------------------------------------------------------------------------------- 1 | if theme.chatra && theme.chatra.enable 2 | include ./chatra.pug 3 | else if theme.tidio && theme.tidio.enable 4 | include ./tidio.pug 5 | else if theme.daovoice && theme.daovoice.enable 6 | include ./daovoice.pug 7 | else if theme.gitter && theme.gitter.enable 8 | include ./gitter.pug 9 | else if theme.crisp && theme.crisp.enable 10 | include ./crisp.pug -------------------------------------------------------------------------------- /layout/includes/third-party/chat/tidio.pug: -------------------------------------------------------------------------------- 1 | script(src=`//code.tidio.co/${theme.tidio.public_key}.js` async) 2 | 3 | if theme.chat_btn 4 | script. 5 | function onTidioChatApiReady() { 6 | window.tidioChatApi.hide(); 7 | window.tidioChatApi.on("close", function() { 8 | window.tidioChatApi.hide(); 9 | }); 10 | } 11 | if (window.tidioChatApi) { 12 | window.tidioChatApi.on("ready", onTidioChatApiReady); 13 | } else { 14 | document.addEventListener("tidioChat-ready", onTidioChatApiReady); 15 | } 16 | 17 | var chatBtnFn = () => { 18 | document.getElementById("chat_btn").addEventListener("click", function(){ 19 | window.tidioChatApi.show(); 20 | window.tidioChatApi.open(); 21 | }); 22 | } 23 | chatBtnFn() 24 | 25 | else if theme.chat_hide_show 26 | script. 27 | function chatBtnHide () { 28 | if (window.tidioChatApi) { 29 | //- window.tidioChatApi.hide(); 30 | document.getElementById('tidio-chat').style.display= 'none' 31 | } 32 | } 33 | 34 | function chatBtnShow () { 35 | if (window.tidioChatApi) { 36 | //- window.tidioChatApi.show(); 37 | document.getElementById('tidio-chat').style.display= 'block' 38 | } 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/disqus.pug: -------------------------------------------------------------------------------- 1 | - let disqusPageTitle = page.title.replace(/'/ig,"\\'") 2 | 3 | script. 4 | function loadDisqus () { 5 | var disqus_config = function () { 6 | this.page.url = '!{ page.permalink }' 7 | this.page.identifier = '!{ page.path }' 8 | this.page.title = '!{ disqusPageTitle }' 9 | }; 10 | 11 | window.disqusReset = () => { 12 | DISQUS.reset({ 13 | reload: true, 14 | config: disqus_config 15 | }) 16 | } 17 | 18 | if (window.DISQUS) disqusReset() 19 | else { 20 | (function() { 21 | var d = document, s = d.createElement('script'); 22 | s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js'; 23 | s.setAttribute('data-timestamp', +new Date()); 24 | (d.head || d.body).appendChild(s); 25 | })(); 26 | } 27 | } 28 | 29 | if ('!{theme.comments.use[0]}' === 'Disqus' || !!{theme.comments.lazyload}) { 30 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('disqus_thread'), loadDisqus) 31 | else loadDisqus() 32 | } else { 33 | function loadOtherComment () { 34 | loadDisqus() 35 | } 36 | } 37 | 38 | if is_post() && !theme.comments.lazyload && theme.comments.count && theme.comments.use[0] === 'Disqus' 39 | script. 40 | if (window.DISQUSWIDGETS === undefined) { 41 | var d = document, s = d.createElement('script'); 42 | s.src = 'https://!{theme.disqus.shortname}.disqus.com/count.js'; 43 | s.id = 'dsq-count-scr'; 44 | (d.head || d.body).appendChild(s); 45 | } else { 46 | DISQUSWIDGETS.getCount({reset: true}); 47 | } 48 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/disqusjs.pug: -------------------------------------------------------------------------------- 1 | - let disqusjsApi = theme.disqusjs.api || 'https://disqus.skk.moe/disqus/' 2 | - let disqusjsPageTitle = page.title.replace(/'/ig,"\\'") 3 | 4 | script. 5 | function loadDisqusjs () { 6 | function addDisqusjsCSS () { 7 | const ele = document.createElement('link') 8 | ele.rel = 'stylesheet' 9 | ele.href= '!{url_for(theme.CDN.disqusjs_css)}' 10 | document.getElementsByTagName('head')[0].appendChild(ele) 11 | } 12 | 13 | function initDisqusjs () { 14 | window.DISQUS = null 15 | new DisqusJS({ 16 | shortname: '!{theme.disqusjs.shortname}', 17 | siteName: '!{theme.disqusjs.siteName}', 18 | identifier: '!{ page.path }', 19 | url: '!{ page.permalink }', 20 | title: '!{ disqusjsPageTitle }', 21 | api: '!{disqusjsApi}', 22 | apikey: '!{theme.disqusjs.apikey}', 23 | nocomment: '!{theme.disqusjs.nocomment}', 24 | admin: '!{theme.disqusjs.admin}', 25 | adminLabel: '!{theme.disqusjs.adminLabel}' 26 | }); 27 | } 28 | 29 | window.disqusReset = initDisqusjs 30 | 31 | if (window.disqusJsLoad) initDisqusjs() 32 | else { 33 | addDisqusjsCSS() 34 | getScript('!{url_for(theme.CDN.disqusjs)}').then(initDisqusjs) 35 | window.disqusJsLoad = true 36 | } 37 | } 38 | 39 | if ('!{theme.comments.use[0]}' === 'Disqusjs' || !!{theme.comments.lazyload}) { 40 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('disqus_thread'), loadDisqusjs) 41 | else loadDisqusjs() 42 | } 43 | else { 44 | function loadOtherComment () { 45 | loadDisqusjs() 46 | } 47 | } 48 | 49 | 50 | if is_post() && !theme.comments.lazyload && theme.comments.count && theme.comments.use[0] === 'Disqusjs' 51 | script. 52 | if (window.DISQUSWIDGETS === undefined) { 53 | var d = document, s = d.createElement('script'); 54 | s.src = 'https://!{theme.disqus.shortname}.disqus.com/count.js'; 55 | s.id = 'dsq-count-scr'; 56 | (d.head || d.body).appendChild(s); 57 | } else { 58 | DISQUSWIDGETS.getCount({reset: true}); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/facebook_comments.pug: -------------------------------------------------------------------------------- 1 | #fb-root 2 | script. 3 | function loadFBComment () { 4 | var themeNow = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light' 5 | document.getElementsByClassName('fb-comments')[0].setAttribute('data-colorscheme',themeNow) 6 | 7 | if (typeof FB === 'object') FB.XFBML.parse() 8 | else { 9 | let ele = document.createElement('script') 10 | ele.setAttribute('src','https://connect.facebook.net/!{theme.facebook_comments.lang}/sdk.js#xfbml=1&version=v9.0') 11 | ele.setAttribute('async', 'true') 12 | ele.setAttribute('defer', 'true') 13 | ele.setAttribute('crossorigin', 'anonymous') 14 | document.getElementById('fb-root').insertAdjacentElement('afterbegin',ele) 15 | } 16 | } 17 | 18 | if ('!{theme.comments.use[0]}' === 'Facebook Comments' || !!{theme.comments.lazyload}) { 19 | if (!{theme.comments.lazyload}) btf.loadComment(document.querySelector('#post-comment .fb-comments'), loadFBComment) 20 | else loadFBComment() 21 | } else { 22 | function loadOtherComment () { 23 | loadFBComment() 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/gitalk.pug: -------------------------------------------------------------------------------- 1 | script. 2 | function addGitalkSource () { 3 | const ele = document.createElement('link') 4 | ele.rel = 'stylesheet' 5 | ele.href= '!{url_for(theme.CDN.gitalk_css)}' 6 | document.getElementsByTagName('head')[0].appendChild(ele) 7 | } 8 | 9 | function loadGitalk () { 10 | function initGitalk () { 11 | var gitalk = new Gitalk(Object.assign({ 12 | clientID: '!{theme.gitalk.client_id}', 13 | clientSecret: '!{theme.gitalk.client_secret}', 14 | repo: '!{theme.gitalk.repo}', 15 | owner: '!{theme.gitalk.owner}', 16 | admin: ['!{theme.gitalk.admin}'], 17 | id: '!{md5(page.path)}', 18 | language: '!{theme.gitalk.language}', 19 | perPage: !{theme.gitalk.perPage}, 20 | distractionFreeMode: !{theme.gitalk.distractionFreeMode}, 21 | pagerDirection: '!{theme.gitalk.pagerDirection}', 22 | createIssueManually: !{theme.gitalk.createIssueManually}, 23 | updateCountCallback: commentCount 24 | },!{JSON.stringify(theme.gitalk.option)})) 25 | 26 | gitalk.render('gitalk-container') 27 | } 28 | 29 | if (typeof Gitalk === 'function') initGitalk() 30 | else { 31 | addGitalkSource() 32 | getScript('!{url_for(theme.CDN.gitalk)}').then(initGitalk) 33 | } 34 | } 35 | 36 | function commentCount(n){ 37 | let isCommentCount = document.querySelector('#post-meta .gitalk-comment-count') 38 | if (isCommentCount) { 39 | isCommentCount.innerHTML= n 40 | } 41 | } 42 | 43 | if ('!{theme.comments.use[0]}' === 'Gitalk' || !!{theme.comments.lazyload}) { 44 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk) 45 | else loadGitalk() 46 | } else { 47 | function loadOtherComment () { 48 | loadGitalk() 49 | } 50 | } 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/index.pug: -------------------------------------------------------------------------------- 1 | - let defaultComment = theme.comments.use[0] 2 | br 3 | br 4 | #post-comment 5 | 6 | if page.type !=='weibo' 7 | .comment-head 8 | .comment-headline 9 | i.fas.fa-comments.fa-fw 10 | span= ' ' + _p('comment') 11 | 12 | if theme.comments.use.length > 1 13 | #comment-switch 14 | span.first-comment=defaultComment 15 | span.switch-btn 16 | span.second-comment=theme.comments.use[1] 17 | 18 | .comment-wrap 19 | each name in theme.comments.use 20 | div 21 | case name 22 | when 'Disqus' 23 | #disqus_thread 24 | when 'Valine' 25 | #vcomment.vcomment 26 | when 'Disqusjs' 27 | #disqus_thread 28 | when 'Livere' 29 | #lv-container(data-id="city" data-uid=theme.livere.uid) 30 | when 'Gitalk' 31 | #gitalk-container 32 | when 'Utterances' 33 | #utterances-wrap 34 | when 'Twikoo' 35 | #twikoo-wrap 36 | when 'Waline' 37 | #waline-wrap 38 | when 'Facebook Comments' 39 | .fb-comments(data-colorscheme = theme.display_mode === 'dark' ? 'dark' : 'light' 40 | data-numposts= theme.facebook_comments.pageSize || 10 41 | data-order-by= theme.facebook_comments.order_by || 'social' 42 | data-width="100%") 43 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/js.pug: -------------------------------------------------------------------------------- 1 | each name in theme.comments.use 2 | case name 3 | when 'Valine' 4 | !=partial('includes/third-party/comments/valine', {}, {cache: true}) 5 | when 'Disqus' 6 | include ./disqus.pug 7 | when 'Disqusjs' 8 | include ./disqusjs.pug 9 | when 'Livere' 10 | !=partial('includes/third-party/comments/livere', {}, {cache: true}) 11 | when 'Gitalk' 12 | include ./gitalk.pug 13 | when 'Utterances' 14 | !=partial('includes/third-party/comments/utterances', {}, {cache: true}) 15 | when 'Twikoo' 16 | !=partial('includes/third-party/comments/twikoo', {}, {cache: true}) 17 | when 'Waline' 18 | !=partial('includes/third-party/comments/waline', {}, {cache: true}) 19 | when 'Facebook Comments' 20 | !=partial('includes/third-party/comments/facebook_comments', {}, {cache: true}) 21 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/livere.pug: -------------------------------------------------------------------------------- 1 | script. 2 | function loadLivere () { 3 | if (typeof LivereTower === 'object') { 4 | window.LivereTower.init() 5 | } 6 | else { 7 | (function(d, s) { 8 | var j, e = d.getElementsByTagName(s)[0]; 9 | if (typeof LivereTower === 'function') { return; } 10 | j = d.createElement(s); 11 | j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; 12 | j.async = true; 13 | e.parentNode.insertBefore(j, e); 14 | })(document, 'script'); 15 | } 16 | } 17 | 18 | if ('!{theme.comments.use[0]}' === 'Livere' || !!{theme.comments.lazyload}) { 19 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('lv-container'), loadLivere) 20 | else loadLivere() 21 | } 22 | else { 23 | function loadOtherComment () { 24 | loadLivere() 25 | } 26 | } -------------------------------------------------------------------------------- /layout/includes/third-party/comments/twikoo.pug: -------------------------------------------------------------------------------- 1 | script. 2 | (()=>{ 3 | const $countDom = document.getElementById('twikoo-count') 4 | const init = () => { 5 | twikoo.init(Object.assign({ 6 | el: '#twikoo-wrap', 7 | envId: '!{theme.twikoo.envId}', 8 | region: '!{theme.twikoo.region}' 9 | }, !{JSON.stringify(theme.twikoo.option)})) 10 | } 11 | 12 | const getCount = () => { 13 | twikoo.getCommentsCount({ 14 | envId: '!{theme.twikoo.envId}', 15 | region: '!{theme.twikoo.region}', 16 | urls: [window.location.pathname], 17 | includeReply: false 18 | }).then(function (res) { 19 | $countDom.innerText = res[0].count 20 | }).catch(function (err) { 21 | console.error(err); 22 | }); 23 | } 24 | 25 | const loadTwikoo = (bool = false) => { 26 | if (typeof twikoo === 'object') { 27 | init() 28 | bool && $countDom && setTimeout(getCount,0) 29 | } else { 30 | getScript('!{theme.CDN.twikoo}').then(()=> { 31 | init() 32 | bool && $countDom && setTimeout(getCount,0) 33 | }) 34 | } 35 | } 36 | 37 | if ('!{theme.comments.use[0]}' === 'Twikoo' || !!{theme.comments.lazyload}) { 38 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo) 39 | else loadTwikoo(true) 40 | } else { 41 | window.loadOtherComment = () => { 42 | loadTwikoo() 43 | } 44 | } 45 | })() -------------------------------------------------------------------------------- /layout/includes/third-party/comments/utterances.pug: -------------------------------------------------------------------------------- 1 | script. 2 | function loadUtterances () { 3 | let ele = document.createElement('script') 4 | ele.setAttribute('id', 'utterances_comment') 5 | ele.setAttribute('src', '!{url_for(theme.CDN.utterances)}') 6 | ele.setAttribute('repo', '!{theme.utterances.repo}') 7 | ele.setAttribute('issue-term', '!{theme.utterances.issue_term}') 8 | let nowTheme = document.documentElement.getAttribute('data-theme') === 'dark' ? '#{theme.utterances.dark_theme}' : '#{theme.utterances.light_theme}' 9 | ele.setAttribute('theme', nowTheme) 10 | ele.setAttribute('crossorigin', 'anonymous') 11 | ele.setAttribute('async', 'true') 12 | document.getElementById('utterances-wrap').insertAdjacentElement('afterbegin',ele) 13 | } 14 | 15 | function utterancesTheme () { 16 | if (document.querySelector('.utterances-frame')) { 17 | const theme = document.documentElement.getAttribute('data-theme') === 'dark' ? '#{theme.utterances.dark_theme}' : '#{theme.utterances.light_theme}' 18 | const message = { 19 | type: 'set-theme', 20 | theme: theme 21 | }; 22 | const iframe = document.querySelector('.utterances-frame'); 23 | iframe.contentWindow.postMessage(message, 'https://utteranc.es'); 24 | } 25 | } 26 | 27 | if ('!{theme.comments.use[0]}' === 'Utterances' || !!{theme.comments.lazyload}) { 28 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('utterances-wrap'), loadUtterances) 29 | else loadUtterances() 30 | } else { 31 | function loadOtherComment () { 32 | loadUtterances() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/valine.pug: -------------------------------------------------------------------------------- 1 | - let emojiMaps = '""' 2 | if site.data.valine 3 | - emojiMaps = JSON.stringify(site.data.valine) 4 | 5 | script. 6 | function loadValine () { 7 | function initValine () { 8 | const valine = new Valine(Object.assign({ 9 | el: '#vcomment', 10 | appId: '#{theme.valine.appId}', 11 | appKey: '#{theme.valine.appKey}', 12 | placeholder: '#{theme.valine.placeholder}', 13 | avatar: '#{theme.valine.avatar}', 14 | meta: '#{theme.valine.guest_info }'.split(','), 15 | pageSize: '#{theme.valine.pageSize}', 16 | lang: '#{theme.valine.lang}', 17 | recordIP: #{theme.valine.recordIP}, 18 | serverURLs: '#{theme.valine.serverURLs}', 19 | emojiCDN: '#{theme.valine.emojiCDN}', 20 | emojiMaps: !{emojiMaps}, 21 | enableQQ: #{theme.valine.enableQQ}, 22 | path: window.location.pathname, 23 | requiredFields: [!{theme.valine.requiredFields ? JSON.stringify(theme.valine.requiredFields).split(',') : ''}], 24 | visitor: #{theme.valine.visitor} 25 | }, !{JSON.stringify(theme.valine.option)})) 26 | } 27 | 28 | if (typeof Valine === 'function') initValine() 29 | else getScript('!{url_for(theme.CDN.valine)}').then(initValine) 30 | } 31 | 32 | if ('!{theme.comments.use[0]}' === 'Valine' || !!{theme.comments.lazyload}) { 33 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('vcomment'),loadValine) 34 | else setTimeout(loadValine, 0) 35 | } else { 36 | function loadOtherComment () { 37 | loadValine() 38 | } 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /layout/includes/third-party/comments/waline.pug: -------------------------------------------------------------------------------- 1 | - let emojiMaps = '""' 2 | if site.data.waline 3 | - emojiMaps = JSON.stringify(site.data.waline) 4 | 5 | script. 6 | function loadWaline () { 7 | function initWaline () { 8 | const waline = new Waline(Object.assign({ 9 | el: '#waline-wrap', 10 | serverURL: '!{theme.waline.serverURL}', 11 | avatar: '#{theme.waline.avatar}', 12 | path: location.pathname, 13 | emojiCDN: '#{theme.waline.emojiCDN}', 14 | emojiMaps: !{emojiMaps}, 15 | visitor: #{theme.waline.visitor}, 16 | dark: '[data-theme="dark"]' 17 | }, !{JSON.stringify(theme.waline.option)})) 18 | } 19 | 20 | if (typeof Waline === 'function') initWaline() 21 | else getScript('!{url_for(theme.CDN.waline)}').then(initWaline) 22 | } 23 | 24 | if ('!{theme.comments.use[0]}' === 'Waline' || !!{theme.comments.lazyload}) { 25 | if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('waline-wrap'),loadWaline) 26 | else setTimeout(loadWaline, 0) 27 | } else { 28 | function loadOtherComment () { 29 | loadWaline() 30 | } 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /layout/includes/third-party/effect.pug: -------------------------------------------------------------------------------- 1 | if theme.fireworks && theme.fireworks.enable 2 | canvas.fireworks(mobile=`${theme.fireworks.mobile}`) 3 | script(src=url_for(theme.CDN.fireworks)) 4 | 5 | if (theme.canvas_ribbon && theme.canvas_ribbon.enable) 6 | script(defer id="ribbon" src=url_for(theme.CDN.canvas_ribbon) size=theme.canvas_ribbon.size 7 | alpha=theme.canvas_ribbon.alpha zIndex=theme.canvas_ribbon.zIndex mobile=`${theme.canvas_ribbon.mobile}` data-click=`${theme.canvas_ribbon.click_to_change}`) 8 | 9 | if (theme.canvas_fluttering_ribbon && theme.canvas_fluttering_ribbon.enable) 10 | script(defer id="fluttering_ribbon" mobile=`${theme.canvas_fluttering_ribbon.mobile}` src=url_for(theme.CDN.canvas_fluttering_ribbon)) 11 | 12 | if (theme.canvas_nest && theme.canvas_nest.enable) 13 | script#canvas_nest(defer color=theme.canvas_nest.color opacity=theme.canvas_nest.opacity zIndex=theme.canvas_nest.zIndex count=theme.canvas_nest.count mobile=`${theme.canvas_nest.mobile}` src=url_for(theme.CDN.canvas_nest)) 14 | 15 | if theme.activate_power_mode.enable 16 | script(src=url_for(theme.CDN.activate_power_mode)) 17 | script. 18 | POWERMODE.colorful = !{theme.activate_power_mode.colorful}; 19 | POWERMODE.shake = !{theme.activate_power_mode.shake}; 20 | POWERMODE.mobile = !{theme.activate_power_mode.mobile}; 21 | document.body.addEventListener('input', POWERMODE); 22 | 23 | //- 鼠標特效 24 | if theme.click_heart && theme.click_heart.enable 25 | script#click-heart(src=url_for(theme.CDN.click_heart) async mobile=`${theme.click_heart.mobile}`) 26 | 27 | if theme.ClickShowText && theme.ClickShowText.enable 28 | script#click-show-text( 29 | src= url_for(theme.CDN.ClickShowText) 30 | data-mobile= `${theme.ClickShowText.mobile}` 31 | data-text= theme.ClickShowText.text.join(",") 32 | data-fontsize= theme.ClickShowText.fontSize 33 | data-random= `${theme.ClickShowText.random}` 34 | async 35 | ) -------------------------------------------------------------------------------- /layout/includes/third-party/math/index.pug: -------------------------------------------------------------------------------- 1 | if theme.mathjax && theme.mathjax.enable 2 | if theme.mathjax.per_page 3 | if is_post() || is_page() 4 | include ./mathjax.pug 5 | else 6 | if page.mathjax 7 | include ./mathjax.pug 8 | 9 | if theme.katex && theme.katex.enable 10 | if theme.katex.per_page 11 | if is_post() || is_page() 12 | include ./katex.pug 13 | else 14 | if page.katex 15 | include ./katex.pug 16 | 17 | if theme.mermaid.enable 18 | include ./mermaid.pug -------------------------------------------------------------------------------- /layout/includes/third-party/math/katex.pug: -------------------------------------------------------------------------------- 1 | link(rel="stylesheet" type="text/css" href=theme.CDN.katex) 2 | script(src=url_for(theme.CDN.katex_copytex)) 3 | link(rel="stylesheet" type="text/css" href=theme.CDN.katex_copytex_css) 4 | script. 5 | (() => { 6 | document.querySelectorAll('#article-container span.katex-display').forEach(item => { 7 | btf.wrap(item, 'div', '', 'katex-wrap') 8 | }) 9 | })() 10 | -------------------------------------------------------------------------------- /layout/includes/third-party/math/mathjax.pug: -------------------------------------------------------------------------------- 1 | //- Mathjax 3 2 | //- http://docs.mathjax.org/en/latest/upgrading/v2.html#changes-in-the-mathjax-api 3 | //- https://github.com/mathjax/MathJax/issues/2209 4 | //- http://docs.mathjax.org/en/latest/options/input/tex.html#the-configuration-block 5 | //- http://docs.mathjax.org/en/latest/web/typeset.html#resetting-automatic-equation-numbering 6 | 7 | script. 8 | if (!window.MathJax) { 9 | window.MathJax = { 10 | loader: { 11 | source: { 12 | '[tex]/amsCd': '[tex]/amscd' 13 | } 14 | }, 15 | tex: { 16 | inlineMath: [ ['$','$'], ["\\(","\\)"]], 17 | tags: 'ams' 18 | }, 19 | options: { 20 | renderActions: { 21 | findScript: [10, doc => { 22 | for (const node of document.querySelectorAll('script[type^="math/tex"]')) { 23 | const display = !!node.type.match(/; *mode=display/) 24 | const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display) 25 | const text = document.createTextNode('') 26 | node.parentNode.replaceChild(text, node) 27 | math.start = {node: text, delim: '', n: 0} 28 | math.end = {node: text, delim: '', n: 0} 29 | doc.math.push(math) 30 | } 31 | }, ''], 32 | addClass: [200,() => { 33 | document.querySelectorAll('mjx-container:not([display=\'true\']').forEach( node => { 34 | const target = node.parentNode 35 | if (!target.classList.contains('has-jax')) { 36 | target.classList.add('mathjax-overflow') 37 | } 38 | }) 39 | }, '', false] 40 | } 41 | } 42 | } 43 | 44 | const script = document.createElement('script') 45 | script.src = '!{theme.CDN.mathjax}' 46 | script.id = 'MathJax-script' 47 | script.async = true 48 | document.head.appendChild(script) 49 | } else { 50 | MathJax.startup.document.state(0) 51 | MathJax.texReset() 52 | MathJax.typeset() 53 | } -------------------------------------------------------------------------------- /layout/includes/third-party/math/mermaid.pug: -------------------------------------------------------------------------------- 1 | script. 2 | if (document.getElementsByClassName('mermaid').length) { 3 | if (window.mermaidJsLoad) mermaid.init() 4 | else { 5 | getScript('!{theme.CDN.mermaid}').then(() => { 6 | window.mermaidJsLoad = true 7 | mermaid.initialize({ 8 | theme: '!{theme.mermaid.theme}', 9 | }) 10 | !{theme.pjax.enable} && mermaid.init() 11 | }) 12 | } 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /layout/includes/third-party/newest-comments/index.pug: -------------------------------------------------------------------------------- 1 | - let config = theme.newest_comments 2 | 3 | if config.valine 4 | include ./valine.pug 5 | else if config.waline 6 | include ./waline.pug 7 | else if config.github_issues.enable 8 | include ./github-issues.pug 9 | else if config.disqus.enable 10 | include ./disqus-comment.pug 11 | else if config.twikoo 12 | include ./twikoo-comment.pug -------------------------------------------------------------------------------- /layout/includes/third-party/pangu.pug: -------------------------------------------------------------------------------- 1 | script. 2 | function panguFn () { 3 | if (typeof pangu === 'object') pangu.autoSpacingPage() 4 | else { 5 | getScript('!{url_for(theme.CDN.pangu)}') 6 | .then(() => { 7 | pangu.autoSpacingPage() 8 | }) 9 | } 10 | } 11 | 12 | function panguInit () { 13 | if (!{theme.pangu.field === 'post'}){ 14 | GLOBAL_CONFIG_SITE.isPost && panguFn() 15 | } else { 16 | panguFn() 17 | } 18 | } 19 | 20 | document.addEventListener('DOMContentLoaded', panguInit) 21 | -------------------------------------------------------------------------------- /layout/includes/third-party/prismjs.pug: -------------------------------------------------------------------------------- 1 | if config.prismjs && config.prismjs.enable && !config.prismjs.preprocess 2 | script(src=url_for(theme.CDN.prismjs_js)) 3 | script(src=url_for(theme.CDN.prismjs_autoloader)) 4 | if config.prismjs.line_number 5 | script(src=url_for(theme.CDN.prismjs_lineNumber_js)) 6 | -------------------------------------------------------------------------------- /layout/includes/third-party/search/algolia.pug: -------------------------------------------------------------------------------- 1 | #algolia-search 2 | .search-dialog 3 | #algolia-search-title.search-dialog__title SEARCH 4 | #algolia-input-panel 5 | #algolia-search-input 6 | //- hr 7 | #algolia-search-results 8 | #algolia-hits 9 | #algolia-pagination 10 | #algolia-stats 11 | span.search-close-button 12 | i.fas.fa-times 13 | #search-mask 14 | -------------------------------------------------------------------------------- /layout/includes/third-party/search/index.pug: -------------------------------------------------------------------------------- 1 | if theme.algolia_search.enable 2 | include ./algolia.pug 3 | else if theme.local_search.enable 4 | include ./local-search.pug -------------------------------------------------------------------------------- /layout/includes/third-party/search/local-search.pug: -------------------------------------------------------------------------------- 1 | #local-search 2 | .search-dialog 3 | #local-search-title.search-dialog__title=_p("local_search.label") 4 | #local-input-panel 5 | #local-search-input 6 | .local-search-box 7 | input(placeholder=_p("local_search.input_placeholder") type="text").local-search-box--input 8 | //- hr 9 | #local-search-results 10 | span.search-close-button 11 | i.fas.fa-times 12 | #search-mask -------------------------------------------------------------------------------- /layout/includes/third-party/share/add-this.pug: -------------------------------------------------------------------------------- 1 | .addthis_inline_share_toolbox 2 | script(src=`//s7.addthis.com/js/300/addthis_widget.js#pubid=${theme.addThis.pubid}` async) -------------------------------------------------------------------------------- /layout/includes/third-party/share/addtoany.pug: -------------------------------------------------------------------------------- 1 | .addtoany 2 | .a2a_kit.a2a_kit_size_32.a2a_default_style 3 | - let addtoanyItem = theme.addtoany.item.split(',') 4 | each name in addtoanyItem 5 | a(class="a2a_button_" + name) 6 | 7 | a.a2a_dd(href="https://www.addtoany.com/share") 8 | script(async src=url_for(theme.CDN.addtoany)) 9 | 10 | 11 | -------------------------------------------------------------------------------- /layout/includes/third-party/share/index.pug: -------------------------------------------------------------------------------- 1 | .post_share 2 | if theme.addThis.enable 3 | !=partial('includes/third-party/share/add-this', {}, {cache: true}) 4 | else if theme.sharejs.enable 5 | include ./share-js.pug 6 | else if theme.addtoany.enable 7 | !=partial('includes/third-party/share/addtoany', {}, {cache: true}) 8 | -------------------------------------------------------------------------------- /layout/includes/third-party/share/share-js.pug: -------------------------------------------------------------------------------- 1 | .social-share(data-image=url_for(page.cover|| theme.avatar.img) data-sites= theme.sharejs.sites) 2 | link(rel='stylesheet' href=url_for(theme.CDN.sharejs_css) media="print" onload="this.media='all'") 3 | script(src=url_for(theme.CDN.sharejs) defer) -------------------------------------------------------------------------------- /layout/includes/widget/card_ad.pug: -------------------------------------------------------------------------------- 1 | if theme.ad && theme.ad.aside 2 | .card-widget.ads-wrap 3 | != theme.ad.aside 4 | -------------------------------------------------------------------------------- /layout/includes/widget/card_announcement.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_announcement.enable 2 | .card-widget.card-announcement 3 | .item-headline 4 | //- i.fas.fa-bullhorn.card-announcement-animation 5 | //- span= _p('aside.card_announcement') 6 | .announcement_content!= theme.aside.card_announcement.content -------------------------------------------------------------------------------- /layout/includes/widget/card_archives.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_archives.enable 2 | .card-widget.card-archives 3 | - let type = theme.aside.card_archives.type || 'monthly' 4 | - let format = theme.aside.card_archives.format || 'MMMM YYYY' 5 | - let order = theme.aside.card_archives.order || -1 6 | - let limit = theme.aside.card_archives.limit === 0 ? 0 : theme.aside.card_archives.limit || 8 7 | != aside_archives({ type:type, format: format, order: order, limit: limit }) 8 | -------------------------------------------------------------------------------- /layout/includes/widget/card_author.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_author.enable 2 | .card-widget.card-info 3 | .card-info-avatar.is-center 4 | img.avatar-img(src=url_for(theme.avatar.img) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="avatar") 5 | .author-info__name= config.author 6 | .author-info__description!= theme.aside.card_author.description || config.description 7 | 8 | .card-info-data 9 | if site.posts.length 10 | .card-info-data-item.is-center 11 | a(href=url_for(config.archive_dir) + '/') 12 | .headline= _p('aside.articles') 13 | .length-num= site.posts.length 14 | 15 | if site.tags.length 16 | .card-info-data-item.is-center 17 | a(href=url_for(config.tag_dir) + '/') 18 | .headline= _p('aside.tags') 19 | .length-num= site.tags.length 20 | 21 | if site.categories.length 22 | .card-info-data-item.is-center 23 | a(href=url_for(config.category_dir) + '/') 24 | .headline= _p('aside.categories') 25 | .length-num= site.categories.length 26 | 27 | if theme.aside.card_author.button.enable 28 | a#card-info-btn.button--animated(href=theme.aside.card_author.button.link) 29 | i(class=theme.aside.card_author.button.icon) 30 | span=theme.aside.card_author.button.text 31 | 32 | if(theme.social) 33 | .card-info-social-icons.is-center 34 | !=fragment_cache('social', function(){return partial('includes/header/social')}) 35 | -------------------------------------------------------------------------------- /layout/includes/widget/card_categories.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_categories.enable 2 | if site.categories.length 3 | .card-widget.card-categories 4 | !=aside_categories({ limit: theme.aside.card_categories.limit === 0 ? 0 : theme.aside.card_categories.limit || 8 , expand: theme.aside.card_categories.expand }) 5 | -------------------------------------------------------------------------------- /layout/includes/widget/card_newest_comment.pug: -------------------------------------------------------------------------------- 1 | if theme.newest_comments.enable 2 | .card-widget#card-newest-comments 3 | .item-headline 4 | i.fas.fa-bolt 5 | span= _p('aside.card_newest_comments.headline') 6 | .aside-list 7 | span= _p('aside.card_newest_comments.loading_text') 8 | -------------------------------------------------------------------------------- /layout/includes/widget/card_post_toc.pug: -------------------------------------------------------------------------------- 1 | - let tocNumber = page.toc_number !== undefined ? page.toc_number : theme.toc.number 2 | 3 | #card-toc.card-widget 4 | .item-headline 5 | i.fas.fa-stream 6 | span= _p('aside.card_toc') 7 | 8 | if (page.encrypt == true) 9 | .toc-content.toc-div-class(style="display:none")!=toc(page.origin, {list_number: tocNumber}) 10 | else 11 | .toc-content!=toc(page.content, {list_number: tocNumber}) 12 | -------------------------------------------------------------------------------- /layout/includes/widget/card_recent_post.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_recent_post.enable 2 | .card-widget.card-recent-post 3 | .item-headline 4 | i.fas.fa-history 5 | span= _p('aside.card_recent_post') 6 | .aside-list 7 | - let postLimit = theme.aside.card_recent_post.limit === 0 ? site.posts.length : theme.aside.card_recent_post.limit || 5 8 | - let sort = theme.aside.card_recent_post.sort === 'updated' ? 'updated' : 'date' 9 | - site.posts.sort(sort, -1).limit(postLimit).each(function(article){ 10 | - let link = article.link || article.path 11 | - let title = article.title || _p('no_title') 12 | - let no_cover = article.cover === false || !theme.cover.aside_enable ? 'no-cover' : '' 13 | - let post_cover = article.cover 14 | .aside-list-item(class=no_cover) 15 | if post_cover && theme.cover.aside_enable 16 | a.thumbnail(href=url_for(link) title=title) 17 | img(src=url_for(post_cover) onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'` alt=title) 18 | .content 19 | a.title(href=url_for(link) title=title)= title 20 | if theme.aside.card_recent_post.sort === 'updated' 21 | time(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated)) #[=date(article.updated, config.date_format)] 22 | else 23 | time(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date)) #[=date(article.date, config.date_format)] 24 | - }) -------------------------------------------------------------------------------- /layout/includes/widget/card_self.pug: -------------------------------------------------------------------------------- 1 | if site.data.widget 2 | each item in site.data.widget 3 | .card-widget(class=item.class_name id=item.id_name style=item.order ? `order: ${item.order}` : '') 4 | .item-headline 5 | i(class=item.icon) 6 | span=item.name 7 | .item-content 8 | !=item.html 9 | 10 | -------------------------------------------------------------------------------- /layout/includes/widget/card_tags.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_tags.enable 2 | if site.tags.length 3 | .card-widget.card-tags 4 | .item-headline 5 | i.fas.fa-tags 6 | span= _p('aside.card_tags') 7 | 8 | - let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40 9 | if theme.aside.card_tags.color 10 | .card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.15, maxfontsize: 1.45, limit: tagLimit, unit: 'em'}) 11 | else 12 | .card-tag-cloud!= tagcloud({min_font: 1.1, max_font: 1.5, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'}) 13 | -------------------------------------------------------------------------------- /layout/includes/widget/card_webinfo.pug: -------------------------------------------------------------------------------- 1 | if theme.aside.card_webinfo.enable 2 | .card-widget.card-webinfo 3 | .item-headline 4 | i.fas.fa-chart-line 5 | span= _p('aside.card_webinfo.headline') 6 | .webinfo 7 | if theme.aside.card_webinfo.post_count 8 | .webinfo-item 9 | .item-name= _p('aside.card_webinfo.article_name') + " :" 10 | .item-count= site.posts.length 11 | if theme.runtimeshow.enable 12 | .webinfo-item 13 | .item-name= _p('aside.card_webinfo.runtime.name') + " :" 14 | .item-count#runtimeshow(data-publishDate=date_xml(theme.runtimeshow.publish_date)) 15 | if theme.wordcount.enable && theme.wordcount.total_wordcount 16 | .webinfo-item 17 | .item-name=_p('aside.card_webinfo.site_wordcount') + " :" 18 | .item-count=totalcount(site) 19 | if theme.busuanzi.site_uv 20 | .webinfo-item 21 | .item-name= _p('aside.card_webinfo.site_uv_name') + " :" 22 | .item-count#busuanzi_value_site_uv 23 | if theme.busuanzi.site_pv 24 | .webinfo-item 25 | .item-name= _p('aside.card_webinfo.site_pv_name') + " :" 26 | .item-count#busuanzi_value_site_pv 27 | if theme.aside.card_webinfo.last_push_date 28 | .webinfo-item 29 | .item-name= _p('aside.card_webinfo.last_push_date.name') + " :" 30 | .item-count#last-push-date(data-lastPushDate=date_xml(Date.now())) 31 | 32 | -------------------------------------------------------------------------------- /layout/includes/widget/index.pug: -------------------------------------------------------------------------------- 1 | #aside-content.aside-content 2 | //- post 3 | if is_post() 4 | if showToc && theme.toc.style_simple 5 | .sticky_layout 6 | include ./card_post_toc.pug 7 | else 8 | !=partial('includes/widget/card_author', {}, {cache: true}) 9 | !=partial('includes/widget/card_announcement', {}, {cache: true}) 10 | .sticky_layout 11 | if showToc 12 | include ./card_post_toc.pug 13 | !=partial('includes/widget/card_recent_post', {}, {cache: true}) 14 | !=partial('includes/widget/card_ad', {}, {cache: true}) 15 | else 16 | //- page 17 | !=partial('includes/widget/card_announcement', {}, {cache: true}) 18 | !=partial('includes/widget/card_recent_post', {}, {cache: true}) 19 | !=partial('includes/widget/card_author', {}, {cache: true}) 20 | .sticky_layout 21 | 22 | !=partial('includes/widget/card_ad', {}, {cache: true}) 23 | !=partial('includes/widget/card_newest_comment', {}, {cache: true}) 24 | !=partial('includes/widget/card_categories', {}, {cache: true}) 25 | !=partial('includes/widget/card_tags', {}, {cache: true}) 26 | !=partial('includes/widget/card_archives', {}, {cache: true}) 27 | !=partial('includes/widget/card_webinfo', {}, {cache: true}) 28 | !=partial('includes/widget/card_self', {}, {cache: true}) -------------------------------------------------------------------------------- /layout/index.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | include ./includes/mixins/post-ui.pug 5 | #recent-posts.recent-posts 6 | +postUI 7 | include includes/pagination.pug -------------------------------------------------------------------------------- /layout/page.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | if page.type ==='flat' 5 | #page.recent-posts 6 | include includes/page/flat.pug 7 | else 8 | #page 9 | case page.type 10 | when 'tags' 11 | include includes/page/tags.pug 12 | when 'link' 13 | include includes/page/flink.pug 14 | when 'categories' 15 | include includes/page/categories.pug 16 | default 17 | include includes/page/default-page.pug 18 | 19 | if page.comments !== false && theme.comments && theme.comments.use 20 | - var commentsJsLoad = true 21 | !=partial('includes/third-party/comments/index', {}, {cache: true}) -------------------------------------------------------------------------------- /layout/post.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | #post 5 | if top_img === false 6 | include includes/header/post-info.pug 7 | 8 | article#article-container.post-content!=page.content 9 | include includes/post/post-copyright.pug 10 | .tag_share 11 | if (theme.post_meta.post.tags) 12 | .post-meta__tag-list 13 | each item, index in page.tags.data 14 | a(href=url_for(item.path)).post-meta__tags #[=item.name] 15 | include includes/third-party/share/index.pug 16 | 17 | if theme.reward.enable 18 | !=partial('includes/post/reward', {}, {cache: true}) 19 | 20 | //- ad 21 | if theme.ad && theme.ad.post 22 | .ads-wrap!=theme.ad.post 23 | 24 | if theme.post_pagination 25 | include includes/pagination.pug 26 | if theme.related_post && theme.related_post.enable 27 | != related_posts(page,site.posts) 28 | 29 | if page.comments !== false && theme.comments && theme.comments.use 30 | - var commentsJsLoad = true 31 | !=partial('includes/third-party/comments/index', {}, {cache: true}) 32 | -------------------------------------------------------------------------------- /layout/tag.pug: -------------------------------------------------------------------------------- 1 | extends includes/layout.pug 2 | 3 | block content 4 | if theme.tag_ui == 'index' 5 | include ./includes/mixins/post-ui.pug 6 | #recent-posts.recent-posts 7 | +postUI 8 | include includes/pagination.pug 9 | else 10 | include ./includes/mixins/article-sort.pug 11 | #tag 12 | .article-sort-title= _p('page.tag') + ' - ' + page.tag 13 | +articleSort(page.posts) 14 | include includes/pagination.pug -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-theme-unicorn", 3 | "version": "1.0.2", 4 | "description": "A Simple and Card UI Design theme for Hexo", 5 | "main": "package.json", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "hexo", 11 | "theme", 12 | "unicorn", 13 | "butterfly", 14 | "Card UI Design", 15 | "Jerry", 16 | "hexo-theme-butterfly" 17 | ], 18 | "repository": { 19 | "type" : "git", 20 | "url" : "https://github.com/Uzizkp/hexo-theme-unicorn.git" 21 | }, 22 | "bugs": { 23 | "url": "https://github.com/Uzizkp/hexo-theme-unicorn/issues", 24 | "email": "z.kp@outlook.com" 25 | }, 26 | "dependencies": { 27 | "hexo-renderer-stylus": "^2.0.1", 28 | "hexo-renderer-pug": "^1.0.0" 29 | }, 30 | "homepage": "https://zkpeace.com/", 31 | "author": "kp ", 32 | "license": "Apache-2.0" 33 | } 34 | -------------------------------------------------------------------------------- /scripts/events/404.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * 404 error page 4 | */ 5 | 6 | 'use strict' 7 | 8 | hexo.extend.generator.register('404', function (locals) { 9 | if (!hexo.theme.config.error_404.enable) return 10 | return { 11 | path: '404.html', 12 | data: locals.posts, 13 | layout: ['page'], 14 | data: { 15 | type: '404', 16 | top_img: false 17 | } 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /scripts/events/init.js: -------------------------------------------------------------------------------- 1 | const logger = require('hexo-log')() 2 | 3 | hexo.extend.filter.register('before_generate', () => { 4 | // Get first two digits of the Hexo version number 5 | const hexoVer = hexo.version.replace(/(^.*\..*)\..*/, '$1') 6 | 7 | if (hexoVer < 5) { 8 | logger.error('Please update Hexo to V5.0.0 or higher!') 9 | logger.error('請把 Hexo 升級到 V5.0.0 或更高的版本!') 10 | process.exit(-1) 11 | } 12 | 13 | if (hexo.locals.get) { 14 | const data = hexo.locals.get('data') 15 | if (data && data.butterfly) { 16 | logger.error(" 'butterfly.yml' is deprecated. Please use '_config.butterfly.yml' ") 17 | logger.error(" 'butterfly.yml' 已經棄用,請使用 '_config.butterfly.yml' ") 18 | process.exit(-1) 19 | } 20 | } 21 | 22 | // let stylus to get the hexo highlight config 23 | const themeConfig = hexo.theme.config 24 | const hexoConfig = hexo.config 25 | themeConfig.highlight_settings = hexoConfig.highlight 26 | themeConfig.prismjs_settings = hexoConfig.prismjs 27 | }) 28 | -------------------------------------------------------------------------------- /scripts/events/welcome.js: -------------------------------------------------------------------------------- 1 | const logger = require('hexo-log')() 2 | 3 | hexo.on('ready', () => { 4 | const { version } = require('../../package.json') 5 | logger.info(` 6 | =========================================================================== 7 | __ __ _ __ ____ ______ ____ ____ _ __ 8 | / / / // | / // _// ____// __ \\ / __ \\ / | / / 9 | / / / // |/ / / / / / / / / // /_/ // |/ / 10 | / /_/ // /| /_/ / / /___ / /_/ // _, _// /| / 11 | \\____//_/ |_//___/ \\____/ \\____//_/ |_|/_/ |_/ 12 | 13 | ${version} by kp, Based on Jerry's BUTTERFLY 14 | ============================================================================`) 15 | }) 16 | -------------------------------------------------------------------------------- /scripts/filters/post_lazyload.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * lazyload 4 | * replace src to data-lazy-src 5 | */ 6 | 7 | 'use strict' 8 | 9 | const urlFor = require('hexo-util').url_for.bind(hexo) 10 | 11 | function lazyload (htmlContent) { 12 | const bg = hexo.theme.config.lazyload.placeholder ? urlFor(hexo.theme.config.lazyload.placeholder) : 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=' 13 | return htmlContent.replace(/( { 25 | const config = hexo.theme.config.lazyload 26 | if (!config.enable) return 27 | if (config.field !== 'post') return 28 | data.content = lazyload.call(this, data.content) 29 | return data 30 | }) 31 | -------------------------------------------------------------------------------- /scripts/filters/random_cover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * ramdom cover 4 | */ 5 | 6 | 'use strict' 7 | 8 | hexo.extend.filter.register('before_post_render', function (data) { 9 | const { config } = this 10 | if (config.post_asset_folder) { 11 | const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/ 12 | const topImg = data.top_img 13 | const cover = data.cover 14 | if (topImg && topImg.indexOf('/') === -1 && imgTestReg.test(topImg)) data.top_img = data.path + topImg 15 | if (cover && cover.indexOf('/') === -1) data.cover = data.path + cover 16 | } 17 | 18 | if (data.cover === false) { 19 | data.randomcover = randomCover() 20 | return data 21 | } 22 | 23 | data.cover = data.cover || randomCover() 24 | return data 25 | }) 26 | 27 | function randomCover () { 28 | const theme = hexo.theme.config 29 | let cover 30 | let num 31 | 32 | if (theme.cover && theme.cover.default_cover) { 33 | if (!Array.isArray(theme.cover.default_cover)) { 34 | cover = theme.cover.default_cover 35 | return cover 36 | } else { 37 | num = Math.floor(Math.random() * theme.cover.default_cover.length) 38 | cover = theme.cover.default_cover[num] 39 | return cover 40 | } 41 | } else { 42 | cover = theme.default_top_img || 'https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg' 43 | return cover 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /scripts/helpers/page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * @example 4 | * page_description() 5 | * cloudTags(source, minfontsize, maxfontsize, limit) 6 | */ 7 | 8 | 'use strict' 9 | 10 | const { stripHTML, escapeHTML, prettyUrls } = require('hexo-util') 11 | const crypto = require('crypto') 12 | 13 | hexo.extend.helper.register('page_description', function () { 14 | const { config, page } = this 15 | let description = page.description || page.content || page.title || config.description 16 | 17 | if (description) { 18 | description = escapeHTML(stripHTML(description).substring(0, 150) 19 | .trim() 20 | ).replace(/\n/g, ' ') 21 | return description 22 | } 23 | }) 24 | 25 | hexo.extend.helper.register('cloudTags', function (options = {}) { 26 | const env = this 27 | let source = options.source 28 | const minfontsize = options.minfontsize 29 | const maxfontsize = options.maxfontsize 30 | const limit = options.limit 31 | const unit = options.unit || 'px' 32 | 33 | let result = '' 34 | if (limit > 0) { 35 | source = source.limit(limit) 36 | } 37 | 38 | const sizes = [] 39 | source.sort('length').forEach(tag => { 40 | const { length } = tag 41 | if (sizes.includes(length)) return 42 | sizes.push(length) 43 | }) 44 | 45 | const length = sizes.length - 1 46 | source.forEach(tag => { 47 | const ratio = length ? sizes.indexOf(tag.length) / length : 0 48 | const size = minfontsize + ((maxfontsize - minfontsize) * ratio) 49 | let style = `font-size: ${parseFloat(size.toFixed(2))}${unit};` 50 | const color = 'rgb(' + Math.floor(Math.random() * 221) + ', ' + Math.floor(Math.random() * 221) + ', ' + Math.floor(Math.random() * 221) + ')' // 0,0,0 -> 200,200,200 51 | style += ` color: ${color}` 52 | result += `${tag.name}` 53 | }) 54 | return result 55 | }) 56 | 57 | hexo.extend.helper.register('urlNoIndex', function (url = null) { 58 | return prettyUrls(url || this.url, { trailing_index: false, trailing_html: false }) 59 | }) 60 | 61 | hexo.extend.helper.register('md5', function (path) { 62 | return crypto.createHash('md5').update(decodeURI(this.url_for(path))).digest('hex') 63 | }) 64 | 65 | hexo.extend.helper.register('injectHtml', function (data) { 66 | let result = '' 67 | if (!data) return '' 68 | for (let i = 0; i < data.length; i++) { 69 | result += data[i] 70 | } 71 | return result 72 | }) 73 | -------------------------------------------------------------------------------- /scripts/tag/button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Button 3 | * {% btn url text icon option %} 4 | * option: color outline center block larger 5 | * color : default/blue/pink/red/purple/orange/green 6 | */ 7 | 8 | 'use strict' 9 | 10 | const urlFor = require('hexo-util').url_for.bind(hexo) 11 | 12 | function btn (args) { 13 | args = args.join(' ').split(',') 14 | let url = args[0] || '' 15 | let text = args[1] || '' 16 | let icon = args[2] || '' 17 | let option = args[3] || '' 18 | 19 | url = url.trim() 20 | text = text.trim() 21 | icon = icon.trim() 22 | option = option.trim() 23 | 24 | return `${icon.length ? `` : ''}${text.length ? `${text}` : ''}` 26 | } 27 | 28 | hexo.extend.tag.register('btn', btn, { ends: false }) 29 | -------------------------------------------------------------------------------- /scripts/tag/gallery.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * galleryGroup and allery 4 | */ 5 | 6 | 'use strict' 7 | 8 | const urlFor = require('hexo-util').url_for.bind(hexo) 9 | 10 | function gallery (args, content) { 11 | return `` 13 | } 14 | 15 | function galleryGroup (args) { 16 | const name = args[0] 17 | const desrc = args[1] 18 | const url = urlFor(args[2]) 19 | const img = urlFor(args[3]) 20 | 21 | return ` 22 | 30 | ` 31 | } 32 | 33 | hexo.extend.tag.register('gallery', gallery, { ends: true }) 34 | hexo.extend.tag.register('galleryGroup', galleryGroup) 35 | -------------------------------------------------------------------------------- /scripts/tag/hide.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * @example 4 | * hideInline 5 | * {% hideInline content,display,bg,color %} 6 | * content不能包含當引號,可用 ' 7 | * hideBlock 8 | * {% hideBlock display,bg,color %} 9 | * content 10 | * {% endhideBlock %} 11 | * hideToggle 12 | * {% hideToggle display,bg,color %} 13 | * content 14 | * {% endhideToggle %} 15 | */ 16 | 17 | 'use strict' 18 | 19 | function hideInline (args) { 20 | args = args.join(' ').split(',') 21 | const content = args[0] 22 | const display = args[1] || 'Click' 23 | const bg = args[2] || false 24 | const color = args[3] || false 25 | let group = 'style="' 26 | 27 | if (bg) group += `background-color: ${bg};` 28 | if (color) group += `color: ${color}` 29 | group += '"' 30 | 31 | return `${content}` 33 | } 34 | 35 | function hideBlock (args, content) { 36 | args = args.join(' ').split(',') 37 | const display = args[0] || 'Click' 38 | const bg = args[1] || false 39 | const color = args[2] || false 40 | let group = 'style="' 41 | 42 | if (bg) group += `background-color: ${bg};` 43 | if (color) group += `color: ${color}` 44 | group += '"' 45 | 46 | return `
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
` 48 | } 49 | 50 | function hideToggle (args, content) { 51 | args = args.join(' ').split(',') 52 | const display = args[0] 53 | const bg = args[1] || false 54 | const color = args[2] || false 55 | let group = 'style="' 56 | let border = '' 57 | 58 | if (bg) { 59 | border = `style="border: 1px solid ${bg}"` 60 | group += `background-color: ${bg};` 61 | } 62 | if (color) group += `color: ${color}` 63 | group += '"' 64 | 65 | return `
${display}
66 |
${hexo.render.renderSync({ text: content, engine: 'markdown' })}
` 67 | } 68 | 69 | hexo.extend.tag.register('hideInline', hideInline) 70 | hexo.extend.tag.register('hideBlock', hideBlock, { ends: true }) 71 | hexo.extend.tag.register('hideToggle', hideToggle, { ends: true }) 72 | -------------------------------------------------------------------------------- /scripts/tag/inlineImg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * inlineImg 圖片 3 | * {% inlineImg src height %} 4 | */ 5 | 6 | 'use strict' 7 | 8 | const urlFor = require('hexo-util').url_for.bind(hexo) 9 | 10 | function inlineImg (args) { 11 | const img = args[0] 12 | const height = args[1] ? `style="height:${args[1]}"` : '' 13 | 14 | return `` 15 | } 16 | 17 | hexo.extend.tag.register('inlineImg', inlineImg, { ends: false }) 18 | -------------------------------------------------------------------------------- /scripts/tag/label.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * label 4 | * {% label text color %} 5 | */ 6 | 7 | 'use strict' 8 | 9 | function addLabel (args, content) { 10 | const text = args[0] 11 | const className = args[1] || 'default' 12 | 13 | return `${text} ` 14 | } 15 | 16 | hexo.extend.tag.register('label', addLabel, { ends: false }) -------------------------------------------------------------------------------- /scripts/tag/mermaid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Butterfly 3 | * mermaid 4 | * https://github.com/mermaid-js/mermaid 5 | */ 6 | 7 | 'use strict' 8 | 9 | const { escapeHTML } = require('hexo-util') 10 | 11 | function mermaid (args, content) { 12 | return `
${escapeHTML(content)}
` 13 | } 14 | 15 | hexo.extend.tag.register('mermaid', mermaid, { ends: true }) 16 | -------------------------------------------------------------------------------- /scripts/tag/note.js: -------------------------------------------------------------------------------- 1 | /** 2 | * note.js 3 | * transplant from hexo-theme-next 4 | * Modify by Jerry 5 | */ 6 | 7 | 'use strict' 8 | 9 | function postNote (args, content) { 10 | const styleConfig = hexo.theme.config.note.style 11 | const lastArgs = args[args.length - 1] 12 | if (!(lastArgs === 'flat' || lastArgs === 'modern' || lastArgs === 'simple' || lastArgs === 'disabled')) { 13 | args.push(styleConfig) 14 | } 15 | 16 | let icon = '' 17 | const iconArray = args[args.length - 2] 18 | if (iconArray && iconArray.startsWith('fa')) { 19 | icon = `` 20 | args[args.length - 2] = 'icon' 21 | } 22 | 23 | return `
${icon + hexo.render.renderSync({ text: content, engine: 'markdown' })}
` 24 | } 25 | 26 | hexo.extend.tag.register('note', postNote, { ends: true }) 27 | hexo.extend.tag.register('subnote', postNote, { ends: true }) 28 | -------------------------------------------------------------------------------- /scripts/tag/tabs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Tabs 3 | * transplant from hexo-theme-next 4 | * modify by Jerry 5 | */ 6 | 7 | 'use strict' 8 | 9 | function postTabs (args, content) { 10 | const tabBlock = /\n([\w\W\s\S]*?)/g 11 | 12 | args = args.join(' ').split(',') 13 | const tabName = args[0] 14 | const tabActive = Number(args[1]) || 0 15 | 16 | const matches = [] 17 | let match 18 | let tabId = 0 19 | let tabNav = '' 20 | let tabContent = '' 21 | 22 | !tabName && hexo.log.warn('Tabs block must have unique name!') 23 | 24 | while ((match = tabBlock.exec(content)) !== null) { 25 | matches.push(match[1]) 26 | matches.push(match[2]) 27 | } 28 | 29 | for (let i = 0; i < matches.length; i += 2) { 30 | const tabParameters = matches[i].split('@') 31 | let postContent = matches[i + 1] 32 | let tabCaption = tabParameters[0] || '' 33 | let tabIcon = tabParameters[1] || '' 34 | let tabHref = '' 35 | 36 | postContent = hexo.render.renderSync({ text: postContent, engine: 'markdown' }).trim() 37 | 38 | tabId += 1 39 | tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-'); 40 | 41 | ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId) 42 | 43 | const isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : '' 44 | const icon = tabIcon.trim() 45 | tabIcon.length > 0 && (tabIcon = ``) 46 | 47 | const toTop = '' 48 | 49 | const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '' 50 | tabNav += `
  • ` 51 | tabContent += `
    ${postContent + toTop}
    ` 52 | } 53 | 54 | tabNav = `` 55 | tabContent = `
    ${tabContent}
    ` 56 | 57 | return `
    ${tabNav + tabContent}
    ` 58 | } 59 | 60 | hexo.extend.tag.register('tabs', postTabs, { ends: true }) 61 | hexo.extend.tag.register('subtabs', postTabs, { ends: true }) 62 | hexo.extend.tag.register('subsubtabs', postTabs, { ends: true }) 63 | -------------------------------------------------------------------------------- /source/css/_highlight/dist/theme.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/css/_highlight/dist/theme.css -------------------------------------------------------------------------------- /source/css/_highlight/highlight/diff.styl: -------------------------------------------------------------------------------- 1 | figure.highlight 2 | table 3 | &::-webkit-scrollbar-thumb 4 | background: var(--hlscrollbar-bg) 5 | 6 | pre .deletion 7 | color: $highlight-deletion 8 | 9 | pre .addition 10 | color: $highlight-addition 11 | 12 | pre .meta 13 | color: $highlight-purple 14 | 15 | pre 16 | .comment 17 | color: $highlight-comment 18 | 19 | .variable, 20 | .attribute, 21 | .regexp, 22 | .ruby .constant, 23 | .xml .tag .title, 24 | .xml .pi, 25 | .xml .doctype, 26 | .html .doctype, 27 | .css .id, 28 | .tag .name, 29 | .css .class, 30 | .css .pseudo 31 | color: $highlight-red 32 | 33 | .tag 34 | color: $highlight-aqua 35 | 36 | .number, 37 | .preprocessor, 38 | .literal, 39 | .params, 40 | .constant, 41 | .command 42 | color: $highlight-orange 43 | 44 | .built_in 45 | color: $highlight-yellow 46 | 47 | .ruby .class .title, 48 | .css .rules .attribute, 49 | .string, 50 | .value, 51 | .inheritance, 52 | .header, 53 | .ruby .symbol, 54 | .xml .cdata, 55 | .special, 56 | .number, 57 | .formula 58 | color: $highlight-green 59 | 60 | .keyword, 61 | .title, 62 | .css .hexcolor 63 | color: $highlight-aqua 64 | 65 | .function, 66 | .python .decorator, 67 | .python .title, 68 | .ruby .function .title, 69 | .ruby .title .keyword, 70 | .perl .sub, 71 | .javascript .title, 72 | .coffeescript .title 73 | color: $highlight-blue 74 | 75 | .tag .attr, 76 | .javascript .function 77 | color: $highlight-purple 78 | -------------------------------------------------------------------------------- /source/css/_highlight/highlight/dist/diff.css: -------------------------------------------------------------------------------- 1 | figure.highlight table::-webkit-scrollbar-thumb { 2 | background: var(--hlscrollbar-bg); 3 | } 4 | figure.highlight pre .deletion { 5 | color: $highlight-deletion; 6 | } 7 | figure.highlight pre .addition { 8 | color: $highlight-addition; 9 | } 10 | figure.highlight pre .meta { 11 | color: $highlight-purple; 12 | } 13 | figure.highlight pre .comment { 14 | color: $highlight-comment; 15 | } 16 | figure.highlight pre .variable, 17 | figure.highlight pre .attribute, 18 | figure.highlight pre .regexp, 19 | figure.highlight pre .ruby .constant, 20 | figure.highlight pre .xml .tag .title, 21 | figure.highlight pre .xml .pi, 22 | figure.highlight pre .xml .doctype, 23 | figure.highlight pre .html .doctype, 24 | figure.highlight pre .css .id, 25 | figure.highlight pre .tag .name, 26 | figure.highlight pre .css .class, 27 | figure.highlight pre .css .pseudo { 28 | color: $highlight-red; 29 | } 30 | figure.highlight pre .tag { 31 | color: $highlight-aqua; 32 | } 33 | figure.highlight pre .number, 34 | figure.highlight pre .preprocessor, 35 | figure.highlight pre .literal, 36 | figure.highlight pre .params, 37 | figure.highlight pre .constant, 38 | figure.highlight pre .command { 39 | color: $highlight-orange; 40 | } 41 | figure.highlight pre .built_in { 42 | color: $highlight-yellow; 43 | } 44 | figure.highlight pre .ruby .class .title, 45 | figure.highlight pre .css .rules .attribute, 46 | figure.highlight pre .string, 47 | figure.highlight pre .value, 48 | figure.highlight pre .inheritance, 49 | figure.highlight pre .header, 50 | figure.highlight pre .ruby .symbol, 51 | figure.highlight pre .xml .cdata, 52 | figure.highlight pre .special, 53 | figure.highlight pre .number, 54 | figure.highlight pre .formula { 55 | color: $highlight-green; 56 | } 57 | figure.highlight pre .keyword, 58 | figure.highlight pre .title, 59 | figure.highlight pre .css .hexcolor { 60 | color: $highlight-aqua; 61 | } 62 | figure.highlight pre .function, 63 | figure.highlight pre .python .decorator, 64 | figure.highlight pre .python .title, 65 | figure.highlight pre .ruby .function .title, 66 | figure.highlight pre .ruby .title .keyword, 67 | figure.highlight pre .perl .sub, 68 | figure.highlight pre .javascript .title, 69 | figure.highlight pre .coffeescript .title { 70 | color: $highlight-blue; 71 | } 72 | figure.highlight pre .tag .attr, 73 | figure.highlight pre .javascript .function { 74 | color: $highlight-purple; 75 | } 76 | -------------------------------------------------------------------------------- /source/css/_highlight/highlight/index.styl: -------------------------------------------------------------------------------- 1 | if $highlight_theme != false 2 | @require 'diff' 3 | 4 | #article-container 5 | figure.highlight 6 | .line 7 | if wordWrap 8 | &:before 9 | display: inline-block 10 | padding: 0 .3rem 0 0 11 | min-width: 1.6rem 12 | color: var(--hlnumber-color) 13 | content: counter(line) 14 | counter-increment: line 15 | text-align: left 16 | 17 | &.marked 18 | background-color: $highlight-selection 19 | 20 | table 21 | display: block 22 | overflow: auto 23 | border: none 24 | 25 | td 26 | padding: 0 27 | border: none 28 | 29 | .gutter pre 30 | padding-right: .5rem 31 | padding-left: .5rem 32 | background-color: var(--hlnumber-bg) 33 | color: var(--hlnumber-color) 34 | text-align: right 35 | 36 | .code pre 37 | padding-right: .5rem 38 | padding-left: .5rem 39 | width: 100% 40 | -------------------------------------------------------------------------------- /source/css/_highlight/prismjs/dist/diff.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/css/_highlight/prismjs/dist/diff.css -------------------------------------------------------------------------------- /source/css/_highlight/prismjs/dist/index.css: -------------------------------------------------------------------------------- 1 | #article-container pre[class*='language-'].line-numbers { 2 | position: relative; 3 | padding-left: 3.8em; 4 | counter-reset: linenumber; 5 | line-height: $line-height-code-block; 6 | } 7 | #article-container pre[class*='language-'].line-numbers > code { 8 | position: relative; 9 | line-height: $line-height-code-block; 10 | white-space: pre-wrap; 11 | } 12 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows { 13 | position: absolute; 14 | top: 0; 15 | left: -3.8em; 16 | width: 3em; 17 | letter-spacing: -1px; 18 | font-size: 100%; 19 | pointer-events: none; 20 | user-select: none; 21 | } 22 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows > span { 23 | display: block; 24 | counter-increment: linenumber; 25 | pointer-events: none; 26 | } 27 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows > span:before { 28 | display: block; 29 | padding-right: 0.8em; 30 | color: var(--hlnumber-color); 31 | content: counter(linenumber); 32 | text-align: right; 33 | } 34 | #article-container pre[class*='language-']::-webkit-scrollbar-thumb { 35 | background: var(--hlscrollbar-bg); 36 | } 37 | #article-container pre[class*='language-']:not(.line-numbers) { 38 | padding: 10px 20px; 39 | } 40 | #article-container pre[class*='language-'] .caption { 41 | margin-left: -3.8em; 42 | padding: 0.2rem 0.8rem !important; 43 | } 44 | #article-container pre[class*='language-'] .caption a { 45 | padding: 0 !important; 46 | } 47 | -------------------------------------------------------------------------------- /source/css/_highlight/prismjs/dist/line-number.css: -------------------------------------------------------------------------------- 1 | #article-container pre[class*='language-'].line-numbers { 2 | position: relative; 3 | padding-left: 3.8em; 4 | counter-reset: linenumber; 5 | line-height: $line-height-code-block; 6 | } 7 | #article-container pre[class*='language-'].line-numbers > code { 8 | position: relative; 9 | line-height: $line-height-code-block; 10 | white-space: pre-wrap; 11 | } 12 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows { 13 | position: absolute; 14 | top: 0; 15 | left: -3.8em; 16 | width: 3em; 17 | letter-spacing: -1px; 18 | font-size: 100%; 19 | pointer-events: none; 20 | user-select: none; 21 | } 22 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows > span { 23 | display: block; 24 | counter-increment: linenumber; 25 | pointer-events: none; 26 | } 27 | #article-container pre[class*='language-'].line-numbers .line-numbers-rows > span:before { 28 | display: block; 29 | padding-right: 0.8em; 30 | color: var(--hlnumber-color); 31 | content: counter(linenumber); 32 | text-align: right; 33 | } 34 | -------------------------------------------------------------------------------- /source/css/_highlight/prismjs/index.styl: -------------------------------------------------------------------------------- 1 | if hexo-fonfig('prismjs_settings.line_number') 2 | @require 'line-number' 3 | 4 | if $highlight_theme != false 5 | @require 'diff' 6 | 7 | #article-container 8 | pre[class*='language-'] 9 | &::-webkit-scrollbar-thumb 10 | background: var(--hlscrollbar-bg) 11 | 12 | &:not(.line-numbers) 13 | padding: 10px 20px 14 | 15 | .caption 16 | margin-left: -3.8em 17 | padding: .2rem .8rem !important 18 | 19 | a 20 | padding: 0 !important 21 | -------------------------------------------------------------------------------- /source/css/_highlight/prismjs/line-number.styl: -------------------------------------------------------------------------------- 1 | #article-container 2 | pre[class*='language-'] 3 | &.line-numbers 4 | position: relative 5 | padding-left: 3.8em 6 | counter-reset: linenumber 7 | line-height: $line-height-code-block 8 | 9 | > code 10 | position: relative 11 | line-height: $line-height-code-block 12 | 13 | if hexo-config('code_word_wrap') 14 | white-space: pre-wrap 15 | else 16 | white-space: inherit 17 | word-wrap: normal 18 | word-break: normal 19 | overflow-wrap: normal 20 | 21 | .line-numbers-rows 22 | position: absolute 23 | top: 0 24 | left: -3.8em 25 | width: 3em 26 | letter-spacing: -1px 27 | font-size: 100% 28 | pointer-events: none 29 | user-select: none 30 | 31 | & > span 32 | display: block 33 | counter-increment: linenumber 34 | pointer-events: none 35 | 36 | &:before 37 | display: block 38 | padding-right: .8em 39 | color: var(--hlnumber-color) 40 | content: counter(linenumber) 41 | text-align: right 42 | -------------------------------------------------------------------------------- /source/css/_layout/404.styl: -------------------------------------------------------------------------------- 1 | if hexo-config('error_404.enable') 2 | #error-wrap 3 | position: absolute 4 | top: 50% 5 | right: 0 6 | left: 0 7 | margin: 0 auto 8 | padding: 0 1rem 9 | max-width: 1000px 10 | transform: translate(0, -50%) 11 | 12 | .error-content 13 | display: flex 14 | flex-direction: row 15 | justify-content: center 16 | align-items: center 17 | margin: 0 1rem 18 | height: 18rem 19 | border-radius: 8px 20 | background: var(--card-bg) 21 | backdrop-filter: blur(30px); 22 | box-shadow: var(--card-box-shadow) 23 | transition: all .3s 24 | 25 | &:hover 26 | box-shadow: var(--card-hover-box-shadow) 27 | 28 | +maxWidth768() 29 | flex-direction: column 30 | margin: 0 31 | height: 25rem 32 | 33 | .error-img 34 | flex: 1 35 | height: 100% 36 | border-top-left-radius: 8px 37 | border-bottom-left-radius: 8px 38 | background-color: $theme-color 39 | background-position: center 40 | background-size: cover 41 | 42 | +maxWidth768() 43 | flex: 1 44 | width: 100% 45 | border-top-right-radius: 8px 46 | border-bottom-left-radius: 0 47 | 48 | .error-info 49 | flex: 1 50 | padding: .5rem 51 | text-align: center 52 | font-size: 14px 53 | 54 | if $site-name-font 55 | font-family: $site-name-font 56 | 57 | +maxWidth768() 58 | flex: 1.1 59 | width: 100% 60 | 61 | .error_title 62 | margin-top: -4rem 63 | font-size: 9em 64 | 65 | +maxWidth768() 66 | margin-top: -3rem 67 | 68 | .error_subtitle 69 | @extend .limit-more-line 70 | margin-top: -3.5rem 71 | word-break: break-word 72 | font-size: 1.6em 73 | -webkit-line-clamp: 2 74 | 75 | a 76 | display: inline-block 77 | margin-top: .5rem 78 | padding: .3rem 1.5rem 79 | background: var(--btn-bg) 80 | color: var(--btn-color) 81 | 82 | i 83 | padding-right: .3rem 84 | -------------------------------------------------------------------------------- /source/css/_layout/chat.styl: -------------------------------------------------------------------------------- 1 | // chat 2 | if hexo-config('chat_btn') == true && hexo-config('chatra.enable') 3 | #chatra:not(.chatra--expanded) 4 | visibility: hidden !important 5 | width: 1px !important 6 | height: 1px !important 7 | opacity: 0 !important 8 | pointer-events: none 9 | -------------------------------------------------------------------------------- /source/css/_layout/comments.styl: -------------------------------------------------------------------------------- 1 | #post-comment 2 | .comment-head 3 | margin-bottom: 1rem 4 | 5 | .comment-headline 6 | display: inline-block 7 | vertical-align: middle 8 | font-weight: 700 9 | font-size: 1.43em 10 | 11 | #comment-switch 12 | display: inline-block 13 | 14 | if hexo-config('comments.text') 15 | float: right 16 | margin: .1rem auto 0 17 | padding: .2rem .8rem 18 | width: max-content 19 | border-radius: 8px 20 | background: $comments-switch-bg 21 | else 22 | vertical-align: middle 23 | 24 | > span 25 | display: none 26 | 27 | .first-comment 28 | color: $comments-switch-first-text 29 | 30 | .second-comment 31 | color: $comments-switch-second-text 32 | 33 | .switch-btn 34 | position: relative 35 | display: inline-block 36 | margin: -4px .4rem 0 37 | width: 42px 38 | height: 22px 39 | border-radius: 34px 40 | background-color: $comments-switch-first-text 41 | vertical-align: middle 42 | cursor: pointer 43 | transition: .4s 44 | 45 | &:before 46 | position: absolute 47 | bottom: 4px 48 | left: 4px 49 | width: 14px 50 | height: 14px 51 | border-radius: 50% 52 | background-color: $comments-switch-round 53 | content: '' 54 | transition: .4s 55 | 56 | &.move 57 | background-color: $comments-switch-second-text 58 | 59 | &:before 60 | transform: translateX(20px) 61 | 62 | .comment-wrap 63 | > div:nth-child(2) 64 | display: none 65 | 66 | .tk-comments-container 67 | .tk-comments-count 68 | font-size: .7rem 69 | font-weight: lighter 70 | opacity : 0.6 71 | .tk-comment 72 | padding-left: .5rem 73 | display: list-item 74 | border-left: solid 2px rgba(rgb(189,195,199), .2) 75 | .tk-main 76 | .tk-row 77 | opacity : 0.5 78 | .tk-content 79 | background: rgba(rgb(212,212,212), .1) 80 | padding: 10px 20px 20px 81 | border-radius: 10px 82 | border: solid 2px rgba(rgb(212,212,212), .3) 83 | 84 | &:hover 85 | border: solid 2px var(--font-color) 86 | .tk-replies 87 | .tk-comment 88 | .tk-avatar 89 | display: inline-block 90 | .tk-main 91 | &:before 92 | display: none 93 | .tk-row 94 | .tk-action, 95 | .tk-meta 96 | bottom: 0 97 | position: static 98 | .tk-nick 99 | display: inline -------------------------------------------------------------------------------- /source/css/_layout/footer.styl: -------------------------------------------------------------------------------- 1 | #footer 2 | position: relative 3 | background: $white 4 | background-attachment: local 5 | background-position: bottom 6 | background-size: cover 7 | 8 | if hexo-config('footer_bg') != false 9 | &:before 10 | position: absolute 11 | width: 100% 12 | height: 100% 13 | background-color: alpha($dark-black, .5) 14 | content: '' 15 | 16 | #footer-wrap 17 | position: relative 18 | padding: 2rem 1rem 19 | color: var(--font-black) 20 | text-align: center 21 | border-style: solid; 22 | border-width: 0.0001px; 23 | border-color: rgba(255, 227, 230, 0.06); 24 | 25 | a 26 | color: var(--font-black) 27 | 28 | &:hover 29 | text-decoration: underline 30 | 31 | .footer-separator 32 | margin: 0 .2rem 33 | 34 | .icp-icon 35 | padding: 0 4px 36 | vertical-align: text-bottom 37 | max-height: 1.4em 38 | width auto 39 | -------------------------------------------------------------------------------- /source/css/_layout/loading.styl: -------------------------------------------------------------------------------- 1 | if hexo-config('preloader') 2 | .loading-bg 3 | position: fixed 4 | z-index: 1000 5 | width: 50% 6 | height: 100% 7 | background-color: var(--preloader-bg) 8 | 9 | #loading-box 10 | .loading-left-bg 11 | @extend .loading-bg 12 | 13 | .loading-right-bg 14 | @extend .loading-bg 15 | right: 0 16 | 17 | .spinner-box 18 | position: fixed 19 | z-index: 1001 20 | display: flex 21 | justify-content: center 22 | align-items: center 23 | width: 100% 24 | height: 100vh 25 | 26 | .configure-border-1 27 | position: absolute 28 | padding: 3px 29 | width: 115px 30 | height: 115px 31 | background: #ffab91 32 | animation: configure-clockwise 3s ease-in-out 0s infinite alternate 33 | 34 | .configure-border-2 35 | left: -115px 36 | padding: 3px 37 | width: 115px 38 | height: 115px 39 | background: rgb(63, 249, 220) 40 | transform: rotate(45deg) 41 | animation: configure-xclockwise 3s ease-in-out 0s infinite alternate 42 | 43 | .loading-word 44 | position: absolute 45 | color: var(--preloader-color) 46 | font-size: .8rem 47 | 48 | .configure-core 49 | width: 100% 50 | height: 100% 51 | background-color: var(--preloader-bg) 52 | 53 | &.loaded 54 | .loading-left-bg 55 | transition: all .5s 56 | transform: translate(-100%, 0) 57 | 58 | .loading-right-bg 59 | transition: all .5s 60 | transform: translate(100%, 0) 61 | 62 | .spinner-box 63 | display: none 64 | 65 | @keyframes configure-clockwise 66 | 0% 67 | transform: rotate(0) 68 | 69 | 25% 70 | transform: rotate(90deg) 71 | 72 | 50% 73 | transform: rotate(180deg) 74 | 75 | 75% 76 | transform: rotate(270deg) 77 | 78 | 100% 79 | transform: rotate(360deg) 80 | 81 | @keyframes configure-xclockwise 82 | 0% 83 | transform: rotate(45deg) 84 | 85 | 25% 86 | transform: rotate(-45deg) 87 | 88 | 50% 89 | transform: rotate(-135deg) 90 | 91 | 75% 92 | transform: rotate(-225deg) 93 | 94 | 100% 95 | transform: rotate(-315deg) 96 | -------------------------------------------------------------------------------- /source/css/_layout/pagination.styl: -------------------------------------------------------------------------------- 1 | #pagination 2 | overflow: hidden 3 | margin-top: 1rem 4 | width: 100% 5 | 6 | .pagination 7 | text-align: center 8 | 9 | .page-number 10 | display: inline-block 11 | margin: 0 .2rem 12 | min-width: w = 1.2rem 13 | height: w 14 | text-align: center 15 | line-height: w 16 | cursor: pointer 17 | 18 | &.current 19 | background: $theme-paginator-color 20 | color: var(--white) 21 | cursor: default 22 | 23 | img.prev-cover, 24 | img.next-cover 25 | position: absolute 26 | width: 100% 27 | height: 100% 28 | opacity: .4 29 | transition: all .6s 30 | object-fit: cover 31 | 32 | .pagination-info 33 | position: absolute 34 | top: 50% 35 | padding: 1rem 2rem 36 | width: 100% 37 | transform: translate(0, -50%) 38 | 39 | .prev_info, 40 | .next_info 41 | @extend .limit-one-line 42 | color: var(--white) 43 | font-weight: 500 44 | 45 | .next-post 46 | .pagination-info 47 | text-align: right 48 | 49 | .pull-full 50 | width: 100% !important 51 | 52 | .prev-post .label, 53 | .next-post .label 54 | color: var(--light-grey) 55 | text-transform: uppercase 56 | font-size: 90% 57 | 58 | .prev-post, 59 | .next-post 60 | width: 50% 61 | 62 | +maxWidth768() 63 | width: 100% 64 | 65 | a 66 | position: relative 67 | display: block 68 | overflow: hidden 69 | height: 150px 70 | 71 | &:hover 72 | img.prev-cover, 73 | img.next-cover 74 | opacity: .8 75 | transform: scale(1.1) 76 | 77 | &.pagination-post 78 | margin-top: 2rem 79 | background: $dark-black -------------------------------------------------------------------------------- /source/css/_layout/relatedposts.styl: -------------------------------------------------------------------------------- 1 | .relatedPosts 2 | margin-top: 2rem 3 | 4 | & > .headline 5 | margin-bottom: 5px 6 | font-weight: 700 7 | font-size: 1.43em 8 | 9 | & > .relatedPosts-list 10 | & > div 11 | position: relative 12 | display: inline-block 13 | overflow: hidden 14 | margin: 3px 15 | width: calc(33.333% - 6px) 16 | height: 200px 17 | background: $dark-black 18 | vertical-align: bottom 19 | 20 | &:hover 21 | .cover 22 | opacity: .8 23 | transform: scale(1.1) 24 | 25 | +maxWidth768() 26 | margin: 2px 27 | width: calc(50% - 4px) 28 | height: 150px 29 | 30 | +maxWidth600() 31 | width: calc(100% - 4px) 32 | 33 | .cover 34 | width: 100% 35 | height: 100% 36 | opacity: .4 37 | transition: all .6s 38 | object-fit: cover 39 | 40 | .content 41 | position: absolute 42 | top: 50% 43 | padding: 0 1rem 44 | width: 100% 45 | transform: translate(0, -50%) 46 | 47 | .date 48 | color: var(--light-grey) 49 | font-size: 90% 50 | 51 | .title 52 | @extend .limit-more-line 53 | color: var(--white) 54 | -webkit-line-clamp: 2 55 | -------------------------------------------------------------------------------- /source/css/_layout/reward.styl: -------------------------------------------------------------------------------- 1 | .post-reward 2 | position: relative 3 | margin-top: 4rem 4 | width: 100% 5 | text-align: center 6 | 7 | .reward-button 8 | display: inline-block 9 | padding: .2rem 1.2rem 10 | background: var(--btn-bg) 11 | color: var(--btn-color) 12 | cursor: pointer 13 | transition: all .4s 14 | 15 | &:hover 16 | & > .reward-main 17 | display: block 18 | 19 | .reward-main 20 | position: absolute 21 | bottom: 40px 22 | left: 0 23 | z-index: 100 24 | display: none 25 | padding: 0 0 15px 26 | width: 100% 27 | 28 | .reward-all 29 | display: inline-block 30 | margin: 0 31 | padding: 1rem .5rem 32 | border-radius: 4px 33 | background: var(--reward-pop) 34 | 35 | &:before 36 | position: absolute 37 | bottom: -10px 38 | left: 0 39 | width: 100% 40 | height: 20px 41 | content: '' 42 | 43 | &:after 44 | position: absolute 45 | right: 0 46 | bottom: 2px 47 | left: 0 48 | margin: 0 auto 49 | width: 0 50 | height: 0 51 | border-top: 13px solid var(--reward-pop) 52 | border-right: 13px solid transparent 53 | border-left: 13px solid transparent 54 | content: '' 55 | 56 | .reward-item 57 | display: inline-block 58 | padding: 0 8px 59 | list-style-type: none 60 | vertical-align: top 61 | 62 | img 63 | width: 130px 64 | height: 130px 65 | 66 | .post-qr-code-desc 67 | padding-top: .4rem 68 | width: 130px 69 | color: $reward-pop-up-color 70 | -------------------------------------------------------------------------------- /source/css/_layout/rightside.styl: -------------------------------------------------------------------------------- 1 | #rightside 2 | position: fixed 3 | right: -38px 4 | bottom: $rightside-bottom 5 | z-index: 100 6 | opacity: 0 7 | transition: all .5s 8 | 9 | #rightside-config-hide 10 | transition: transform .4s 11 | transform: translate(35px, 0) 12 | 13 | &.show 14 | transform: translate(0, 0) !important 15 | 16 | & > div 17 | & > button, 18 | & > a 19 | display: block 20 | margin-bottom: 2px 21 | width: 30px 22 | height: 30px 23 | background-color: var(--btn-bg) 24 | color: var(--btn-color) 25 | text-align: center 26 | font-size: 14px 27 | border-radius: 6px 28 | 29 | &:hover 30 | background-color: var(--btn-hover-color) 31 | 32 | #mobile-toc-button 33 | display: none 34 | 35 | +maxWidth900() 36 | display: block 37 | 38 | +maxWidth900() 39 | #hide-aside-btn 40 | display: none 41 | -------------------------------------------------------------------------------- /source/css/_layout/sidebar.styl: -------------------------------------------------------------------------------- 1 | #sidebar 2 | #menu-mask 3 | position: fixed 4 | z-index: 102 5 | display: none 6 | width: 100% 7 | height: 100% 8 | background: alpha($dark-black, .8) 9 | 10 | #sidebar-menus 11 | position: fixed 12 | top: 0 13 | right: -($sidebar-width) 14 | z-index: 103 15 | overflow-x: hidden 16 | overflow-y: auto 17 | width: $sidebar-width 18 | height: 100% 19 | background: var(--sidebar-bg) 20 | transition: all .5s 21 | 22 | &.open 23 | transform: translate3d(-100%, 0, 0) 24 | 25 | & > .author-avatar 26 | padding: 1.3rem 1.5rem 0 27 | text-align: center 28 | 29 | img 30 | width: 110px 31 | height: 110px 32 | border-radius: 70px 33 | transition: all .5s 34 | 35 | &:hover 36 | transform: rotate(360deg) 37 | 38 | .site-data 39 | display: table 40 | padding: .6rem .5rem 0 41 | width: 100% 42 | table-layout: fixed 43 | 44 | .data-item 45 | display: table-cell 46 | 47 | .data-item-link 48 | & > a > div 49 | @extend .limit-one-line 50 | 51 | .length-num 52 | color: var(--text-highlight-color) 53 | font-size: 1.28em 54 | 55 | .headline 56 | color: var(--font-color) 57 | 58 | hr 59 | margin: 1rem auto 60 | 61 | .menus_items 62 | padding: 2rem .5rem 2rem 63 | 64 | .site-page 65 | @extend .limit-one-line 66 | position: relative 67 | display: block 68 | padding: .3rem 1.5rem 69 | color: var(--font-color) 70 | font-size: 1.15em 71 | cursor: pointer 72 | 73 | i:first-child 74 | width: 25% 75 | text-align: left 76 | 77 | span 78 | width: 75% 79 | 80 | &:hover 81 | color: $light-blue 82 | 83 | .expand 84 | position: absolute 85 | top: .78em 86 | right: .4rem 87 | transition: transform .3s 88 | 89 | &.hide 90 | transform: rotate(90deg) !important 91 | 92 | .menus_item_child 93 | margin: 0 0 0 1rem 94 | list-style: none 95 | font-weight: lighter 96 | if hexo-config('hide_sidebar_menu_child') 97 | display: none -------------------------------------------------------------------------------- /source/css/_layout/third-party.styl: -------------------------------------------------------------------------------- 1 | #vcomment, 2 | #waline 3 | font-size: 1.1em 4 | 5 | .vbtn 6 | border: none 7 | background: var(--btn-bg) 8 | color: var(--btn-color) 9 | 10 | &:hover 11 | background: var(--btn-hover-color) 12 | 13 | .vimg 14 | transition: all .3s 15 | 16 | &:hover 17 | transform: rotate(360deg) 18 | 19 | .vcards .vcard .vcontent.expand 20 | &:before, 21 | &:after 22 | z-index: 22 23 | 24 | if hexo-config('valine.bg') 25 | #vcomment 26 | textarea 27 | background: url(hexo-config('valine.bg')) 100% 100% no-repeat 28 | 29 | &:focus 30 | background-image: none 31 | 32 | if hexo-config('waline.bg') 33 | #waline-wrap 34 | textarea 35 | background: url(hexo-config('waline.bg')) 100% 100% no-repeat 36 | 37 | &:focus 38 | background-image: none 39 | 40 | .fireworks 41 | position: fixed 42 | top: 0 43 | left: 0 44 | z-index: $fireworks-zIndex 45 | pointer-events: none 46 | 47 | .medium-zoom-image--opened 48 | z-index: 99999 !important 49 | margin: 0 !important 50 | 51 | .medium-zoom-overlay 52 | z-index: 99999 !important 53 | 54 | .mermaid 55 | overflow: auto 56 | margin: 0 0 1rem 57 | background: $white 58 | text-align: center 59 | opacity: 0 60 | transition: all .3s 61 | 62 | &[data-processed] 63 | opacity: 1 64 | 65 | .utterances, 66 | .fb-comments iframe 67 | width: 100% !important 68 | 69 | #gitalk-container 70 | .gt-meta 71 | margin: 0 0 .8em 72 | padding: .3rem 0 .8em 73 | 74 | .katex-wrap 75 | overflow: auto 76 | 77 | if hexo-config('katex') && hexo-config('katex.hide_scrollbar') 78 | &::-webkit-scrollbar 79 | display: none 80 | 81 | // mathjax 82 | .mathjax-overflow 83 | overflow-x: auto 84 | overflow-y: hidden 85 | 86 | mjx-container[jax='CHTML'][display='true'] 87 | overflow-x: auto 88 | overflow-y: hidden 89 | padding-bottom: .3rem 90 | 91 | .aplayer 92 | color: $font-black 93 | 94 | #article-container 95 | .aplayer 96 | margin: 0 0 1rem 97 | 98 | if hexo-config('beautify.enable') 99 | ol, 100 | ul 101 | margin: 0 102 | padding: 0 103 | 104 | li 105 | margin: 0 106 | padding: 0 15px 107 | 108 | &:before 109 | content: none -------------------------------------------------------------------------------- /source/css/_page/archives.styl: -------------------------------------------------------------------------------- 1 | .article-sort 2 | margin-left: .5rem 3 | padding-left: 1rem 4 | border-left: 2px solid lighten($light-blue, 20) 5 | 6 | &-title 7 | position: relative 8 | margin-left: .5rem 9 | padding-bottom: 1rem 10 | padding-left: 1rem 11 | font-size: 1.72em 12 | 13 | &:hover 14 | &:before 15 | border-color: $pseudo-hover 16 | 17 | &:before 18 | position: absolute 19 | top: calc(((100% - 1.8rem) / 2)) 20 | left: -.45rem 21 | z-index: 1 22 | width: w = .5rem 23 | height: h = w 24 | border: .5 * w solid $light-blue 25 | border-radius: w 26 | background: var(--card-bg) 27 | content: '' 28 | line-height: h 29 | transition: all .2s ease-in-out 30 | 31 | &:after 32 | position: absolute 33 | bottom: 0 34 | left: 0 35 | z-index: 0 36 | width: .1rem 37 | height: 1.5em 38 | background: lighten($light-blue, 20) 39 | content: '' 40 | 41 | &-item 42 | position: relative 43 | display: flex 44 | align-items: center 45 | margin: 0 0 1rem .5rem 46 | transition: all .2s ease-in-out 47 | 48 | &:hover 49 | &:before 50 | border-color: $pseudo-hover 51 | 52 | &:before 53 | $w = .3rem 54 | position: absolute 55 | left: calc(-1rem - 17px) 56 | width: w = $w 57 | height: h = w 58 | border: .5 * w solid $light-blue 59 | border-radius: w 60 | background: var(--card-bg) 61 | content: '' 62 | transition: all .2s ease-in-out 63 | 64 | &.no-article-cover 65 | height: 80px 66 | 67 | .article-sort-item-info 68 | padding: 0 69 | 70 | &.year 71 | font-size: 1.43em 72 | 73 | &:hover 74 | &:before 75 | border-color: $light-blue 76 | 77 | &:before 78 | border-color: $pseudo-hover 79 | 80 | &-time 81 | color: $theme-meta-color 82 | font-size: 95% 83 | 84 | time 85 | padding-left: .3rem 86 | cursor: default 87 | 88 | &-title 89 | @extend .limit-more-line 90 | color: var(--font-color) 91 | font-size: 1.1em 92 | transition: all .3s 93 | -webkit-line-clamp: 2 94 | 95 | &:hover 96 | color: $text-hover 97 | transform: translateX(10px) 98 | 99 | &-img 100 | overflow: hidden 101 | width: 80px 102 | height: 80px 103 | 104 | img 105 | width: 100% 106 | height: 100% 107 | border-radius: 5px 108 | transition: all .6s 109 | object-fit: cover 110 | 111 | &:hover 112 | transform: scale(1.1) 113 | 114 | &-info 115 | flex: 1 116 | padding: 0 .8rem 117 | -------------------------------------------------------------------------------- /source/css/_page/categories.styl: -------------------------------------------------------------------------------- 1 | #page 2 | .category-lists 3 | padding: 1rem 0 1.5rem 4 | 5 | +maxWidth768() 6 | padding: 0 7 | 8 | .category-title 9 | font-size: 2.57em 10 | 11 | +maxWidth768() 12 | font-size: 2em 13 | 14 | .category-list 15 | a 16 | color: var(--font-color) 17 | 18 | &:hover 19 | color: $text-hover 20 | 21 | .category-list-count 22 | margin-left: .4rem 23 | color: $theme-meta-color 24 | 25 | &:before 26 | content: '(' 27 | 28 | &:after 29 | content: ')' 30 | 31 | ul 32 | margin-top: .4rem 33 | padding: 0 0 0 1rem 34 | list-style: none 35 | counter-reset: li 36 | 37 | ul 38 | padding-left: .2rem 39 | 40 | li 41 | position: relative 42 | margin: .3rem 0 43 | padding: .12em .4em .12em 1.4em 44 | 45 | &:before 46 | position: absolute 47 | left: 0 48 | cursor: pointer 49 | transition: all .3s ease-out 50 | $w = .43em 51 | top: .7em 52 | width: w = $w 53 | height: h = w 54 | border: .5 * w solid $light-blue 55 | border-radius: w 56 | background: transparent 57 | content: '' 58 | // line-height: h 59 | 60 | &:hover 61 | &:before 62 | border-color: $pseudo-hover 63 | -------------------------------------------------------------------------------- /source/css/_page/common.styl: -------------------------------------------------------------------------------- 1 | 2 | .layout 3 | display: flex 4 | margin: 0 auto 5 | padding: 4rem 1rem 6 | max-width: 1500px 7 | min-height: calc(100vh) 8 | 9 | +maxWidth900() 10 | flex-direction: column 11 | 12 | +maxWidth768() 13 | padding: 1rem 5px 14 | 15 | +minWidth2000() 16 | max-width: 1700px 17 | 18 | & > div:first-child:not(.recent-posts) 19 | align-self: flex-start 20 | padding: 50px 40px 21 | border-radius: 8px 22 | background: var(--card-bg) 23 | box-shadow: var(--card-box-shadow) 24 | border-style: solid; 25 | border-width: 0.0001px; 26 | border-color: rgba(255, 227, 230, 0.06); 27 | 28 | &:hover 29 | box-shadow: var(--card-hover-box-shadow) 30 | 31 | +maxWidth768() 32 | padding: 1.8rem .7rem !important 33 | 34 | & > div:first-child 35 | width: 75% 36 | transition: all .3s 37 | 38 | +maxWidth900() 39 | width: 100% !important 40 | 41 | if hexo-config('aside.position') == 'left' 42 | +minWidth900() 43 | order: 2 44 | 45 | // 隱藏aside 46 | &.hide-aside 47 | max-width: 1500px 48 | // padding: 5rem 1rem 49 | 50 | +minWidth2000() 51 | max-width: 1700px 52 | 53 | +maxWidth600() 54 | padding: 1rem 10px 55 | 56 | & > div 57 | width: 100% !important -------------------------------------------------------------------------------- /source/css/_page/dist/categories.css: -------------------------------------------------------------------------------- 1 | #page .category-lists { 2 | padding: 1rem 0 1.5rem; 3 | maxWidth768() 4 | } 5 | #page .category-lists .category-title { 6 | font-size: 2.57em; 7 | maxWidth768() 8 | } 9 | #page .category-lists .category-list a { 10 | color: var(--font-color); 11 | } 12 | #page .category-lists .category-list a:hover { 13 | color: $text-hover; 14 | } 15 | #page .category-lists .category-list .category-list-count { 16 | margin-left: 0.4rem; 17 | color: $theme-meta-color; 18 | } 19 | #page .category-lists .category-list .category-list-count:before { 20 | content: '('; 21 | } 22 | #page .category-lists .category-list .category-list-count:after { 23 | content: ')'; 24 | } 25 | #page .category-lists ul { 26 | margin-top: 0.4rem; 27 | padding: 0 0 0 1rem; 28 | list-style: none; 29 | counter-reset: li; 30 | } 31 | #page .category-lists ul ul { 32 | padding-left: 0.2rem; 33 | } 34 | #page .category-lists ul li { 35 | position: relative; 36 | margin: 0.3rem 0; 37 | padding: 0.12em 0.4em 0.12em 1.4em; 38 | } 39 | #page .category-lists ul li:before { 40 | position: absolute; 41 | left: 0; 42 | cursor: pointer; 43 | transition: all 0.3s ease-out; 44 | top: 0.7em; 45 | width: 0.43em; 46 | height: 0.43em; 47 | border: 0.215em solid $light-blue; 48 | border-radius: 0.43em; 49 | background: transparent; 50 | content: ''; 51 | } 52 | #page .category-lists ul li:hover:before { 53 | border-color: $pseudo-hover; 54 | } 55 | -------------------------------------------------------------------------------- /source/css/_page/dist/common.css: -------------------------------------------------------------------------------- 1 | .layout { 2 | display: flex; 3 | margin: 0 auto; 4 | padding: 2rem 15px; 5 | max-width: 1200px; 6 | min-height: calc(100vh); 7 | maxWidth900() 8 | maxWidth768() 9 | minWidth2000() 10 | } 11 | .layout > div:first-child:not(.recent-posts, 12 | .layout .gallery-page) { 13 | align-self: flex-start; 14 | padding: 50px 40px; 15 | border-radius: 8px; 16 | background: var(--card-bg); 17 | box-shadow: var(--card-box-shadow); 18 | maxWidth768() 19 | } 20 | .layout > div:first-child:not(.recent-posts:hover, 21 | .layout .gallery-page):hover { 22 | box-shadow: var(--card-hover-box-shadow); 23 | } 24 | .layout > div:first-child { 25 | width: 75%; 26 | transition: all 0.3s; 27 | maxWidth900() 28 | } 29 | .layout.hide-aside { 30 | max-width: 1500px; 31 | padding: 3rem 30px; 32 | minWidth2000() 33 | } 34 | .layout.hide-aside > div { 35 | width: 100% !important; 36 | } 37 | -------------------------------------------------------------------------------- /source/css/_page/dist/tags.css: -------------------------------------------------------------------------------- 1 | .tag-cloud-list a { 2 | display: inline-block; 3 | padding: 0 0.4rem; 4 | transition: all 0.3s; 5 | maxWidth768() 6 | } 7 | .tag-cloud-list a:hover { 8 | color: $text-hover !important; 9 | transform: scale(1.1); 10 | } 11 | .tag-cloud-title { 12 | font-size: 2.57em; 13 | maxWidth768() 14 | } 15 | -------------------------------------------------------------------------------- /source/css/_page/flink.styl: -------------------------------------------------------------------------------- 1 | #article-container 2 | .flink 3 | .flink-desc 4 | margin: .2rem 0 .5rem 5 | 6 | .flink-list 7 | overflow: auto 8 | padding: 10px 10px 0 9 | text-align: center 10 | 11 | & > .flink-list-item 12 | position: relative 13 | float: left 14 | overflow: hidden 15 | margin: 15px 7px 16 | width: calc(100% / 3 - 15px) 17 | height: 90px 18 | border-radius: 8px 19 | line-height: 17px 20 | -webkit-transform: translateZ(0) 21 | 22 | +maxWidth1024() 23 | width: calc(50% - 15px) !important 24 | 25 | +maxWidth600() 26 | width: calc(100% - 15px) !important 27 | 28 | &:hover 29 | img 30 | transform: rotate(360deg) 31 | 32 | &:before 33 | position: absolute 34 | top: 0 35 | right: 0 36 | bottom: 0 37 | left: 0 38 | z-index: -1 39 | background: var(--text-bg-hover) 40 | content: '' 41 | transition: transform .3s ease-out 42 | transform: scale(0) 43 | 44 | &:hover:before, 45 | &:focus:before, 46 | &:active:before 47 | transform: scale(1) 48 | 49 | a 50 | color: var(--font-color) 51 | text-decoration: none 52 | 53 | img 54 | float: left 55 | margin: 15px 10px 56 | width: 60px 57 | height: 60px 58 | border-radius: 35px 59 | transition: all .3s 60 | 61 | .img-alt 62 | display: none 63 | 64 | .flink-item-name 65 | @extend .limit-one-line 66 | display: block 67 | padding: 16px 10px 0 0 68 | height: 40px 69 | font-weight: bold 70 | font-size: 1.43em 71 | 72 | .flink-item-desc 73 | @extend .limit-one-line 74 | display: block 75 | padding: 16px 10px 16px 0 76 | height: 50px 77 | font-size: .93em 78 | -------------------------------------------------------------------------------- /source/css/_page/tags.styl: -------------------------------------------------------------------------------- 1 | .tag-cloud 2 | &-list 3 | a 4 | display: inline-block 5 | padding: 0 .4rem 6 | transition: all .3s 7 | 8 | &:hover 9 | color: $text-hover !important 10 | transform: scale(1.1) 11 | 12 | +maxWidth768() 13 | zoom: .85 14 | 15 | &-title 16 | font-size: 2.57em 17 | 18 | +maxWidth768() 19 | font-size: 2em 20 | -------------------------------------------------------------------------------- /source/css/_revision/archive.styl: -------------------------------------------------------------------------------- 1 | 2 | 3 | #postCharts 4 | display:flex; 5 | align-items:center; 6 | justify-content:center; 7 | height:100%; 8 | .cat-chart, 9 | .post-chart, 10 | .tag-chart 11 | width: 100%; 12 | display: inline-block 13 | #categories-chart, 14 | #posts-chart, 15 | #tags-chart 16 | width : 100%; 17 | height: 16rem 18 | .category-lists 19 | .category-list 20 | display: flex 21 | flex-direction: row 22 | .category-list-item 23 | // border: solid 2px #a4b0be 24 | // border-radius: 5px 25 | width: 100% 26 | // .category-list-child 27 | // .category-list-item 28 | // display: none 29 | 30 | 31 | 32 | 33 | .tag-cloud-list 34 | padding: 10px 0 35 | a 36 | border-radius: 5px 37 | margin: 0 2px 38 | padding: 2px 10px 39 | 40 | &:hover 41 | background: #e1e3e6 42 | 43 | -------------------------------------------------------------------------------- /source/css/_revision/dashborad.styl: -------------------------------------------------------------------------------- 1 | .dashboard-weight 2 | position: relative 3 | float: left 4 | margin: 1rem 0.6rem 5 | width: calc(33% - 1.2rem) 6 | height: 16rem 7 | // overflow: hidden 8 | -webkit-transform: translate3d(0, 0, 0) 9 | +minWidth2000() 10 | height: 20rem 11 | +maxWidth768() 12 | width: calc(100% - 0.4rem) 13 | margin: 1rem 0.2rem 14 | height: 17rem 15 | &:last-child 16 | height: auto 17 | // &:hover 18 | // box-shadow: var(--card-hover-box-shadow) 19 | // img 20 | // opacity: .4 21 | // filter: blur(10px) 22 | // transform: translate3d(0, 0, 0) 23 | 24 | // // .gallery-group-name::after 25 | // // transform: translate3d(0, 0, 0) 26 | 27 | .card-style 28 | padding: 0 1rem 29 | box-shadow: var(--card-box-shadow) 30 | border-radius: 6px 31 | background-color: var(--card-bg) 32 | overflow: visible 33 | border-style: solid; 34 | border-width: 0.0001px; 35 | border-color: rgba(255, 227, 230, 0.06); 36 | +maxWidth768() 37 | padding: 0 38 | &:hover 39 | box-shadow: var(--card-hover-box-shadow) 40 | 41 | 42 | .video 43 | padding: 0 0 44 | overflow: hidden 45 | 46 | .weight-half 47 | float:left 48 | width: 100% 49 | position: relative 50 | height: 7.5rem 51 | // top: -3px 52 | 53 | +minWidth2000() 54 | height: 9.5rem 55 | 56 | +maxWidth768() 57 | width: 100% 58 | .top 59 | margin-bottom: 1rem 60 | 61 | .weight-quarter 62 | float:left 63 | position: relative 64 | height: 7.5rem 65 | width: 48% 66 | 67 | +minWidth2000() 68 | height: 9.5rem 69 | 70 | +maxWidth768() 71 | width: 100% 72 | margin: 1rem .2rem 1rem 0.2rem 73 | height: auto 74 | &:first-child 75 | height: 16rem 76 | // +maxWidth2000() 77 | // height: 14.5rem 78 | .top 79 | margin-bottom: 1rem 80 | 81 | .left 82 | margin-right: 4% 83 | .icon 84 | width: 2rem; height: 2rem; 85 | vertical-align: -0.15em; 86 | fill: currentColor; 87 | overflow: hidden; 88 | 89 | .frosted-gross 90 | -webkit-backdrop-filter: blur(5px); 91 | backdrop-filter: blur(5px); -------------------------------------------------------------------------------- /source/css/_revision/footer.styl: -------------------------------------------------------------------------------- 1 | ol, 2 | ul 3 | list-style: none 4 | margin: 0 5 | padding: 0 6 | 7 | #footer-section 8 | height: 100% 9 | position: relative 10 | overflow: hidden 11 | margin: 0 auto 12 | width: 25rem 13 | font-size: .8em 14 | +maxWidth600() 15 | width : 100% 16 | #footer-columns 17 | display: flex 18 | overflow: hidden 19 | .footer-column 20 | float: left 21 | height: 100% 22 | flex-basis: 25% 23 | text-align: left 24 | .footer-column-section 25 | margin-top: 20px 26 | label 27 | font-weight: bolder 28 | .footer-link 29 | opacity : 0.7 30 | color: #b6b5b6 31 | #footer-info 32 | padding-top: 10px 33 | margin-top: 1rem 34 | display: flex 35 | border-top: 1px rgba(182,181,182, .4) solid 36 | color: #b6b5b6 37 | .copyright 38 | float: left 39 | text-align: left 40 | flex-basis: 60% 41 | padding-right: 10px 42 | .icp 43 | text-align: right 44 | 45 | .footer-model 46 | -webkit-filter: drop-shadow(2px 3px 8px 6px rgba(189,195,199, .6)); 47 | filter: drop-shadow(2px 3px 8px 6px rgba(189,195,199, .6)); 48 | width: auto; 49 | height: 15rem ; 50 | position: absolute; 51 | bottom: 0; 52 | z-index: 99 53 | +maxWidth600() 54 | display: none -------------------------------------------------------------------------------- /source/css/_revision/nav.styl: -------------------------------------------------------------------------------- 1 | #blog_name 2 | margin-left: 10px; 3 | #site-logo 4 | display: inline-block 5 | float: left; 6 | width: 25px; 7 | height: 20px; 8 | opacity : .8 9 | transform: translate3d(-10px, 0, 0) 10 | -webkit-filter: brightness(100) invert(1) 11 | filter: brightness(100) invert(1) 12 | // /* for demonstration purposes; originals not entirely black */ 13 | // contrast(1000%) 14 | // /* black to white */ 15 | // invert(100%) 16 | // /* white to off-white */ 17 | // sepia(100%) 18 | // /* off-white to yellow */ 19 | // saturate(10000%) 20 | // /* do whatever you want with yellow */ 21 | // hue-rotate(90deg); 22 | // /* top: .2rem; */ 23 | 24 | #head-page-title 25 | float: left; 26 | display: inline-block 27 | align-items: center; 28 | text-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25) inset; 29 | letter-spacing: 0.175em; 30 | line-height: 1 31 | font-size: .6rem; 32 | font-family: 'Noto Sans', sans-serif; 33 | // margin-top: 3px 34 | #page-name 35 | opacity : 0.8 36 | #site-slogan 37 | opacity : 0.3 -------------------------------------------------------------------------------- /source/css/_revision/travel.styl: -------------------------------------------------------------------------------- 1 | 2 | #travel-menu 3 | position: fixed; 4 | bottom: 30px; 5 | right: 6%; 6 | color: var(--font-color); 7 | background-color: var(--card-bg); 8 | border-radius: 6px ; 9 | padding: 3px 10 | +maxWidth600() 11 | display: none 12 | label 13 | margin-right: 10px 14 | 15 | .marker 16 | display: block; 17 | border: 3px solid white ; 18 | border-radius: 6px; 19 | cursor: pointer; 20 | 21 | .mapboxgl-popup 22 | max-width: 200px; 23 | 24 | #features 25 | width: 18% 26 | margin: 30% 0 0 0; 27 | overflow-y: scroll; 28 | z-index: 999; 29 | +maxWidth600() 30 | margin-top: 140% 31 | height: 50% 32 | width: 100% 33 | +minWidth2000() 34 | margin-left: -8% 35 | width: 15% 36 | 37 | section 38 | display: inline-block; 39 | line-height: 10px; 40 | margin-bottom: 1rem; 41 | width : 100%; 42 | height: 200px; 43 | opacity : .6; 44 | border-radius: 8px; 45 | box-shadow: var(--card-box-shadow); 46 | background-color: var(--card-bg); 47 | overflow: hidden; 48 | -webkit-backdrop-filter: blur(10px); 49 | backdrop-filter: blur(10px); 50 | color: #a4b0be 51 | +maxWidth600() 52 | opacity : 0; 53 | 54 | &:last-child 55 | border-bottom: none; 56 | margin-bottom: 200px; 57 | +maxWidth600() 58 | margin-bottom: 5rem 59 | img 60 | width: 100%; 61 | height: 100px; 62 | border-radius: 8px; 63 | object-fit: cover; 64 | box-shadow: 0 0.1rem .4rem rgba(0, 0, 0, .5) 65 | .year 66 | position: absolute 67 | top: 50px 68 | right: 10px 69 | color #fff 70 | font-size: 3em 71 | font-weight: bolder 72 | .section-info 73 | margin: 20px 74 | a 75 | font-size: 1em; 76 | color: var(--font-color) 77 | .active 78 | opacity : 0.99 79 | transition: opacity 1s linear; 80 | .section-info 81 | a 82 | font-size: 1.4em; 83 | font-weight: bolder 84 | i 85 | color: #f39c12 86 | 87 | -------------------------------------------------------------------------------- /source/css/_revision/weibo.styl: -------------------------------------------------------------------------------- 1 | 2 | 3 | #weibo-head 4 | .weibo-head-img 5 | height: auto 6 | display: inline-block 7 | width : .8rem 8 | transform: translate(-5px, 18px) 9 | .weibo-head-title 10 | display: inline-block 11 | font-size: 2em 12 | color: var(--font-color) 13 | -------------------------------------------------------------------------------- /source/css/_search/algolia.styl: -------------------------------------------------------------------------------- 1 | #algolia-search 2 | .search-dialog 3 | animation: titlescale .5s 4 | 5 | .ais-search-box 6 | margin: 0 auto 7 | max-width: 100% 8 | width: 100% 9 | 10 | input 11 | padding: .25rem .7rem 12 | outline: none 13 | border: 2px solid $search-color 14 | border-radius: 6px 15 | background: var(--search-bg) 16 | color: var(--search-input-color) 17 | margin-bottom: .6rem 18 | 19 | .ais-hits--item.algolia-hit-item 20 | position: relative 21 | padding-left: 1.2rem 22 | 23 | &:hover 24 | &:before 25 | border-color: $pseudo-hover 26 | 27 | &:before 28 | $w = .5em 29 | position: absolute 30 | top: .53em 31 | left: 0 32 | width: w = $w 33 | height: h = w 34 | border: .15rem solid $search-color 35 | border-radius: w 36 | background: transparent 37 | content: '' 38 | line-height: h 39 | transition: all .2s ease-in-out 40 | 41 | a 42 | display: block 43 | color: var(--search-result-title) 44 | cursor: pointer 45 | 46 | &:hover 47 | color: $search-color 48 | 49 | em 50 | color: $search-keyword-highlight 51 | font-weight: bold 52 | 53 | .ais-pagination.pagination 54 | margin: .8rem 0 0 55 | padding: 0 56 | text-align: center 57 | 58 | .ais-pagination--item 59 | margin: 0 .2rem 60 | padding: 0 61 | 62 | a 63 | display: inline-block 64 | min-width: 1.2rem 65 | height: 1.2rem 66 | text-align: center 67 | line-height: 1.2rem 68 | 69 | .ais-pagination--item.current 70 | a 71 | background: $theme-paginator-color 72 | color: #eee 73 | cursor: default 74 | 75 | .algolia-logo 76 | padding-top: 2px 77 | width: 4rem 78 | height: 1.5rem -------------------------------------------------------------------------------- /source/css/_search/dist/algolia.css: -------------------------------------------------------------------------------- 1 | #algolia-search .search-dialog { 2 | animation: titlescale 0.5s; 3 | } 4 | #algolia-search .search-dialog .ais-search-box { 5 | margin: 0 auto; 6 | max-width: 100%; 7 | width: 100%; 8 | } 9 | #algolia-search .search-dialog .ais-search-box input { 10 | padding: 0.25rem 0.7rem; 11 | outline: none; 12 | border: 2px solid $search-color; 13 | border-radius: 2rem; 14 | background: var(--search-bg); 15 | color: var(--search-input-color); 16 | } 17 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item { 18 | position: relative; 19 | padding-left: 1.2rem; 20 | } 21 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item:hover:before { 22 | border-color: $pseudo-hover; 23 | } 24 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item:before { 25 | position: absolute; 26 | top: 0.53em; 27 | left: 0; 28 | width: 0.5em; 29 | height: 0.5em; 30 | border: 0.15rem solid $search-color; 31 | border-radius: 0.5em; 32 | background: transparent; 33 | content: ''; 34 | line-height: 0.5em; 35 | transition: all 0.2s ease-in-out; 36 | } 37 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item a { 38 | display: block; 39 | color: var(--search-result-title); 40 | cursor: pointer; 41 | } 42 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item a:hover { 43 | color: $search-color; 44 | } 45 | #algolia-search .search-dialog .ais-hits--item.algolia-hit-item em { 46 | color: $search-keyword-highlight; 47 | font-weight: bold; 48 | } 49 | #algolia-search .search-dialog .ais-pagination.pagination { 50 | margin: 0.8rem 0 0; 51 | padding: 0; 52 | text-align: center; 53 | } 54 | #algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item { 55 | margin: 0 0.2rem; 56 | padding: 0; 57 | } 58 | #algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item a { 59 | display: inline-block; 60 | min-width: 1.2rem; 61 | height: 1.2rem; 62 | text-align: center; 63 | line-height: 1.2rem; 64 | } 65 | #algolia-search .search-dialog .ais-pagination.pagination .ais-pagination--item.current a { 66 | background: $theme-paginator-color; 67 | color: #eee; 68 | cursor: default; 69 | } 70 | #algolia-search .search-dialog .algolia-logo { 71 | padding-top: 2px; 72 | width: 4rem; 73 | height: 1.5rem; 74 | } 75 | -------------------------------------------------------------------------------- /source/css/_search/dist/local-search.css: -------------------------------------------------------------------------------- 1 | #local-search .search-dialog { 2 | animation: titlescale 0.5s; 3 | } 4 | #local-search .search-dialog .local-search-box { 5 | margin: 0 auto; 6 | max-width: 100%; 7 | width: 100%; 8 | } 9 | #local-search .search-dialog .local-search-box input { 10 | padding: 0.25rem 0.7rem; 11 | width: 100%; 12 | outline: none; 13 | border: 2px solid $search-color; 14 | border-radius: 2rem; 15 | background: var(--search-bg); 16 | color: var(--search-input-color); 17 | -webkit-appearance: none; 18 | } 19 | #local-search .search-dialog .local-search__hit-item { 20 | position: relative; 21 | padding-left: 1.2rem; 22 | line-height: 1.7; 23 | } 24 | #local-search .search-dialog .local-search__hit-item:hover:before { 25 | border-color: $pseudo-hover; 26 | } 27 | #local-search .search-dialog .local-search__hit-item:before { 28 | position: absolute; 29 | top: 0.45em; 30 | left: 0; 31 | width: 0.5em; 32 | height: 0.5em; 33 | border: 0.15rem solid $search-color; 34 | border-radius: 0.5em; 35 | background: transparent; 36 | content: ''; 37 | line-height: 0.5em; 38 | transition: all 0.2s ease-in-out; 39 | } 40 | #local-search .search-dialog .local-search__hit-item a { 41 | display: block; 42 | color: var(--search-result-title); 43 | font-weight: 600; 44 | cursor: pointer; 45 | } 46 | #local-search .search-dialog .local-search__hit-item a:hover { 47 | color: $search-color; 48 | } 49 | #local-search .search-dialog .local-search__hit-item .search-result { 50 | margin: 0 0 0.4rem; 51 | word-break: break-all; 52 | } 53 | #local-search .search-dialog .local-search__hit-item .search-keyword { 54 | color: $search-keyword-highlight; 55 | font-weight: bold; 56 | } 57 | #local-search .search-dialog .search-result-list { 58 | overflow-y: auto; 59 | max-height: 10.5rem; 60 | maxWidth768() 61 | } 62 | -------------------------------------------------------------------------------- /source/css/_search/index.styl: -------------------------------------------------------------------------------- 1 | .search-dialog 2 | position: fixed 3 | top: 5rem 4 | left: 50% 5 | z-index: 1001 6 | display: none 7 | margin-left: -15rem 8 | border-radius: 8px 9 | padding: 1rem 10 | width: 30rem 11 | background: var(--search-bg) 12 | 13 | +maxWidth768() 14 | top: 0 15 | left: 0 16 | margin: 0 17 | width: 100% 18 | height: 100% 19 | 20 | hr 21 | margin: 1rem auto 22 | 23 | span.search-close-button 24 | position: absolute 25 | top: .8rem 26 | right: 1rem 27 | color: $grey 28 | font-size: 1.4em 29 | line-height: 1 30 | cursor: pointer 31 | transition: color .2s ease-in-out 32 | 33 | &:hover 34 | color: $search-color 35 | 36 | &__title 37 | padding: 0 0 .7rem 38 | color: $search-color 39 | font-size: 1.4em 40 | line-height: 1 41 | 42 | #search-mask 43 | position: fixed 44 | top: 0 45 | right: 0 46 | bottom: 0 47 | left: 0 48 | z-index: 1000 49 | display: none 50 | background: rgba($dark-black, .6) -------------------------------------------------------------------------------- /source/css/_search/local-search.styl: -------------------------------------------------------------------------------- 1 | #local-search 2 | .search-dialog 3 | animation: titlescale .5s 4 | 5 | .local-search-box 6 | margin: 0 auto 7 | max-width: 100% 8 | width: 100% 9 | 10 | input 11 | padding: .25rem .7rem 12 | width: 100% 13 | outline: none 14 | border: 2px solid $search-color 15 | border-radius: 2rem 16 | background: var(--search-bg) 17 | color: var(--search-input-color) 18 | -webkit-appearance: none 19 | 20 | .local-search__hit-item 21 | position: relative 22 | padding-left: 1.2rem 23 | line-height: 1.7 24 | 25 | &:hover 26 | &:before 27 | border-color: $pseudo-hover 28 | 29 | &:before 30 | $w = .5em 31 | position: absolute 32 | top: .45em 33 | left: 0 34 | width: w = $w 35 | height: h = w 36 | border: .15rem solid $search-color 37 | border-radius: w 38 | background: transparent 39 | content: '' 40 | line-height: h 41 | transition: all .2s ease-in-out 42 | 43 | a 44 | display: block 45 | color: var(--search-result-title) 46 | font-weight: 600 47 | cursor: pointer 48 | 49 | &:hover 50 | color: $search-color 51 | 52 | .search-result 53 | margin: 0 0 .4rem 54 | word-break: break-all 55 | 56 | .search-keyword 57 | color: $search-keyword-highlight 58 | font-weight: bold 59 | 60 | .search-result-list 61 | overflow-y: auto 62 | max-height: 10.5rem 63 | 64 | +maxWidth768() 65 | padding-bottom: 2rem 66 | max-height: 75vh !important 67 | -------------------------------------------------------------------------------- /source/css/_tags/button.styl: -------------------------------------------------------------------------------- 1 | #article-container 2 | .btn-center 3 | margin: 0 0 1rem 4 | text-align: center 5 | 6 | .btn-beautify 7 | display: inline-block 8 | margin: 0 .2rem .3rem 9 | padding: 0 1rem 10 | background-color: $btn-default-color 11 | color: $btn-color 12 | line-height: 2 13 | 14 | i + span 15 | margin-left: .3rem 16 | 17 | &:not(.block) + .btn-beautify:not(.block) 18 | margin: 0 .2rem 1rem 19 | 20 | &.block 21 | display: block 22 | margin: 0 0 1rem 23 | width: fit-content 24 | width: -moz-fit-content 25 | 26 | &.center 27 | margin: 0 auto 1rem 28 | 29 | &.right 30 | margin: 0 0 1rem auto 31 | 32 | &.larger 33 | padding: .3rem 1.3rem 34 | 35 | &:hover 36 | text-decoration: none 37 | 38 | for $type in $tagsP-types 39 | &.{$type} 40 | background-color: lookup('$tagsP-' + $type + '-color') 41 | 42 | &.outline 43 | border: 1px solid transparent 44 | border-color: $btn-default-color 45 | background-color: transparent 46 | color: $btn-default-color 47 | transition: all .3s 48 | 49 | &.button--animated:before 50 | background: $btn-default-color 51 | 52 | &:hover 53 | color: white !important 54 | 55 | for $type in $tagsP-types 56 | &.{$type} 57 | border-color: lookup('$tagsP-' + $type + '-color') 58 | color: lookup('$tagsP-' + $type + '-color') 59 | 60 | &.button--animated:before 61 | background: lookup('$tagsP-' + $type + '-color') 62 | -------------------------------------------------------------------------------- /source/css/_tags/dist/button.css: -------------------------------------------------------------------------------- 1 | #article-container .btn-center { 2 | margin: 0 0 1rem; 3 | text-align: center; 4 | } 5 | #article-container .btn-beautify { 6 | display: inline-block; 7 | margin: 0 0.2rem 0.3rem; 8 | padding: 0 1rem; 9 | background-color: $btn-default-color; 10 | color: $btn-color; 11 | line-height: 2; 12 | } 13 | #article-container .btn-beautify:not(.block) + .btn-beautify:not(.block) { 14 | margin: 0 0.2rem 1rem; 15 | } 16 | #article-container .btn-beautify.block { 17 | display: block; 18 | margin: 0 0 1rem; 19 | width: fit-content; 20 | width: -moz-fit-content; 21 | } 22 | #article-container .btn-beautify.block.center { 23 | margin: 0 auto 1rem; 24 | } 25 | #article-container .btn-beautify.block.right { 26 | margin: 0 0 1rem auto; 27 | } 28 | #article-container .btn-beautify.larger { 29 | padding: 0.3rem 1.3rem; 30 | } 31 | #article-container .btn-beautify:hover { 32 | text-decoration: none; 33 | } 34 | #article-container .btn-beautify.$tagsP-types { 35 | background-color: ; 36 | } 37 | #article-container .btn-beautify.outline { 38 | border: 1px solid transparent; 39 | border-color: $btn-default-color; 40 | background-color: transparent; 41 | color: $btn-default-color; 42 | transition: all 0.3s; 43 | } 44 | #article-container .btn-beautify.outline.button--animated:before { 45 | background: $btn-default-color; 46 | } 47 | #article-container .btn-beautify.outline:hover { 48 | color: #fff !important; 49 | } 50 | #article-container .btn-beautify.outline.$tagsP-types { 51 | border-color: ; 52 | color: ; 53 | } 54 | #article-container .btn-beautify.outline.$tagsP-types.button--animated:before { 55 | background: ; 56 | } 57 | -------------------------------------------------------------------------------- /source/css/_tags/dist/hexo.css: -------------------------------------------------------------------------------- 1 | blockquote.pullquote { 2 | position: relative; 3 | max-width: 45%; 4 | font-size: 110%; 5 | } 6 | blockquote.pullquote.left { 7 | float: left; 8 | margin: 1em 0.5em 0 0; 9 | } 10 | blockquote.pullquote.right { 11 | float: right; 12 | margin: 1em 0 0 0.5rem; 13 | } 14 | .video-container { 15 | position: relative; 16 | overflow: hidden; 17 | margin-bottom: 0.8rem; 18 | padding-top: 56.25%; 19 | height: 0; 20 | } 21 | .video-container iframe { 22 | position: absolute; 23 | top: 0; 24 | left: 0; 25 | margin-top: 0; 26 | width: 100%; 27 | height: 100%; 28 | } 29 | -------------------------------------------------------------------------------- /source/css/_tags/dist/hide.css: -------------------------------------------------------------------------------- 1 | .hide-inline > .hide-button, 2 | .hide-block > .hide-button { 3 | display: inline-block; 4 | padding: 0.3rem 1rem; 5 | background: $tag-hide-bg; 6 | color: var(--white); 7 | } 8 | .hide-inline > .hide-button.open, 9 | .hide-block > .hide-button.open { 10 | display: none; 11 | } 12 | .hide-inline > .hide-button.open + div, 13 | .hide-block > .hide-button.open + div { 14 | display: block; 15 | } 16 | .hide-inline > .hide-button.open + span, 17 | .hide-block > .hide-button.open + span { 18 | display: inline; 19 | } 20 | .hide-inline > .hide-content, 21 | .hide-block > .hide-content { 22 | display: none; 23 | } 24 | .hide-inline > .hide-button { 25 | margin: 0 0.3rem; 26 | } 27 | .hide-inline > .hide-content { 28 | margin: 0 0.3rem; 29 | } 30 | .hide-block { 31 | margin: 0 0 0.8rem; 32 | } 33 | .hide-toggle { 34 | margin-bottom: 1rem; 35 | border: 1px solid $tag-hide-toggle-bg; 36 | } 37 | .hide-toggle > .hide-button { 38 | padding: 0.3rem 0.5rem; 39 | background: $tag-hide-toggle-bg; 40 | color: #1f2d3d; 41 | cursor: pointer; 42 | } 43 | .hide-toggle > .hide-button > i { 44 | font-size: 1.2em; 45 | transition: all 0.3s; 46 | } 47 | .hide-toggle > .hide-button.open i { 48 | transform: rotate(90deg); 49 | } 50 | .hide-toggle > .hide-button.open + div { 51 | display: block; 52 | } 53 | .hide-toggle > .hide-content { 54 | display: none; 55 | margin: 1.5rem 1.2rem; 56 | } 57 | -------------------------------------------------------------------------------- /source/css/_tags/dist/inlineImg.css: -------------------------------------------------------------------------------- 1 | #article-container .inline-img { 2 | display: inline; 3 | margin: 0 3px; 4 | height: 1.1em; 5 | vertical-align: text-bottom; 6 | } 7 | -------------------------------------------------------------------------------- /source/css/_tags/dist/tabs.css: -------------------------------------------------------------------------------- 1 | #article-container .tabs { 2 | position: relative; 3 | margin: 0 0 1rem; 4 | border-right: 1px solid var(--tab-border-color); 5 | border-bottom: 1px solid var(--tab-border-color); 6 | border-left: 1px solid var(--tab-border-color); 7 | } 8 | #article-container .tabs > .nav-tabs { 9 | display: flex; 10 | flex-wrap: wrap; 11 | margin: 0; 12 | padding: 0; 13 | background: var(--tab-botton-bg); 14 | } 15 | #article-container .tabs > .nav-tabs > .tab { 16 | margin: 0; 17 | padding: 0; 18 | list-style: none; 19 | maxWidth768() 20 | } 21 | #article-container .tabs > .nav-tabs > .tab button { 22 | display: block; 23 | padding: 0.5rem 1rem; 24 | width: 100%; 25 | border-top: 2px solid var(--tab-border-color); 26 | background: var(--tab-botton-bg); 27 | color: var(--tab-botton-color); 28 | line-height: 2; 29 | transition: all 0.4s; 30 | } 31 | #article-container .tabs > .nav-tabs > .tab button i { 32 | width: 1.5em; 33 | } 34 | #article-container .tabs > .nav-tabs > .tab.active button { 35 | border-top: 2px solid $tab-active-border-color; 36 | background: var(--tab-button-active-bg); 37 | cursor: default; 38 | } 39 | #article-container .tabs > .nav-tabs > .tab:not(.active) button:hover { 40 | border-top: 2px solid var(--tab-button-hover-bg); 41 | background: var(--tab-button-hover-bg); 42 | } 43 | #article-container .tabs > .tab-contents .tab-item-content { 44 | position: relative; 45 | display: none; 46 | padding: 1.8rem 1.2rem; 47 | maxWidth768() 48 | } 49 | #article-container .tabs > .tab-contents .tab-item-content.active { 50 | display: block; 51 | animation: tabshow 0.5s; 52 | } 53 | #article-container .tabs .tab-to-top { 54 | position: relative; 55 | display: block; 56 | margin: 0 0 0 auto; 57 | color: $tab-to-top-color; 58 | } 59 | @-moz-keyframes tabshow { 60 | 0% { 61 | transform: translateY(15px); 62 | } 63 | 100% { 64 | transform: translateY(0); 65 | } 66 | } 67 | @-webkit-keyframes tabshow { 68 | 0% { 69 | transform: translateY(15px); 70 | } 71 | 100% { 72 | transform: translateY(0); 73 | } 74 | } 75 | @-o-keyframes tabshow { 76 | 0% { 77 | transform: translateY(15px); 78 | } 79 | 100% { 80 | transform: translateY(0); 81 | } 82 | } 83 | @keyframes tabshow { 84 | 0% { 85 | transform: translateY(15px); 86 | } 87 | 100% { 88 | transform: translateY(0); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /source/css/_tags/gallery.styl: -------------------------------------------------------------------------------- 1 | figure.gallery-group 2 | position: relative 3 | float: left 4 | overflow: hidden 5 | margin: 1rem 0.6rem 6 | width: calc(33% - 1.2rem) 7 | height: 250px 8 | border-radius: 4px 9 | background: $dark-black 10 | -webkit-transform: translate3d(0, 0, 0) 11 | 12 | +maxWidth600() 13 | width: calc(100% - .8rem) 14 | margin: 1rem 0.4rem 15 | 16 | &:hover 17 | img 18 | opacity: .6 19 | transform: translate3d(0, 0, 0) 20 | 21 | .gallery-group-name::after 22 | transform: translate3d(0, 0, 0) 23 | 24 | p 25 | opacity: 1 26 | transform: translate3d(0, 0, 0) 27 | 28 | img 29 | position: relative 30 | margin: 0 !important 31 | max-width: none 32 | width: calc(100% + 20px) 33 | height: 280px 34 | backface-visibility: hidden 35 | opacity: .8 36 | transition: opacity .35s, transform .35s 37 | transform: translate3d(-10px, 0, 0) 38 | object-fit: cover 39 | 40 | figcaption 41 | position: absolute 42 | top: 0 43 | left: 0 44 | padding: 1.5rem 45 | width: 100% 46 | height: 100% 47 | color: $gallery-color 48 | text-transform: uppercase 49 | backface-visibility: hidden 50 | 51 | & > a 52 | position: absolute 53 | top: 0 54 | right: 0 55 | bottom: 0 56 | left: 0 57 | z-index: 1000 58 | opacity: 0 59 | 60 | p 61 | @extend .limit-more-line 62 | margin: 0 63 | padding: .4rem 0 0 64 | letter-spacing: 1px 65 | font-size: 1.1em 66 | line-height: 1.5 67 | opacity: 0 68 | transition: opacity .35s, transform .35s 69 | transform: translate3d(100%, 0, 0) 70 | -webkit-line-clamp: 4 71 | 72 | .gallery-group-name 73 | @extend .limit-more-line 74 | position: relative 75 | margin: 0 76 | padding: .4rem 0 77 | font-weight: bold 78 | font-size: 1.65em 79 | line-height: 1.5 80 | -webkit-line-clamp: 2 81 | 82 | &:after 83 | position: absolute 84 | bottom: 0 85 | left: 0 86 | width: 100% 87 | height: 2px 88 | background: $gallery-color 89 | content: '' 90 | transition: transform .35s 91 | transform: translate3d(-100%, 0, 0) 92 | 93 | .dashboard-group-main 94 | overflow: auto 95 | padding: 0 0 .8rem 96 | 97 | .justified-gallery 98 | margin: 0 0 .8rem 99 | 100 | img 101 | opacity: 0 102 | border-radius: 2px 103 | 104 | .img-alt 105 | display: none 106 | 107 | .fancybox 108 | width: auto 109 | text-align: inherit -------------------------------------------------------------------------------- /source/css/_tags/hexo.styl: -------------------------------------------------------------------------------- 1 | // pullquote 2 | blockquote 3 | &.pullquote 4 | position: relative 5 | max-width: 45% 6 | font-size: 110% 7 | 8 | &.left 9 | float: left 10 | margin: 1em .5em 0 0 11 | 12 | &.right 13 | float: right 14 | margin: 1em 0 0 .5rem 15 | 16 | // hexo tag video 17 | .video-container 18 | position: relative 19 | overflow: hidden 20 | margin-bottom: .8rem 21 | padding-top: 56.25% 22 | height: 0 23 | 24 | iframe 25 | position: absolute 26 | top: 0 27 | left: 0 28 | margin-top: 0 29 | width: 100% 30 | height: 100% 31 | -------------------------------------------------------------------------------- /source/css/_tags/hide.styl: -------------------------------------------------------------------------------- 1 | // tag-hide 2 | .hide-inline, 3 | .hide-block 4 | & > .hide-button 5 | display: inline-block 6 | padding: .3rem 1rem 7 | background: $tag-hide-bg 8 | color: var(--white) 9 | 10 | &.open 11 | display: none 12 | 13 | & + div 14 | display: block 15 | 16 | & + span 17 | display: inline 18 | 19 | & > .hide-content 20 | display: none 21 | 22 | .hide-inline 23 | & > .hide-button 24 | margin: 0 .3rem 25 | 26 | & > .hide-content 27 | margin: 0 .3rem 28 | 29 | .hide-block 30 | margin: 0 0 .8rem 31 | 32 | .hide-toggle 33 | margin-bottom: 1rem 34 | border: 1px solid $tag-hide-toggle-bg 35 | 36 | & > .hide-button 37 | padding: .3rem .5rem 38 | background: $tag-hide-toggle-bg 39 | color: #1F2D3D 40 | cursor: pointer 41 | 42 | & > i 43 | font-size: 1.2em 44 | transition: all .3s 45 | 46 | &.open 47 | i 48 | transform: rotate(90deg) 49 | 50 | & + div 51 | display: block 52 | 53 | & > .hide-content 54 | display: none 55 | margin: 1.5rem 1.2rem 56 | -------------------------------------------------------------------------------- /source/css/_tags/inlineImg.styl: -------------------------------------------------------------------------------- 1 | #article-container 2 | .inline-img 3 | display: inline 4 | margin: 0 3px 5 | height: 1.1em 6 | vertical-align: text-bottom -------------------------------------------------------------------------------- /source/css/_tags/label.styl: -------------------------------------------------------------------------------- 1 | .hl-label 2 | padding: 2px 4px 3 | border-radius: 3px 4 | color: $btn-color 5 | 6 | &.default 7 | background-color: $btn-default-color 8 | 9 | for $type in $tagsP-types 10 | &.{$type} 11 | background-color: lookup('$tagsP-' + $type + '-color') -------------------------------------------------------------------------------- /source/css/_tags/tabs.styl: -------------------------------------------------------------------------------- 1 | 2 | #article-container 3 | .tabs 4 | position: relative 5 | margin: 0 0 1rem 6 | border-right: 1px solid var(--tab-border-color) 7 | border-bottom: 1px solid var(--tab-border-color) 8 | border-left: 1px solid var(--tab-border-color) 9 | 10 | > .nav-tabs 11 | display: flex 12 | flex-wrap: wrap 13 | margin: 0 14 | padding: 0 15 | background: var(--tab-botton-bg) 16 | 17 | > .tab 18 | margin: 0 19 | padding: 0 20 | list-style: none 21 | 22 | +maxWidth768() 23 | flex-grow: 1 24 | 25 | button 26 | display: block 27 | padding: .5rem 1rem 28 | width: 100% 29 | border-top: 2px solid var(--tab-border-color) 30 | background: var(--tab-botton-bg) 31 | color: var(--tab-botton-color) 32 | line-height: 2 33 | transition: all .4s 34 | 35 | i 36 | width: 1.5em 37 | 38 | &.active 39 | button 40 | border-top: 2px solid $tab-active-border-color 41 | background: var(--tab-button-active-bg) 42 | cursor: default 43 | 44 | &:not(.active) 45 | button 46 | &:hover 47 | border-top: 2px solid var(--tab-button-hover-bg) 48 | background: var(--tab-button-hover-bg) 49 | 50 | > .tab-contents 51 | .tab-item-content 52 | position: relative 53 | display: none 54 | padding: 1.8rem 1.2rem 55 | 56 | +maxWidth768() 57 | padding: 1.2rem .7rem 58 | 59 | &.active 60 | display: block 61 | animation: tabshow .5s 62 | 63 | .tab-to-top 64 | position: relative 65 | display: block 66 | margin: 0 0 0 auto 67 | color: $tab-to-top-color 68 | 69 | @keyframes tabshow 70 | 0% 71 | transform: translateY(15px) 72 | 73 | 100% 74 | transform: translateY(0) 75 | -------------------------------------------------------------------------------- /source/css/index.styl: -------------------------------------------------------------------------------- 1 | if hexo-config('css_prefix') 2 | @import 'nib' 3 | 4 | @import '_third-party/normalize.min.css' 5 | // project 6 | @import 'var' 7 | @import '_global/*' 8 | @import '_highlight/highlight' 9 | @import '_page/*' 10 | @import '_layout/*' 11 | @import '_tags/*' 12 | @import '_mode/*' 13 | @import '_revision/*' 14 | 15 | // search 16 | if hexo-config('algolia_search.enable') 17 | @import '_search/index' 18 | @import '_search/algolia' 19 | 20 | if hexo-config('local_search') && hexo-config('local_search.enable') 21 | @import '_search/index' 22 | @import '_search/local-search' 23 | -------------------------------------------------------------------------------- /source/css/things/sortable.min.css: -------------------------------------------------------------------------------- 1 | .sjs-default { 2 | position: relative; 3 | padding: 0; 4 | margin: 0; 5 | opacity: 0; 6 | transition: height .2s ease-out, opacity .2s ease-out .2s 7 | } 8 | 9 | [data-sjsel] { 10 | opacity: 0; 11 | position: absolute; 12 | top: 0; 13 | left: 0; 14 | transition: -webkit-transform .2s ease-out; 15 | transition: transform .2s ease-out; 16 | transition: transform .2s ease-out, -webkit-transform .2s ease-out 17 | } 18 | -------------------------------------------------------------------------------- /source/css/things/things.styl: -------------------------------------------------------------------------------- 1 | 2 | #things.container 3 | width: 100%; 4 | margin: 0 auto; 5 | ol, 6 | ul 7 | list-style: none; 8 | margin: 0; 9 | padding: 0; 10 | .wrapper 11 | padding: 0; 12 | .card 13 | overflow: hidden; 14 | border-radius: 8px; 15 | width: 100%; 16 | background-color: var(--card-bg); 17 | -webkit-backdrop-filter: blur(5px); 18 | backdrop-filter: blur(5px); 19 | height: 14rem; 20 | padding: 1rem 21 | box-shadow: var(--card-box-shadow) 22 | border-style: solid; 23 | border-width: 0.0001px; 24 | border-color: rgba(255, 227, 230, 0.06); 25 | &:hover 26 | box-shadow: var(--card-hover-box-shadow) 27 | .card__picture 28 | display: inline-block; 29 | border: .2px rgba(0, 0, 0, .2) 30 | height: 100%; 31 | border-radius: 6px; 32 | width: 50%; 33 | object-fit: cover; 34 | margin-right: 1rem 35 | 36 | .card-infos 37 | display: inline-block; 38 | position: absolute 39 | top: 0 40 | width: 40%; 41 | height: 100%; 42 | .dropped 43 | text-decoration-line: line-through 44 | .card__title 45 | font-size: 1rem; 46 | font-weight: 60; 47 | .card__text 48 | font-size: .6rem; 49 | font-weight: 300; 50 | // display: inline; 51 | .state 52 | position: absolute 53 | bottom: .5rem 54 | right: 0 55 | opacity : .8 56 | color: #7f8c8d 57 | opacity : .4 58 | font-size: .6rem; 59 | display: inline 60 | .test-post 61 | margin-left: 1rem 62 | cursor: not-allowed 63 | &.got 64 | i 65 | color: #f39c12 66 | .test-post 67 | cursor: pointer 68 | opacity: 1 69 | .sortable__nav 70 | display: flex; 71 | justify-content: center; 72 | margin-bottom: 30px; 73 | font-size: .7rem; 74 | .nav__link 75 | padding: 0 8px 0 6px; 76 | margin: 0 20px; 77 | cursor: pointer 78 | // font-weight: 300; 79 | display: inline-block; 80 | .nav__link.is-active 81 | // background: rgba(150, 150, 150, .2) 82 | border-bottom: 2px solid rgba(150, 150, 150, .6); 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /source/css/things/weibo.css: -------------------------------------------------------------------------------- 1 | #twikoo { 2 | margin-top: -2.5rem; 3 | } 4 | .tk-comments .tk-submit { 5 | display: none; 6 | } 7 | .tk-comments .tk-submit .tk-row .tk-avatar { 8 | display: none; 9 | } 10 | .tk-comments-container { 11 | padding-left: 1rem; 12 | border-left: solid 2px rgba(189,195,199,0.2); 13 | } 14 | .tk-comments-container .tk-comments-count { 15 | opacity: 0.4; 16 | } 17 | .tk-comments-container .tk-comment { 18 | border-left: none; 19 | } 20 | .tk-comments-container .tk-comment .tk-avatar { 21 | display: none; 22 | } 23 | .tk-comments-container .tk-comment .tk-main { 24 | position: relative; 25 | } 26 | .tk-comments-container .tk-comment .tk-main:before { 27 | position: absolute; 28 | content: "•"; 29 | color: rgba(189,195,199,0.8); 30 | font-size: 3rem; 31 | left: -2rem; 32 | top: 0.5rem; 33 | line-height: 0; 34 | } 35 | .tk-comments-container .tk-comment .tk-main:hover:before { 36 | -webkit-text-stroke: 4px var(--font-color); 37 | /* width and color */ 38 | text-stroke: 4px var(--font-color); 39 | } 40 | .tk-comments-container .tk-comment .tk-main:hover .tk-row { 41 | opacity: 1; 42 | } 43 | .tk-comments-container .tk-comment .tk-main .tk-row .tk-nick { 44 | display: none; 45 | } 46 | .tk-comments-container .tk-comment .tk-main .tk-row .tk-tag-green { 47 | display: none; 48 | } 49 | .tk-comments-container .tk-comment .tk-main .tk-row .tk-tag { 50 | border: none; 51 | background: none; 52 | } 53 | .tk-comments-container .tk-comment .tk-main .tk-extras { 54 | display: none; 55 | } 56 | .tk-comments-container .tk-comment .tk-main .tk-submit { 57 | display: flex; 58 | } 59 | .tk-comments-container .tk-comment .tk-main .tk-submit .tk-row .tk-avatar { 60 | display: flex; 61 | } -------------------------------------------------------------------------------- /source/img/3dIcon/icon_basket-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_basket-1.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_basket-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_basket-2.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_basket-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_basket-3.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_basket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_basket.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_delete.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_download.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_mail.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_plus.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_wechat.png -------------------------------------------------------------------------------- /source/img/3dIcon/icon_works.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/icon_works.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Basketball Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Basketball Color.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Chair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Chair.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Cloud.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Desktop.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Plant 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Plant 1.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Plant 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Plant 2.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/Weight Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/Weight Color.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/bucket a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/bucket a.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/cam 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/cam 1.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/cube a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/cube a.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/gamepad.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/red book 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/red book 2.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/rocket.png -------------------------------------------------------------------------------- /source/img/3dIcon/objects/speaker a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/3dIcon/objects/speaker a.png -------------------------------------------------------------------------------- /source/img/404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/404.jpg -------------------------------------------------------------------------------- /source/img/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/alipay.jpg -------------------------------------------------------------------------------- /source/img/avator.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/avator.JPG -------------------------------------------------------------------------------- /source/img/bg/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/bg/bg-1.jpg -------------------------------------------------------------------------------- /source/img/bg/bg-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/bg/bg-2.jpg -------------------------------------------------------------------------------- /source/img/bg/bg-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/bg/bg-3.jpg -------------------------------------------------------------------------------- /source/img/bg/bg-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/bg/bg-4.jpg -------------------------------------------------------------------------------- /source/img/bg/bg-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/bg/bg-5.jpg -------------------------------------------------------------------------------- /source/img/cube-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/cube-logo.png -------------------------------------------------------------------------------- /source/img/curioso/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/1.jpg -------------------------------------------------------------------------------- /source/img/curioso/10.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/10.JPG -------------------------------------------------------------------------------- /source/img/curioso/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/11.jpg -------------------------------------------------------------------------------- /source/img/curioso/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/12.jpg -------------------------------------------------------------------------------- /source/img/curioso/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/2.jpg -------------------------------------------------------------------------------- /source/img/curioso/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/3.jpg -------------------------------------------------------------------------------- /source/img/curioso/4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/4.JPG -------------------------------------------------------------------------------- /source/img/curioso/5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/5.JPG -------------------------------------------------------------------------------- /source/img/curioso/6.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/6.JPG -------------------------------------------------------------------------------- /source/img/curioso/7.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/7.JPG -------------------------------------------------------------------------------- /source/img/curioso/8.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/8.JPG -------------------------------------------------------------------------------- /source/img/curioso/9.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/curioso/9.JPG -------------------------------------------------------------------------------- /source/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/favicon.png -------------------------------------------------------------------------------- /source/img/friend_404.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/friend_404.gif -------------------------------------------------------------------------------- /source/img/index-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/index-1.jpg -------------------------------------------------------------------------------- /source/img/kp-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/kp-logo.png -------------------------------------------------------------------------------- /source/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/logo.png -------------------------------------------------------------------------------- /source/img/paypal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/paypal.jpg -------------------------------------------------------------------------------- /source/img/posts-img/16907/blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/posts-img/16907/blog.png -------------------------------------------------------------------------------- /source/img/posts-img/16907/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/posts-img/16907/index.png -------------------------------------------------------------------------------- /source/img/posts-img/16907/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/posts-img/16907/media.png -------------------------------------------------------------------------------- /source/img/posts-img/16907/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/posts-img/16907/profile.png -------------------------------------------------------------------------------- /source/img/pwa/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-128x128.png -------------------------------------------------------------------------------- /source/img/pwa/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-144x144.png -------------------------------------------------------------------------------- /source/img/pwa/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-152x152.png -------------------------------------------------------------------------------- /source/img/pwa/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-192x192.png -------------------------------------------------------------------------------- /source/img/pwa/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-256x256.png -------------------------------------------------------------------------------- /source/img/pwa/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-384x384.png -------------------------------------------------------------------------------- /source/img/pwa/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-512x512.png -------------------------------------------------------------------------------- /source/img/pwa/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-72x72.png -------------------------------------------------------------------------------- /source/img/pwa/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/pwa/icon-96x96.png -------------------------------------------------------------------------------- /source/img/random.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/img/ring-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/ring-logo.png -------------------------------------------------------------------------------- /source/img/store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/store.png -------------------------------------------------------------------------------- /source/img/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/img/wechat.jpg -------------------------------------------------------------------------------- /source/js/bg-music.js: -------------------------------------------------------------------------------- 1 | function bgMusic() { 2 | var player = $("#bg-music")[0]; 3 | // if(player.paused) 4 | if (player.paused) { 5 | /*如果已经暂停*/ 6 | player.play(); /*播放*/ 7 | $("#background-music").html("") 8 | } else { 9 | player.pause(); /*暂停*/ 10 | $("#background-music").html("") 11 | } 12 | 13 | } 14 | // var bgMusic = document.createElement("audio"); 15 | // document.body.appendChild(bgMusic); 16 | // bgMusic.setAttribute("id","bg-music"); 17 | // bgMusic.setAttribute("class","no-destroy"); 18 | // bgMusic.setAttribute("src","https://img-1253324855.cos.ap-chengdu.myqcloud.com/music/CharlesTheFirst%20-%20Crunksauce%20Vol%20IV%20-%2001%20All%20Ways.mp3") 19 | 20 | var player = $("#bg-music")[0]; 21 | // if(player.paused) 22 | if (player.paused) { 23 | /*如果已经暂停*/ 24 | $("#background-music").html("") 25 | } else { 26 | $("#background-music").html("") 27 | } 28 | 29 | -------------------------------------------------------------------------------- /source/js/carousel.js: -------------------------------------------------------------------------------- 1 | var slideIndex = 1; 2 | showSlides(slideIndex) 3 | var h = window.innerHeight * 1.2; 4 | document.getElementById('sketchfab-model').style.height = h + 'px'; 5 | console.log(h); 6 | 7 | function plusSlides(n) { 8 | showSlides(slideIndex += n); 9 | } 10 | 11 | // Thumbnail image controls 12 | function currentSlide(n) { 13 | showSlides(slideIndex = n); 14 | } 15 | function showSlides(n) { 16 | var i; 17 | var slides = document.getElementsByClassName("carousel-box"); 18 | var dots = document.getElementsByClassName("carousel-dot"); 19 | if (n > slides.length) {slideIndex = 1} 20 | if (n < 1) {slideIndex = slides.length} 21 | for (i = 0; i < slides.length; i++) { 22 | slides[i].style.display = "none"; 23 | } 24 | for (i = 0; i < dots.length; i++) { 25 | dots[i].className = dots[i].className.replace(" active", ""); 26 | } 27 | slides[slideIndex-1].style.display = "block"; 28 | dots[slideIndex-1].className += " active"; 29 | } 30 | 31 | var iframe = document.getElementById( 'sketchfab-model' ); 32 | var uid = '25e0e77ab56140be9fa6cb65cb4de96f'; 33 | 34 | // By default, the latest version of the viewer API will be used. 35 | var client = new Sketchfab( iframe ); 36 | 37 | // Alternatively, you can request a specific version. 38 | // var client = new Sketchfab( '1.10.1', iframe ); 39 | 40 | client.init( uid, { 41 | success: function onSuccess( api ){ 42 | api.start(); 43 | api.addEventListener( 'viewerready', function() { 44 | 45 | // API is ready to use 46 | // Insert your code here 47 | console.log( 'Viewer is ready' ); 48 | api.setFov(10, function(err, angle) { 49 | if (!err) { 50 | window.console.log('FOV set to', angle); // 45 51 | } 52 | }); 53 | 54 | api.getCameraLookAt(function(err, camera) { 55 | window.console.log(camera.position); // [x, y, z] 56 | window.console.log(camera.target); // [x, y, z] 57 | }); 58 | api.setCameraLookAt([50, -50, 2], [0, -2.5, 11], function(err) { 59 | if (!err) { 60 | window.console.log('Camera moved'); 61 | } 62 | }); 63 | } ); 64 | 65 | }, 66 | error: function onError() { 67 | console.log( 'Viewer error' ); 68 | } 69 | } ); -------------------------------------------------------------------------------- /source/js/chart/heatmap.js: -------------------------------------------------------------------------------- 1 | var chartDom = document.getElementById('heatmap'); 2 | var myChart = echarts.init(chartDom); 3 | var option; 4 | function getVirtulData(year) { 5 | year = year || '2021'; 6 | var date = +echarts.number.parseDate(year + '-01-01'); 7 | var end = +echarts.number.parseDate(year + '-12-31'); 8 | var dayTime = 3600 * 24 * 1000; 9 | var data = []; 10 | for (var time = date; time <= end; time += dayTime) { 11 | data.push([ 12 | echarts.format.formatTime('yyyy-MM-dd', time), 13 | Math.floor(Math.random() * 10000) 14 | ]); 15 | } 16 | return data; 17 | } 18 | 19 | option = { 20 | visualMap: { 21 | show: false, 22 | min: 0, 23 | max: 10000, 24 | color: ['#d7d8da','#8ace57','#02b340','#296939','#2d5131'] 25 | }, 26 | calendar: { 27 | top:15, 28 | left:15, 29 | range: '2021', 30 | cellSize: ['auto', 12], 31 | 32 | dayLabel: { 33 | fontSize: 6, 34 | nameMap: ['一', '', '三', '', '五', '','日'], 35 | margin: '8' 36 | }, 37 | monthLabel:{ 38 | fontSize:6, 39 | nameMap: ['一月', '', '', '', '五月', '','','八月','','','','十二'], 40 | }, 41 | yearLabel:{ 42 | show: false, 43 | position: 'bottom', 44 | }, 45 | splitLine: { 46 | show: false 47 | }, 48 | itemStyle: { 49 | borderRadius: 10, 50 | borderColor: 'rgba(0,0,0, 0)', 51 | borderWidth: 3, 52 | borderType: 'solid', 53 | color:'rgba(255,255,255,0.4)', 54 | 55 | 56 | } 57 | }, 58 | series: { 59 | type: 'heatmap', 60 | coordinateSystem: 'calendar', 61 | data: getVirtulData(2021) 62 | } 63 | }; 64 | option && myChart.setOption(option); -------------------------------------------------------------------------------- /source/js/chart/map.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/js/chart/map.js -------------------------------------------------------------------------------- /source/js/things/things.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kp-z/hexo-theme-unicorn/3032e5fbe6f009137b3e404fa67c36dfe139534f/source/js/things/things.js -------------------------------------------------------------------------------- /source/js/visitorMap.js: -------------------------------------------------------------------------------- 1 | $('#visitorMap').append('') -------------------------------------------------------------------------------- /source/sitemap_template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% for post in posts %} 4 | 5 | {{ post.permalink | uriencode }} 6 | {% if post.updated %} 7 | {{ post.updated | formatDate }} 8 | {% elif post.date %} 9 | {{ post.date | formatDate }} 10 | {% endif %} 11 | 12 | {% endfor %} 13 | 14 | 15 | {{ config.url | uriencode }} 16 | {{ sNow | formatDate }} 17 | daily 18 | 1.0 19 | 20 | 21 | {% for tag in tags %} 22 | 23 | {{ tag.permalink | uriencode }} 24 | {{ sNow | formatDate }} 25 | daily 26 | 0.6 27 | 28 | {% endfor %} 29 | 30 | {% for cat in categories %} 31 | 32 | {{ cat.permalink | uriencode }} 33 | {{ sNow | formatDate }} 34 | daily 35 | 0.6 36 | 37 | {% endfor %} 38 | --------------------------------------------------------------------------------