Repository: xrr2016/hexo-theme-cold-stone Branch: master Commit: 7e7a133049b7 Files: 31 Total size: 118.6 KB Directory structure: gitextract_r57p4wlh/ ├── LICENSE ├── README-ja.md ├── README-zh.md ├── README.md ├── _config.yml ├── languages/ │ ├── en.yml │ ├── ja.yml │ └── zh.yml ├── layout/ │ ├── _partial/ │ │ ├── bio.ejs │ │ ├── footer.ejs │ │ ├── head.ejs │ │ ├── header.ejs │ │ ├── prelude.ejs │ │ ├── prev_next.ejs │ │ ├── script.ejs │ │ └── search.ejs │ ├── about.ejs │ ├── archive.ejs │ ├── categories.ejs │ ├── friends.ejs │ ├── index.ejs │ ├── layout.ejs │ ├── post.ejs │ ├── projects.ejs │ └── tags.ejs └── source/ ├── manifest.json ├── scripts/ │ ├── busuanzi.js │ ├── cold-stone.js │ └── leon.js ├── styles/ │ └── cold-stone.css └── sw.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2019 轻剑快马 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README-ja.md ================================================ # Cold Stone :tada: 簡潔、シンプル、文字を主体とした [Hexo](https://hexo.io/zh-cn) ブログのテーマ ## プレビュー light ![demo](images/home.jpg) dark ![demo](images/home_night.jpg) [サンプルサイト](https://coldstone.fun) ## 特徴 - 自動的にダークモードへの切り替え - PWA(rogressive Web Apps) - [Utteranc](https://utteranc.es/) コメント対応 - モバイルデバイスフレンドリー - English/中文/日本語 ## クイックスタート まずは [Hexo](https://hexo.io) をインストールしてプロジェクトを作成します。既にインストール済みならこのトピックをスキップしてください。 ```sh npm install -g hexo-cli hexo init cd npm install ``` ### テーマのインストール ```sh git clone https://github.com/dongsu-iis/hexo-theme-cold-stone.git themes/cold-stone --depth 1 ``` ### 使い方 1. Hexo プロジェクトフォルダ配下の `_config.yml` ファイルを修正し、theme は変更する ```yml theme: cold-stone ``` 2. `themes/cold-stone` フォルダ配下の `icons` フォルダを `source` フォルダの中へ移動する 3. プロジェクトの親フォルダにて下記のコマンドを実行し、新しいページを作成する ```sh hexo new page projects hexo new page categories hexo new page tags hexo new page about ``` `source/projects/index.md` ファイルに以下のコードを追加します ```md --- layout: projects --- ``` `source/categories/index.md` ファイルに以下のコードを追加します ```md --- layout: categories --- ``` `source/tags/index.md` ファイルに以下のコードを追加します ```md --- layout: tags --- ``` 4. 以下のように Hexo ブログの設定情報を修正する `_congfig.yml` ```yml # ブログ情報 seo_title: 冷石的博客 project_dir: projects # ユーザーアイコン avatar: avatar.png # Utteranc コメント欄 comment: repo: xrr2016/blog # SNS sns: github: xrr2016 juejin: 576666b7207703006b1e0f09 twitter: xrr2016 # 訪問数の取得(GoogleTagManagerのIdが必要) track: gaid: xxxxxxxxxxxxxx ``` 5. `source` フォルダ配下に `avatar.png` 画像を追加 6. hexo-wordcount (文字数カウント)をインストール ```sh npm i --save hexo-wordcount ``` 7. hexo-all-minifier (ブログコードを圧縮する)をインストール ```sh npm i --save hexo-all-minifier ``` ### RSS hexo-generator-feed をインストール(rss リンクを生成) ```sh npm i --save hexo-generator-feed ``` `_congfig.yml` で rss を true に設定します ```yml # RSS rss: true feed: type: atom path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: ' ' order_by: -date icon: avatar.png autodiscovery: true ``` ### ローカル環境にて実行 ```sh hexo server ``` ### デプロイ hexo-deployer-git をインストール ```sh npm install hexo-deployer-git --save ``` 設定情報を修正 ```yml deploy: type: git repo: https://github.com/your-username/your-repo branch: gh-pages ``` デプロイ command ```sh hexo clean && hexo deploy ``` 他のデプロイ方法参考サイト:https://hexo.io/docs/deployment ## 導入実績 [冷石的博客](https://coldstone.fun) 💯 ![audits](images/audits.gif) ## TODOS - [x] 検索機能 - [x] ページング機能 - [x] ページの訪問数の表示 - [x] フレンドリーリンクのページ ## 変更履歴 v2019-10-10 - ブログのトラフィック統計を追加する - 記事のフォント統計の表示位置を変更しました - 表示するブログ投稿の数を追加しました - Safari での表示エラー報告を修正 [issue8](https://github.com/xrr2016/hexo-theme-cold-stone/issues/8) v2019-10-08 - 日本語のインターフェースとドキュメントを追加、@ [dongsu-iis](https://github.com/dongsu-iis) に感謝 - コードの強調表示を修正#[issue](https://github.com/xrr2016/hexo-theme-cold-stone/issues/7)、hexo に付属するコードの強調表示を無効にする必要があります - [hexo-all-minifier](https://github.com/chenzhutian/hexo-all-minifier#readme) を追加して、ブログコードを圧縮し、ブログをより速く開きます。 - 記事に前/次のリンクを追加 - 記事ラベルスタイル、記事内のリンクスタイルを更新 v v2019-09-30 - ナビゲーションバーのレイアウトを修正 - メインページのロード動画時間を増やした - ブラウザー設定に沿ってダークモードに切り替えできるように修正 v2019-09-25 - メインページのロード動画を追加 - テーマの幅を少し縮小 v2019-09-23 - PC 側のトップページレイアウト修正 - 文字数計算機能 (hexo-wordcount のインストールが必要) - PC 側では Google 検索機能を追加 - フレンドリーリンクページの新規作成 ## ライセンス [MIT](LICENSE) もしこのテーマが良いと思ったら、このリポジトリーに star をください 😎 ================================================ FILE: README-zh.md ================================================ # Cold Stone :tada: 一个简洁,清爽,文字为主的 [Hexo](https://hexo.io/zh-cn) 博客主题 ## 预览 light ![demo](images/home.jpg) dark ![demo](images/home_night.jpg) [预览地址](https://coldstone.fun) ## 特性 - 自动切换夜间模式 - PWA(渐进式应用) - [Utteranc](https://utteranc.es/) 评论系统 - 移动端友好 - English/中文 ## 快速开始 首先需要安装 [Hexo](https://hexo.io) 用来创建项目,已经初始过的可以跳过此步 ```sh npm install -g hexo-cli hexo init cd npm install ``` ### 安装主题 ```sh git clone https://github.com/xrr2016/hexo-theme-cold-stone.git themes/cold-stone --depth 1 ``` ### 使用 1. 修改你的 Hexo 博客根目录下 `_config.yml` 文件 theme 设置为 ```yml theme: cold-stone ``` 2. 将 `themes/cold-stone` 目录下的 `icons` 移动到 `source` 目录下 3. 在项目根目录执行以下命令,新建需要的页面 ```sh hexo new page projects hexo new page categories hexo new page tags hexo new page about ``` 添加 `source/projects/index.md` 的 layout 配置为 ```md --- layout: projects --- ``` 添加 `source/categories/index.md` 的 layout 配置为 ```md --- layout: categories --- ``` 添加 `source/tags/index.md` 的 layout 配置为 ```md --- layout: tags --- ``` 4. 修改你的 Hexo 博客的配置 `_congfig.yml`,示例如下 ```yml # 博客设置 seo_title: 冷石的博客 project_dir: projects # 用户设置 avatar: avatar.png # Utteranc 评论系统 comment: repo: xrr2016/blog # 社交平台链接: sns: github: xrr2016 juejin: 576666b7207703006b1e0f09 # 博客访问数据 track: gaid: xxxxxxxxxxxxxx ``` 5. 在 `source` 目录下添加 `avatar.png` 图片 6. 安装 hexo-wordcount (字数统计) ```sh npm i --save hexo-wordcount ``` 7. 安装 hexo-all-minifier (压缩博客代码) ```sh npm i --save hexo-all-minifier ``` ### RSS 安装 hexo-generator-feed (生成 rss 链接) ```sh npm i --save hexo-generator-feed ``` 在 `_congfig.yml` 设置 rss 为 true ```yml # RSS rss: true feed: type: atom path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: ' ' order_by: -date icon: avatar.png autodiscovery: true ``` ### 本地运行 ```sh hexo server ``` ### 发布 安装 hexo-deployer-git ```sh npm install hexo-deployer-git --save ``` 修改配置 ```yml deploy: type: git repo: https://github.com/your-username/your-repo branch: gh-pages ``` 发布 ```sh hexo clean && hexo deploy ``` 更多方式参考:https://hexo.io/docs/deployment ## 谁在使用 [冷石的博客](https://coldstone.fun) 💯 ![audits](images/audits.gif) ## TODOS - [x] 搜索功能 - [x] 分类页面 - [x] 显示页面访问量 - [x] 友站链接页面 ## 发布日志 v2019-10-10 - 添加博客访问量统计 - 修改了文章字体统计显示位置 - 增加了博客文章数量显示 - 修复 safari 首页动画报错问题 [issue8](https://github.com/xrr2016/hexo-theme-cold-stone/issues/8) v2019-10-08 - 添加了日文语言界面及文档,感谢 @[dongsu-iis](https://github.com/dongsu-iis) - 修复代码高亮问题 #[issue](https://github.com/xrr2016/hexo-theme-cold-stone/issues/7),需要禁用 hexo 自带的代码高亮 - 添加 [hexo-all-minifier](https://github.com/chenzhutian/hexo-all-minifier#readme) 压缩博客代码,让博客更快的打开 - 添加文章内上一篇/下一篇链接 - 更新了文章标签样式,文章内链接样式 v2019-09-30 - 修改导航栏样式 - 增加了首页加载动画时间 - 根据系统主题自动设置夜间模式 v2019-09-25 - 添加了首页加载动画 - 减小的主体内容宽度 v2019-09-23 - 修改了 PC 端首页布局 - 新增了文章字数统计功能 (需要在仓库目录安装 hexo-wordcount) - PC 端添加了 Google 站内搜索 - 新增了友链页面 ## 协议 [MIT](LICENSE) 如果觉得这个主题不错,请个这个仓库一个 star 吧。😎 ================================================ FILE: README.md ================================================ # Cold Stone :tada: A simple, refreshing, text-based [Hexo](https://hexo.io/zh-cn) blog theme. [中文文档](README-zh.md) [日本語ドキュメント](README-ja.md) ## Preview light ![demo](images/home.jpg) dark ![demo](images/home_night.jpg) [Preview Link](https://coldstone.fun) ## Feature - Auto night mode - PWA (progressive web application) - [Utteranc](https://utteranc.es/) comment System - Mobile friendly - English/Chinese ## Quick start First you need to install [Hexo](https://hexo.io) to create the project. You can skip this step if you have already started. ```sh npm install -g hexo-cli hexo init cd npm install ``` ### Install theme ```sh git clone https://github.com/xrr2016/hexo-theme-cold-stone.git themes/cold-stone --depth 1 ``` ### Usage 1. Modify the `_config.yml` file in your Hexo blog root directory to set theme to ```yml theme: cold-stone ``` 2. Move `icons` in the `themes/cold-stone` directory to the `source` directory 3. Execute the following command at the project root directory, create pages you need ```sh hexo new page projects hexo new page categories hexo new page tags hexo new page about ``` Add the layout of `source/projects/index.md` ```md --- layout: projects --- ``` Add the layout of `source/categories/index.md` ```md --- layout: categories --- ``` Add the layout of `source/tags/index.md` ```md --- layout: tags --- ``` 4. Modify the configuration of your Hexo blog `_congfig.yml`, examples are as follows ```yml # blog config seo_title: 冷石的博客 project_dir: projects # user config avatar: avatar.png # Utteranc comment system comment: repo: xrr2016/blog # sns link: sns: github: xrr2016 juejin: 576666b7207703006b1e0f09 # page stat track: gaid: xxxxxxxxxxxxxx ``` 5. Add a `avatar.png` image to the `source` directory 6. Install hexo-wordcount (word count) ```sh npm i --save hexo-wordcount ``` 7. Install hexo-all-minifier (Compress blog code) ```sh npm i --save hexo-all-minifier ``` ### RSS Install hexo-generator-feed (generate rss link) ```sh npm i --save hexo-generator-feed ``` Set rss to true in `_congfig.yml` ```yml # RSS rss: true feed: type: atom path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: ' ' order_by: -date icon: avatar.png autodiscovery: true ``` ### Run local ```sh hexo server ``` ### Deploy - install hexo-deployer-git ```sh npm install hexo-deployer-git --save ``` - set config ```yml deploy: type: git repo: https://github.com/your-username/your-repo branch: gh-pages ``` - publish ```sh hexo clean && hexo deploy ``` More ways to refer:https://hexo.io/docs/deployment ## Using [cold stone's blog](https://coldstone.fun) 💯 ![audits](images/audits.gif) ## TODOS - [x] Search - [x] Category - [x] Show page views - [x] Friends link page ## Release log v2019-10-10 - Add blog traffic statistics - Modified the article font statistics display position - Added the number of blog posts to display - Fixed safari homepage error reporting [issue8](https://github.com/xrr2016/hexo-theme-cold-stone/issues/8) v2019-10-08 - Added Japanese language interface and documentation, thanks @[dongsu-iis](https://github.com/dongsu-iis) - Fix code highlighting #[issue](https://github.com/xrr2016/hexo-theme-cold-stone/issues/7), need to disable the code highlighting that comes with hexo - Added [hexo-all-minifier](https://github.com/chenzhutian/hexo-all-minifier#readme) to compress your blog code and let your blog open faster - Add a previous/next link in the article - Updated article label style, link style within article V2019-09-30 - Modify the navigation bar style - Increse homepage loading animation time - Automatically set night mode according to system theme v2019-09-25 - Added homepage loading animation - Reduced body content width v2019-09-23 - Modified PC home page layout - Added article word count function (need install hexo-wordcount under blog folder) - Added Google Site Search on the PC side - Added friends chain page ## License [MIT](LICENSE) If you think this theme is no bad, please star this repo. 😎 ================================================ FILE: _config.yml ================================================ # Minifier Site Source all_minifier: true ================================================ FILE: languages/en.yml ================================================ title: Your Blog Title nav: home: HOME tags: TAGS about: ABOUT projects: PROJECTS friends: FRIENDS archives: ARCHIVES categories: CATEGORIES post: postTime: Post updateTime: Last Update tags: Tags more: Read more wordCount: Word Count readingTime: Reading Time notMore: Not More readed: Readed search: Search page: previous: previous next: next blog: totalpost: Total wordcount: Blog Word Count visitcount: Blog Visit Count back: Back ================================================ FILE: languages/ja.yml ================================================ title: ブログタイトル nav: home: ホーム tags: タグ about: 私について friends: 友達 projects: プロジェクト archives: アーカイブ categories: カテゴリー post: postTime: 作成日時 updateTime: 更新日時 tags: タグ more: もっと読む wordCount: 文字数 readingTime: 閲覧時間 notMore: それ以上ない readed: 閲覧回数 search: 検索 page: previous: 前へ next: 次へ blog: totalpost: 合計 wordcount: 総文字数 visitcount: 訪問者数 back: 戻る ================================================ FILE: languages/zh.yml ================================================ title: 你的博客标题 nav: home: 首页 tags: 标签 about: 关于 friends: 友链 projects: 项目 archives: 归档 categories: 分类 post: postTime: 发布于 updateTime: 最后更新 tags: 标签 more: 阅读全文 wordCount: 字数 readingTime: 阅读时间 notMore: 没有更多了 readed: 阅读量 search: 搜索 page: previous: 上一页 next: 下一页 blog: totalpost: 共计 wordcount: 总字数 visitcount: 访客数 back: 返回 ================================================ FILE: layout/_partial/bio.ejs ================================================

<%= config.author %>

<%= config.subtitle %>

================================================ FILE: layout/_partial/footer.ejs ================================================ ================================================ FILE: layout/_partial/head.ejs ================================================ <%_ if (page.title) { %><%= page.title + ' - ' + config.seo_title %><% } else {%><%= config.seo_title %><% } _%> <%- css(['styles/cold-stone.css']) %> ================================================ FILE: layout/_partial/header.ejs ================================================
================================================ FILE: layout/_partial/prelude.ejs ================================================ ================================================ FILE: layout/_partial/prev_next.ejs ================================================
<% if (page.prev) { %> <% } else { %> <% } %> <% if (page.next){ %> <% } else { %> <% } %>
================================================ FILE: layout/_partial/script.ejs ================================================ <% if (config.author && is_home()) { %> <%- js('scripts/leon.js') %> <% } %> <% if (is_post()) { %> <% } %> <%- js('scripts/cold-stone.js') %> <% if(config.track.gaid) { %> <% } %> ================================================ FILE: layout/_partial/search.ejs ================================================
================================================ FILE: layout/about.ejs ================================================ --- layout: layout ---
<%- partial('_partial/bio', null, {cache: true}) %>
================================================ FILE: layout/archive.ejs ================================================ --- layout: layout --- <% const years = {}; site.posts.sort('date').reverse().forEach(function(post){ let year = post.date.year() if(years[year]===undefined){ years[year] = []; } years[year].push(post); }); %>
<%= __('blog.totalpost') %>: <%= site.posts.length %>
================================================ FILE: layout/categories.ejs ================================================ ================================================ FILE: layout/friends.ejs ================================================ --- layout: layout ---
  • 空空如也...
================================================ FILE: layout/index.ejs ================================================ --- layout: layout ---
<% if(page.total > 2) { %> <% } else { %> <% } %>
================================================ FILE: layout/layout.ejs ================================================ <%- partial('_partial/head') %> <% if (config.author && is_home()) { %> <%- partial('_partial/prelude', null, {cache: false}) %> <% } %> <%- partial('_partial/header', null, {cache: false}) %>
<%- body %>
<% if (!is_post()) { %> <%- partial('_partial/footer', null, {cache: false}) %> <% } %> <%- partial('_partial/script', null, {cache: false}) %> ================================================ FILE: layout/post.ejs ================================================

<%- trim(page.title.replace(/[<>&"]/g, function(c){ return {'<':'<','>':'>','&':'&','"':'"'}[c]; })) %>

<%- page.more %>
<%- partial('_partial/prev_next', null, {cache: false}) %>
<%- toc(page.more, {list_number : false }) %>
================================================ FILE: layout/projects.ejs ================================================ --- layout: layout --- ================================================ FILE: layout/tags.ejs ================================================ ================================================ FILE: source/manifest.json ================================================ { "name": "你的博客标题", "short_name": "博客标题", "theme_color": "#606266", "background_color": "#ffffff", "display": "standalone", "start_url": "/", "orientation": "portrait", "Scope": "/", "icons": [ { "src": "/icons/icon-72x72.png", "sizes": "72x72", "type": "image/png" }, { "src": "/icons/icon-96x96.png", "sizes": "96x96", "type": "image/png" }, { "src": "/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, { "src": "/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png" }, { "src": "/icons/icon-152x152.png", "sizes": "152x152", "type": "image/png" }, { "src": "/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icons/icon-384x384.png", "sizes": "384x384", "type": "image/png" }, { "src": "/icons/icon-512x512.png", "sizes": "512x512", "type": "image/png" } ] } ================================================ FILE: source/scripts/busuanzi.js ================================================ var bszCaller, bszTag; !function() { var c, d, e, a = !1, b = []; ready = function(c) { return a || "interactive" === document.readyState || "complete" === document.readyState ? c.call(document) : b.push(function() { return c.call(this) }), this } , d = function() { for (var a = 0, c = b.length; c > a; a++) b[a].apply(document); b = [] } , e = function() { a || (a = !0, d.call(window), document.removeEventListener ? document.removeEventListener("DOMContentLoaded", e, !1) : document.attachEvent && (document.detachEvent("onreadystatechange", e), window == window.top && (clearInterval(c), c = null))) } , document.addEventListener ? document.addEventListener("DOMContentLoaded", e, !1) : document.attachEvent && (document.attachEvent("onreadystatechange", function() { /loaded|complete/.test(document.readyState) && e() }), window == window.top && (c = setInterval(function() { try { a || document.documentElement.doScroll("left") } catch (b) { return } e() }, 5))) }(), bszCaller = { fetch: function(a, b) { var c = "BusuanziCallback_" + Math.floor(1099511627776 * Math.random()); window[c] = this.evalCall(b), a = a.replace("=BusuanziCallback", "=" + c), scriptTag = document.createElement("SCRIPT"), scriptTag.type = "text/javascript", scriptTag.referrerPolicy = "unsafe-url"; scriptTag.defer = !0, scriptTag.src = a, document.getElementsByTagName("HEAD")[0].appendChild(scriptTag) }, evalCall: function(a) { return function(b) { ready(function() { try { a(b), scriptTag.parentElement.removeChild(scriptTag) } catch (c) { bszTag.hides() } }) } } }, bszCaller.fetch("//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback", function(a) { bszTag.texts(a), bszTag.shows() }), bszTag = { bszs: ["site_pv", "page_pv", "site_uv"], texts: function(a) { this.bszs.map(function(b) { var c = document.getElementById("busuanzi_value_" + b); c && (c.innerHTML = a[b]) }) }, hides: function() { this.bszs.map(function(a) { var b = document.getElementById("busuanzi_container_" + a); b && (b.style.display = "none") }) }, shows: function() { this.bszs.map(function(a) { var b = document.getElementById("busuanzi_container_" + a); b && (b.style.display = "inline") }) } }; ================================================ FILE: source/scripts/cold-stone.js ================================================ const themes = { dark: 'dark', light: 'light' } const documentHead = document.getElementsByTagName('head')[0] const localTheme = localStorage.getItem('theme') const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches const darkThemeHref = 'https://cdn.bootcss.com/highlight.js/9.15.10/styles/atom-one-dark.min.css' function insertThemeDarkLink() { const link = document.createElement('link') link.rel = 'stylesheet' link.href = darkThemeHref documentHead.appendChild(link) } function removeThemeDarkLink() { const links = document.querySelectorAll('link') for (let i = 0; i < links.length; i++) { const link = links[i] if (link.href === darkThemeHref) { documentHead.removeChild(link) } } } // service worker if ('serviceWorker' in navigator) { window.addEventListener('load', () => { const path = window.COLD_STONE.root + 'sw.js' navigator.serviceWorker.register(path) }) } // nav item const path = location.pathname const navLinkList = Array.from(document.querySelectorAll('.nav-list-item')) const navs = [ '/tags/', '/about/', '/friends/', '/projects/', '/archives/', '/categories/' ] if (path === '/' || /page/.test(path)) { navLinkList[0].classList.add('active') } else { navs.forEach(function (nav, index) { if (nav === path) { const item = navLinkList.find(function (item) { const link = item.dataset.link return link === nav }) if (item) { item.classList.add('active') } } }) } // article toc const tocLinkList = document.querySelectorAll('.toc-link') tocLinkList.forEach(function (link) { const href = link.href const newHref = href.replace(location.origin + '/', location.href) link.setAttribute('href', newHref) }) // comment const loader = document.getElementById('loader') const utteranc = document.getElementById('utteranc') if (utteranc) { const uscript = document.createElement('script') uscript.async = true uscript.crossOrigin = 'anonymous' uscript.src = 'https://utteranc.es/client.js' uscript.setAttribute('repo', window.COLD_STONE.repo) uscript.setAttribute('issue-term', 'pathname') const isDarkTheme = isDarkMode || localTheme === themes.dark if (isDarkTheme) { insertThemeDarkLink() uscript.setAttribute('theme', 'github-dark') } else { uscript.setAttribute('theme', 'github-light') removeThemeDarkLink() } utteranc.appendChild(uscript) // 假装在加载 const timeout = setTimeout(function () { loader.remove() clearTimeout(timeout) }, 3000) } // back const back = document.getElementById('back') if (back) { back.addEventListener('click', function () { history.back() }) } // back-to-top const backTop = document.getElementById('backTop') if (backTop) { window.addEventListener('scroll', () => { const { scrollTop, scrollHeight, clientHeight } = document.scrollingElement if (scrollTop + clientHeight >= scrollHeight) { backTop.classList.add('show') } else { backTop.classList.remove('show') } }) backTop.addEventListener('click', function () { window.scroll({ top: 0, left: 0, behavior: 'smooth' }) }) } // toggle theme const toggle = document.querySelector('.footer-toggle') const darkBtn = document.querySelector('.dark-btn') const lightBtn = document.querySelector('.light-btn') if (localTheme === themes.dark) { document.body.classList.add('dark') insertThemeDarkLink() if (darkBtn) { darkBtn.classList.remove('show') lightBtn.classList.add('show') } } else { removeThemeDarkLink() if (darkBtn) { lightBtn.classList.remove('show') darkBtn.classList.add('show') } } function findTheme(target) { const theme = target.dataset.theme if (theme) { return theme } return findTheme(target.parentElement) } if (toggle) { toggle.addEventListener('click', event => { const theme = findTheme(event.target) localStorage.setItem('theme', theme) switch (theme) { case themes.dark: document.body.classList.add('dark') darkBtn.classList.remove('show') lightBtn.classList.add('show') break; case themes.light: removeThemeDarkLink() document.body.classList.remove('dark') lightBtn.classList.remove('show') darkBtn.classList.add('show') break; } }) } // article const article = document.querySelector('.article') if (article) { const articleToc = document.querySelector('.article-toc') article.addEventListener('mouseenter', () => { // const timeout = setTimeout(() => { // articleToc.classList.add('fade') // clearTimeout(timeout) // }, 300) articleToc.classList.add('fade') }) article.addEventListener('mouseleave', () => { articleToc.classList.remove('fade') }) } // wave // const wave = document.getElementById('wave') // if (wave) { // const colors = ['#ffffff'] // const random = colors[Math.floor(Math.random() * colors.length)] // const path = wave.getElementsByTagName('path')[0] // path.setAttribute('fill', random) // } ================================================ FILE: source/scripts/leon.js ================================================ /*! * VERSION: 1.6.3 * DATE: 2019-09-13 * https://leon-sans.com * * @license Copyright (c) 2019, Jongmin Kim. All rights reserved. **/ var LeonSans=function(t){var r={};function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var n in t)e.d(i,n,function(r){return t[r]}.bind(null,n));return i},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){var i=e(1).default;t.exports=i},function(t,r,e){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,r){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:0,y:arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,w:t.rect.w*u*r,h:(t.rect.h+220)*u*r}}function x(t,r,e){return{x:t/2,y:(r-130*u*e)/2}}function g(t,r,e){var i=t.ratio.x1,n=t.ratio.x2,a=t.ratio.y1,s=t.ratio.y2;return{r:r,cr:e,fr1:c,fr2:h,gx1:i,gx2:n,gy1:a,gy2:s}}function b(t,r,e,i,n){var a=(i-n)/(r-e)*(t-e)+n;return ai&&(a=i),a}function S(t){var r,e,i,n,a,s,o,l,f,y,c,h=t.typo.p.length,u=[];for(r=0;r0)for(i=0;i0&&"a"!=r.pos.type){var i=r.lengths*e;t.setLineDash([r.lengths]),t.lineDashOffset=r.direction*(i+r.lengths),t.stroke()}}})}return u}function m(t,r){var e,i,n=t.length,a=[];for(e=0;e0){var l=e*o;t.setLineDash([e]),t.lineDashOffset=r.direction*(l+e),t.stroke()}return s}function X(t,r,e,i){var n,a;if(1==r.drawing.value)for(n=r.lines.length,a=0;a0&&(d[0].start=1,Array.prototype.push.apply(u,d))}return u}function et(t,r,e){var i,n,a,s,o,l,f,y=t.length,c=[],h=1,u=1;for(r>-1&&(u=b(r,1,0,80,10)*e),i=0;i0&&null!=(f=it(o,tt,s,l))&&(h&&(f.type="m",h=0),c.push(f)),tt=new V(o);return c}function it(t,r,e,i){if(t.type=e.type,t.distance=e.distance,t.num=i,r&&null==t.rotation){var n=t.x-r.x,a=t.y-r.y,s=Math.atan2(n,a);t.rotation=-s}else t.rotation=t.rotation;return t.rotation==ft?null:t}function nt(t,r){var e=at(t.x1,t.x2,t.x3,t.x4,r),i=at(t.y1,t.y2,t.y3,t.y4,r),n=st(t.x1,t.x2,t.x3,t.x4,r),a=st(t.y1,t.y2,t.y3,t.y4,r);return new V({x:e,y:i,rotation:-Math.atan2(n,a)})}function at(t,r,e,i,n){var a=n*n;return t+(3*-t+n*(3*t-t*n))*n+(3*r+n*(-6*r+3*r*n))*n+(3*e-3*e*n)*a+i*(a*n)}function st(t,r,e,i,n){return 3*n*n*(3*r-t-3*e+i)+6*n*(t-2*r+e)+3*(-t+r)}var ot=Math.PI/180*180,lt=Math.PI/180*90,ft=-100,yt=1.5,ct="tofu",ht=824;function ut(t,r,e,i,n,a,s,o){var l,f=[],y=o.length;for(l=0;l":ut(423,90,352,0,0,0,0,[{d:-1,v:[["m",0,0,{x:-1,y:.3,r:pt(0,0,90,176)}],["l",90,176,{r:ot,f:1}],["l",0,352,{x:-1,y:.3,f:1}]]}]),"/":ut(433,130,352,0,0,0,0,[{d:1,v:[["m",0,352,{r:pt(0,352,130,0),f:1,y:0}],["l",130,0,{y:0}]]}]),"þ":ut(600,232,338,-10,-2,-117,-117,[{d:-1,v:[["m",0,-106,{y:0}],["l",0,116,{r:ft}],["b",0,180.1,51.9,232,116,232,{r:lt}],["b",180.1,232,232,180.1,232,116,{r:ot}],["b",232,51.9,180.1,0,116,0,{r:lt}],["b",51.9,0,0,51.9,0,116,{r:ot}],["l",0,338,{y:0,f:1}]]}]),"Þ":ut(520,162,352,-5,-70,0,0,[{d:-1,v:[["m",0,0,{x:0,y:0,r:ot}],["l",0,352,{x:0,y:0,r:ot,f:1}]]},{d:1,v:[["m",0,281.6,{x:0,r:lt,f:1,p:1}],["l",57,281.6,{x:-.5,r:lt,f:1}],["b",115,281.6,162,233.4,162,175.4,{x:-.5,r:ot}],["b",162,117.4,115,70.4,57,70.4,{x:-.5,r:lt}],["l",0,70.4,{x:0,r:lt,f:1,p:1}]]}]),"ß":ut(596,209,352,-10,-10,0,0,[{d:1,v:[["m",0,348.3,{r:ot,f:1,x:0,y:0}],["l",0,104.3,{x:0}],["b",0,46,36,0,98.9,0,{x:0}],["b",145.2,0,191,27.9,191,81,{x:1}],["b",191,110.7,165.6,131.8,151.8,140.9],["l",140,148.8],["b",120.6,161.7,110.8,172.8,110.8,185.5],["b",110.8,206.7,131.6,213.8,140,217.5],["b",190.6,241.1,211,262.7,211,289.6],["b",211,329.5,174.8,352,142.5,352],["b",97.3,352,75.2,319.7,72.3,289.3]]}])};function Bt(t,r){var e=t,i=-60+r;return[{d:-1,v:[["m",-40+e,i,{x:0,y:0,r:pt(-40+e,i,0+e,60+i)}],["l",0+e,60+i,{x:0,y:0,f:1}]]}]}function Ht(t,r){var e=t,i=-60+r;return[{d:-1,v:[["m",40+e,i,{x:0,y:0,r:pt(40+e,i,0+e,60+i)}],["l",0+e,60+i,{x:0,y:0,f:1}]]}]}function Kt(t,r){var e=-68+t,i=0+r;return[{d:-1,v:[["m",0+e,50+i,{r:pt(0+e,50+i,68-yt+e,0+i),y:0,x:0}],["l",68-yt+e,0+i,{r:pt(0+e,50+i,68-yt+e,0+i),y:0,x:0,f:1}],["l",68+yt+e,0+i,{r:pt(68+yt+e,0+i,136+e,50+i),y:0,x:0,f:1,v:1}],["l",136+e,50+i,{y:0,x:0,f:1}]]}]}function Qt(t,r){var e=t-76.24,i=r;return[{d:1,v:[["m",159.52+e,16.56+i,{x:-1,y:-.2,r:vt(159.52+e,16.56+i,150.08+e,29.28+i,134.56+e,37.68+i,118.56+e,37.68+i,0),f:1}],["b",150.08+e,29.28+i,134.56+e,37.68+i,118.56+e,37.68+i,{x:-1,y:-.2,r:lt}],["b",103.28+e,37.68+i,89.68+e,29.28+i,76.24+e,20.4+i,{x:-1,y:-.2}],["b",61.44+e,10.56+i,47.28+e,0+i,31.68+e,0+i,{x:-1,y:-.2,r:lt}],["b",17.84+e,0+i,8.72+e,7.12+i,0+e,16+i,{x:-1,y:-.2}]]}]}function Ut(t,r){return[{d:1,v:[["a",-50+t,r,{x:0,y:0}]]},{d:1,v:[["a",50+t,r,{x:0,y:0}]]}]}function Vt(t,r){var e=t-57,i=r;return[{d:1,v:[["m",112.7+e,0+i,{r:vt(112.7+e,0+i+e,10.1+i,110.1+e,19.3+i,105+e,27.7+i,0),x:0,y:0,f:1}],["b",112.7+e,10.1+i,110.1+e,19.3+i,105+e,27.7+i,{x:0,y:0}],["b",99.8+e,36.1+i,92.9+e,42.8+i,84.3+e,47.7+i,{x:0,y:0}],["b",75.7+e,52.6+i,66.7+e,55+i,57.3+e,55+i,{x:0,y:0}],["b",47.5+e,55+i,38.3+e,52.6+i,29.6+e,47.7+i,{x:0,y:0}],["b",20.8+e,42.8+i,13.8+e,36.1+i,8.5+e,27.7+i,{x:0,y:0}],["b",3.2+e,19.3+i,.5+e,10.1+i,.5+e,0+i,{x:0,y:0}]]}]}function Yt(t,r){var e=88+t,i=-116+r;return[{d:1,v:[["m",116+e,58+i,{r:ot,p:1,f:1}],["b",116+e,90.05+i,90.05+e,116+i,58+e,116+i,{r:lt}],["b",25.95+e,116+i,0+e,90.05+i,0+e,58+i,{r:ot}],["b",0+e,25.95+i,25.95+e,0+i,58+e,0+i,{r:lt}],["b",90.05+e,0+i,116+e,25.95+i,116+e,58+i,{r:ot,c:1}]]}]}function Zt(t,r){return[{d:1,v:[["m",t-40,r,{x:0,y:1,r:lt}],["l",100+t,r,{x:0,y:1,f:1}]]}]}function $t(t,r){return[{d:-1,v:[["m",t,r,{p:1}],["b",9.3+t,11.6+r,15.6+t,27.1+r,15.6+t,40.9+r],["b",15.6+t,83.3+r,-18.2+t,107.8+r,-59.5+t,107.8+r],["b",-70.9+t,107.8+r,-82.9+t,106.2+r,-93.7+t,102.7+r,{x:.5,f:1}]]}]}function tr(t,r){return[{d:-1,v:[["m",t,r,{p:1}],["b",-19.6+t,14.8+r,-42.2+t,37.9+r,-42.2+t,64.1+r],["b",-42.2+t,100.3+r,30.2-42.2+t,118.8+r,21.4+t,118.8+r],["b",68.3-42.2+t,118.8+r,72.9-42.2+t,118.4+r,35.2+t,117.6+r,{x:.5,f:1}]]}]}function rr(t,r){return[{d:1,v:[["a",t,r,{x:0,y:0}]]}]}function er(t,r){var e=-68+t,i=r;return[{d:-1,v:[["m",0+e,i,{r:pt(0+e,i,68-yt+e,50+i),y:0,x:0}],["l",68-yt+e,50+i,{r:pt(0+e,i,68-yt+e,50+i),y:0,x:0,f:1}],["l",68+yt+e,50+i,{r:pt(68+yt+e,50+i,136+e,i),y:0,x:0,f:1,v:1}],["l",136+e,i,{y:0,x:0,f:1}]]}]}function ir(t,r){return[{d:1,v:[["m",t-50,r,{x:0,y:0}],["l",t+50,r,{x:0,y:0,f:1}]]}]}var nr,ar,sr=[{d:1,v:[["m",0,352,{y:0,f:1}],["l",0,130,{y:-3}]]}],or=[{d:1,v:[["m",-115.9,444,{x:.4,y:.63,r:vt(-115.9,444,12.6-115.9,454.4,29.6-115.9,460.2,-70,461.2,0),f:1}],["b",12.6-115.9,454.4,29.6-115.9,460.2,-70,461.2,{x:.4,y:.63,r:lt}],["b",84.5-115.9,463.5,0,435.1,0,396.4,{x:.4,y:.63,r:ot}],["l",0,130,{y:-3}]]}],lr={"Æ":ut(996,426,352,0,0,0,0,[{d:-1,v:[["m",426,0,{x:0,r:lt}],["l",234,0,{x:.5,f:1,r:pt(234,0,0,352)}],["l",0,352,{x:.5,y:.5,f:1}]]},{d:-1,v:[["m",234,0,{x:.5,p:1}],["l",234,352,{f:1,x:.5}],["l",426,352,{f:1,x:0}]]},{d:-1,v:[["m",76.4,237,{r:lt,p:1}],["l",234,237,{f:1,r:lt,p:1}]]},{d:-1,v:[["m",234,164,{r:lt,p:1,x:.5}],["l",414,164,{f:1,x:0}]]}]),"æ":ut(1e3,457.5,232,0,0,-64,-64,[{d:-1,v:[["m",232,8,{y:-3.4,r:ot}],["l",232,116,{r:ft}],["b",232,180.1,180.1,232,116,232,{r:lt}],["b",51.9,232,0,180.1,0,116,{r:ot}],["b",0,51.9,51.9,0,116,0,{r:lt}],["b",180.1,0,232,51.9,232,116,{r:ot}],["l",232,224,{y:-.1,r:ot,f:1}]]},{d:1,v:[["m",443.6,182.9,{r:vt(443.6,182.9,423.1,213.2,388.1,233.1,348.5,233.1,0),f:1}],["b",423.1,213.2,388.1,233.1,348.5,233.1,{r:lt}],["b",284.4,233.1,232.5,181.2,232.5,117.1,{r:ot}],["b",232.5,53,284.4,1.1,348.5,1.1,{r:lt}],["b",408.4,1.1,456.9,47.2,457.5,106.1,{r:ot}],["l",232.5,106.1,{r:ot,p:1}]]}]),"À":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Bt(145,-50))),"Á":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Ht(145,-50))),"Â":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Kt(145,-100))),"Ã":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Qt(145,-90))),"Ä":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Ut(145,-70))),"Å":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Yt(0,0))),"Ă":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(Vt(145,-110))),"Ą":ut(620,290,352,0,0,0,0,JSON.parse(JSON.stringify(xt)).concat(tr(290,352))),"à":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Bt(116,-60))),"á":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Ht(116,-60))),"â":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Kt(116,-110))),"ã":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Qt(116,-100))),"ä":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Ut(116,-80))),"å":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Yt(-30,0))),"ă":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(Vt(116,-120))),"ą":ut(600,232,232,10,2,-64,-64,JSON.parse(JSON.stringify(Tt)).concat(tr(232,224))),"Ć":ut(700,293.1,360,0,0,0,0,JSON.parse(JSON.stringify(gt)).concat(Bt(180,-60))),"Ĉ":ut(700,293.1,360,0,0,0,0,JSON.parse(JSON.stringify(gt)).concat(Kt(180,-110))),"Ċ":ut(700,293.1,360,0,0,0,0,JSON.parse(JSON.stringify(gt)).concat(rr(180,-80))),"Č":ut(700,293.1,360,0,0,0,0,JSON.parse(JSON.stringify(gt)).concat(er(180,-110))),"Ç":ut(700,293.1,360,0,0,0,0,JSON.parse(JSON.stringify(gt)).concat($t(180,360))),"ć":ut(520,212.1,233.1,2,-10,-64,-64,JSON.parse(JSON.stringify(It)).concat(Bt(116.5,-68.9))),"ĉ":ut(520,212.1,233.1,2,-10,-64,-64,JSON.parse(JSON.stringify(It)).concat(Kt(116.5,-118.9))),"ċ":ut(520,212.1,233.1,2,-10,-64,-64,JSON.parse(JSON.stringify(It)).concat(rr(116.5,-88.9))),"č":ut(520,212.1,233.1,2,-10,-64,-64,JSON.parse(JSON.stringify(It)).concat(er(116.5,-118.9))),"ç":ut(520,212.1,233.1,2,-10,-64,-64,JSON.parse(JSON.stringify(It)).concat($t(116.5,233.1))),"Đ":ut(721,270,352,-10,-10,0,0,JSON.parse(JSON.stringify(bt)).concat(Zt(0,176))),"Ď":ut(721,270,352,-10,-10,0,0,JSON.parse(JSON.stringify(bt)).concat(er(100,-110))),"ď":ut(600,232,352,10,2,0,0,JSON.parse(JSON.stringify(Rt)).concat((nr=300,ar=0,[{d:-1,v:[["m",nr,ar,{x:0,y:0}],["l",nr,80+ar,{x:0,y:0,f:1}]]}]))),"đ":ut(600,232,352,10,2,0,0,JSON.parse(JSON.stringify(Rt)).concat(Zt(180,40))),"È":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(Bt(96,-60))),"É":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(Ht(96,-60))),"Ê":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(Kt(96,-110))),"Ë":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(Ut(96,-80))),"Ē":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(ir(96,-80))),"Ĕ":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(Vt(96,-120))),"Ė":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(rr(96,-80))),"Ě":ut(520,192,352,-5,-80,0,0,JSON.parse(JSON.stringify(St)).concat(er(96,-110))),"è":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(Bt(112,-60))),"é":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(Ht(112,-60))),"ê":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(Kt(112,-110))),"ë":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(Ut(112,-80))),"ē":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(ir(112,-80))),"ĕ":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(Vt(112,-120))),"ė":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(rr(112,-90))),"ě":ut(570,225.5,233.1,0,0,-64,-64,JSON.parse(JSON.stringify(Ft)).concat(er(112,-120))),"Ĝ":ut(840,352,360,0,0,0,0,JSON.parse(JSON.stringify(mt)).concat(Kt(180,-110))),"Ğ":ut(840,352,360,0,0,0,0,JSON.parse(JSON.stringify(mt)).concat(Vt(180,-120))),"Ġ":ut(840,352,360,0,0,0,0,JSON.parse(JSON.stringify(mt)).concat(rr(180,-80))),"Ģ":ut(840,352,360,0,0,0,0,JSON.parse(JSON.stringify(mt)).concat($t(180,360))),"ĝ":ut(600,232,338,10,2,-117,-117,JSON.parse(JSON.stringify(Mt)).concat(Kt(116,-118.9))),"ğ":ut(600,232,338,10,2,-117,-117,JSON.parse(JSON.stringify(Mt)).concat(Vt(116,-120))),"ġ":ut(600,232,338,10,2,-117,-117,JSON.parse(JSON.stringify(Mt)).concat(rr(116,-90))),"ģ":ut(600,232,338,10,2,-117,-117,JSON.parse(JSON.stringify(Mt)).concat(Ht(116,-70))),"Ĥ":ut(684,232,352,0,0,0,0,JSON.parse(JSON.stringify(Ot)).concat(Kt(116,-110))),"ĥ":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(jt)).concat(Kt(91,-110))),"Ì":ut(249,0,352,0,0,0,0,JSON.parse(JSON.stringify(Jt)).concat(Bt(0,-60))),"Í":ut(249,0,352,0,0,0,0,JSON.parse(JSON.stringify(Jt)).concat(Ht(0,-60))),"Î":ut(249,0,352,0,0,0,0,JSON.parse(JSON.stringify(Jt)).concat(Kt(0,-110))),"Ï":ut(249,0,352,0,0,0,0,JSON.parse(JSON.stringify(Jt)).concat(Ut(0,-80))),"ì":ut(200,0,352,0,0,0,0,JSON.parse(JSON.stringify(sr)).concat(Bt(0,70))),"í":ut(200,0,352,0,0,0,0,JSON.parse(JSON.stringify(sr)).concat(Ht(0,70))),"î":ut(200,0,352,0,0,0,0,JSON.parse(JSON.stringify(sr)).concat(Kt(0,10))),"ï":ut(200,0,352,0,0,0,0,JSON.parse(JSON.stringify(sr)).concat(Ut(0,50))),"Ĵ":ut(472,172.5,355.5,10,20,-2,-2,JSON.parse(JSON.stringify(Nt)).concat(Kt(172.5,-110))),"ĵ":ut(220,115.9,352,-60,-60,0,0,JSON.parse(JSON.stringify(or)).concat(Kt(0,20))),"Ñ":ut(721,250,352,0,0,0,0,JSON.parse(JSON.stringify(_t)).concat(Qt(125,-100))),"ñ":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(Gt)).concat(Qt(91,30))),"Ò":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat(Bt(180,-60))),"Ó":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat(Ht(180,-60))),"Ô":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat(Kt(180,-110))),"Õ":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat(Qt(180,-100))),"Ö":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat(Ut(180,-80))),"Ø":ut(850,360,360,0,0,0,0,JSON.parse(JSON.stringify(wt)).concat([{d:1,v:[["m",0,360,{r:pt(0,360,360,0),f:1,x:0,y:1}],["l",360,0,{x:0,y:1}]]}])),"ò":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat(Bt(116,-60))),"ó":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat(Ht(116,-60))),"ô":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat(Kt(116,-110))),"õ":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat(Qt(116,-100))),"ö":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat(Ut(116,-80))),"ø":ut(580,232,232,0,0,-64,-64,JSON.parse(JSON.stringify(Ct)).concat([{d:1,v:[["m",0,232,{r:pt(0,232,232,0),f:1,x:0,y:1}],["l",232,0,{x:0,y:1}]]}])),"Ŝ":ut(560,224,360,0,0,0,0,JSON.parse(JSON.stringify(Pt)).concat(Kt(112.4,-110))),"ŝ":ut(400,143.808,231.12,0,0,-64,-64,JSON.parse(JSON.stringify(Lt)).concat(Kt(112.4*.642,-110))),"Ş":ut(560,224,360,0,0,0,0,JSON.parse(JSON.stringify(Pt)).concat($t(110.3,360))),"ş":ut(400,143.808,231.12,0,0,-64,-64,JSON.parse(JSON.stringify(Lt)).concat($t(70.8126,231.12))),"Ù":ut(712,250,355,0,0,-.5,-.5,JSON.parse(JSON.stringify(kt)).concat(Bt(125,-50))),"Ú":ut(712,250,355,0,0,-.5,-.5,JSON.parse(JSON.stringify(kt)).concat(Ht(125,-50))),"Û":ut(712,250,355,0,0,-.5,-.5,JSON.parse(JSON.stringify(kt)).concat(Kt(125,-100))),"Ŭ":ut(712,250,355,0,0,-.5,-.5,JSON.parse(JSON.stringify(kt)).concat(Vt(125,-110))),"Ü":ut(712,250,355,0,0,-.5,-.5,JSON.parse(JSON.stringify(kt)).concat(Ut(125,-70))),"ù":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(zt)).concat(Bt(91,70))),"ú":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(zt)).concat(Ht(91,70))),"û":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(zt)).concat(Kt(91,20))),"ŭ":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(zt)).concat(Vt(91,10))),"ü":ut(520,182,352,0,0,0,0,JSON.parse(JSON.stringify(zt)).concat(Ut(91,50))),"Ý":ut(673,270,352,0,0,0,0,JSON.parse(JSON.stringify(Wt)).concat(Ht(135,-60))),"ý":ut(500,225.5,331.5,10,10,-119,-119,JSON.parse(JSON.stringify(At)).concat(Ht(116.3,-60))),"ÿ":ut(500,225.5,331.5,10,10,-119,-119,JSON.parse(JSON.stringify(At)).concat(Ut(116.3,-90)))},fr=Object.assign({},Dt,Et,qt,Xt,lr);function yr(t){var r=fr[t]||fr[ct];return r.v=t,r}function cr(t,r,e,i){var n;return n=t.indexOf("\n")>0?t.split("\n"):t.indexOf("\\n")>0?t.split("\\n"):[t],0==e?function(t){var r,e=[],i=t.length;for(r=0;r=e&&(h+=1,c=l.w,u[h]=[]);h+=1}var d=[];for(a=u.length,n=0;n0&&(" "==i[0]&&i.shift()," "==i[i.length-1]&&i.pop(),i.length>0&&d.push(i));return d}(n,r,e):function(t,r,e){var i,n,a,s,o,l,f,y,c,h,u=0,d=0,p=0,x=[];for(y=t.length,o=0;oe&&(u=d,x[p+=1]=[]),x[p].push(n)}p+=1,u=0}y=x.length;var g=[];for(o=0;o0&&g.push(a);return g}(n,r,e)}function hr(t,r){return{c:(t-r)/2,r:t-r,l:0}}function ur(t,r){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},i=e.text,n=void 0===i?"":i,a=e.size,s=void 0===a?500:a,l=e.weight,f=void 0===l?o:l,y=e.color,c=void 0===y?["#000000"]:y,h=e.colorful,u=void 0===h?["#c5d73f","#9d529c","#49a9db","#fec330","#5eb96e","#fc5356","#f38f31"]:h,d=e.tracking,p=void 0===d?0:d,v=e.leading,x=void 0===v?0:v,g=e.align,b=void 0===g?"left":g,S=e.pathGap,m=void 0===S?.5:S,O=e.amplitude,J=void 0===O?.5:O,N=e.width,_=void 0===N?0:N,w=e.breakWord,P=void 0!==w&&w,k=e.fps,W=void 0===k?30:k,D=e.isPath,T=void 0!==D&&D,I=e.isWave,R=void 0!==I&&I;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),(t=xr(this,br(r).call(this))).size_=s,t.weight_=f,t.color_=c,t.colorful_=function(t){for(var r,e,i=t.slice(),n=i.length,a=n;a--;)r=Math.random()*n|0,e=i[a],i[a]=i[r],i[r]=e;return i}(u),t.tracking_=p,t.leading_=x,t.pathGap_=m,t.amplitude_=J,t.width_=_,t.breakWord_=P,t.fps_=W,t.fpsTime_=1e3/t.fps_,t.isPath_=T,t.isWave_=R,t.model=new dr,t.str_=null,t.time_=null,t.isFps_=!1,t.isForceRander_=!1,t.updateID_=0,t.dPathsID_=null,t.pPathsID_=null,t.wPathsID_=null,t.guideID_=null,t.text=n,t.model.align=b,t}var e,i,n;return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&Sr(t,r)}(r,a),e=r,(i=[{key:"on",value:function(t,e){gr(br(r.prototype),"on",this).call(this,t,e),this.update()}},{key:"off",value:function(t,e){gr(br(r.prototype),"off",this).call(this,t,e)}},{key:"position",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.model.position(t,r)&&(this.updateID_++,this.updateSignal())}},{key:"update",value:function(){this.updateID_++,this.model.update(this.str_,this.width_,this.breakWord_,this.weight_,this.size_,this.tracking_,this.leading_),this.isPath_||this.isWave_?(this.updatePatternPaths(),this.updateWavePaths()):this.updateSignal()}},{key:"updateGuide",value:function(){this.guideID_!=this.updateID_&&(this.guideID_=this.updateID_,this.model.updateGuide())}},{key:"updateDrawingPaths",value:function(){this.dPathsID_!=this.updateID_&&(this.dPathsID_=this.updateID_,this.model.updateDrawingPaths())}},{key:"updatePatternPaths",value:function(t){this.isPath_&&(t||this.pPathsID_!=this.updateID_)&&(this.pPathsID_=this.updateID_,this.model.updatePatternPaths(this.pathGap_),this.isForceRander_=!0,this.updateSignal())}},{key:"updateWavePaths",value:function(t){this.isWave_&&(t||this.wPathsID_!=this.updateID_)&&(this.wPathsID_=this.updateID_,this.model.updateWavePaths(this.pathGap_),this.isForceRander_=!0,this.updateSignal())}},{key:"updateSignal",value:function(){this.model.updateLinesForRect(),this.model.updatePathsForRect(),this.dispatch("update",this.model)}},{key:"reset",value:function(){this.size_=500,this.weight_=o,this.color_=["#000000"],this.tracking_=0,this.leading_=0,this.pathGap_=.5,this.amplitude_=.5,this.width_=0,this.breakWord_=!1,this.fps_=30,this.fpsTime_=1e3/this.fps_,this.isPath_=!1,this.isWave_=!1,this.str_=null,this.time_=null,this.isFps_=!1,this.isForceRander_=!1,this.updateID_=0,this.dPathsID_=null,this.pPathsID_=null,this.wPathsID_=null,this.guideID_=null,this.model.reset()}},{key:"dispose",value:function(){this.reset(),this.model=null}},{key:"drawPixi",value:function(t){var r,e,i,n=this.model.data.length;for(r=0;rA&&(E(t),t.beginPath(),f&&t.moveTo(f.x,f.y),t.lineTo(l.x,l.y),h+=q(t,o,c,y,n,h)),f=l):"b"==l.type&&((c=j(f.x,f.y,l.x,l.y,l.x2,l.y2,l.x3,l.y3))/r.scale>A&&(E(t),t.beginPath(),f&&t.moveTo(f.x,f.y),t.bezierCurveTo(l.x,l.y,l.x2,l.y2,l.x3,l.y3),h+=q(t,o,c,y,n,h)),f={x:l.x3,y:l.y3})}(t,this.model,this.colorful_)}},{key:"wave",value:function(t,r){t.lineWidth=this.lineWidth,r&&(this.time_||(this.time_=r),r-this.time_>this.fpsTime_||this.isForceRander_?(this.time_=r,this.isFps_=!0):this.isFps_=!1),this.isForceRander_=!1;var e,i,n=this.model.data.length;for(e=0;el&&(t=l),this.weight_!=t&&(this.weight_=t,this.update(),this.isForceRander_=!0)}},{key:"color",get:function(){return this.color_},set:function(t){this.color_!=t&&(this.color_=t)}},{key:"tracking",get:function(){return this.tracking_},set:function(t){this.tracking_!=t&&(this.tracking_=t,this.update(),this.isForceRander_=!0)}},{key:"leading",get:function(){return this.leading_},set:function(t){this.leading_!=t&&(this.leading_=t,this.update(),this.isForceRander_=!0)}},{key:"align",get:function(){return this.model.align},set:function(t){this.model.align!=t&&(this.model.align=t,this.updateID_++,this.updateSignal())}},{key:"pathGap",get:function(){return this.pathGap_},set:function(t){this.pathGap_!=t&&(this.pathGap_=t,this.updatePatternPaths(!0),this.updateWavePaths(!0),this.isForceRander_=!0)}},{key:"amplitude",get:function(){return this.amplitude_},set:function(t){this.amplitude_=t}},{key:"rect",get:function(){return this.model.rect}},{key:"maxWidth",set:function(t){this.width_!=t&&(this.width_=t,this.update())},get:function(){return this.width_}},{key:"breakWord",set:function(t){this.breakWord_!=t&&(this.breakWord_=t,this.update())},get:function(){return this.breakWord_}},{key:"isPath",get:function(){return this.isPath_},set:function(t){this.isPath_=t,this.updatePatternPaths(!0)}},{key:"isWave",get:function(){return this.isWave_},set:function(t){this.isWave_=t,this.updateWavePaths(!0)}},{key:"fps",get:function(){return this.fps_},set:function(t){this.fps_=t,this.fpsTime_=1e3/this.fps_}},{key:"lineWidth",get:function(){return this.model.lineWidth}},{key:"scale",get:function(){return this.model.scale}},{key:"drawing",get:function(){return this.model.drawing}},{key:"data",get:function(){return this.model.data}},{key:"paths",get:function(){return this.model.paths}},{key:"drawingPaths",get:function(){return this.model.drawingPaths}},{key:"wavePaths",get:function(){return this.model.wavePaths}}])&&vr(e.prototype,i),n&&vr(e,n),r}()}]); ================================================ FILE: source/styles/cold-stone.css ================================================ :root { --text-black: #303133; --text-gray: #909399; --text-link: #1e87f0; --bg-white: #f2f3f8; --bg-dark: #474444; --bg-darken: #3d3b3b; --wrapper-width: 920px; --menu-fore-color: #53586a; --shadow: 0 0.4rem 0.8rem -0.1rem rgba(0, 32, 128, 0.1), 0 0 0 1px #f0f2f7; --light-shadow: 0 14px 25px rgba(0, 0, 0, 0.16); --dark-shadow: 0 14px 25px rgba(255, 255, 255, 0.16); } ::-moz-selection { color: #fff; background: var(--text-link); text-shadow: none; } html, body { min-height: 100vh; scroll-behavior: smooth; transition: all ease 0.3s; background-color: var(--bg-white); background-image: linear-gradient( 0deg, transparent 24%, rgba(201, 195, 195, 0.329) 25%, rgba(209, 201, 201, 0.05) 26%, transparent 27%, transparent 74%, rgba(209, 204, 204, 0.185) 75%, rgba(180, 176, 176, 0.05) 76%, transparent 77%, transparent ), linear-gradient( 90deg, transparent 24%, rgba(204, 196, 196, 0.226) 25%, rgba(172, 165, 165, 0.05) 26%, transparent 27%, transparent 74%, rgba(209, 204, 204, 0.185) 75%, rgba(180, 176, 176, 0.05) 76%, transparent 77%, transparent ); background-size: 50px 50px; } body { display: flex; flex-direction: column; color: var(--text-black); overflow-x: hidden; } h1 { font-size: 1.8rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; } a { color: inherit; text-decoration: none; transition: all 0.1s ease; } table { position: relative; table-layout: fixed; width: 100%; margin: 0; box-sizing: border-box; font-weight: 400; word-wrap: break-word; word-break: normal; border-spacing: 0; cursor: default; border: 1px solid #d9d9d9; } tbody { margin: 0; } tr:nth-child(2n) { background-color: #f9f9f9; } tr th, tr td { min-width: 90px; font-size: 14px; white-space: normal; word-wrap: break-word; border: 1px solid #d9d9d9; vertical-align: top; padding: 4px 8px; cursor: default; } .hide { display: none; } .wrapper { width: 96%; margin: 0 auto; max-width: var(--wrapper-width); } .header { margin-bottom: 1rem; background-color: #ffffff; } .header-content { display: flex; justify-content: space-between; align-items: center; } .header .title { font-size: 1.2rem; font-weight: normal; margin: 1rem 0; } .nav-list { display: flex; list-style: none; padding: 0; } .nav-list-item.active { font-weight: bold; } .nav-list-item:hover { font-weight: bold; } .nav-list-link { font-size: 0.8rem; padding-left: 1rem; } @media screen and (max-width: 768px) { .header .title { font-size: 0.9rem; } .nav-list-link { font-size: 0.7rem; } } .main { flex: 1; } .card { border-radius: 2px; margin-bottom: 1rem; padding: 1rem; background-color: #ffffff; } .card-hover:hover { box-shadow: var(--light-shadow); } .post-anchor { display: block; padding-bottom: 0.5rem; } .list-unstyled { list-style: none; padding: 0; margin: 0; } @media screen and (max-width: 768px) { .post-title { font-size: 1rem; } .list-unstyled { font-size: 0.9rem; } } .pager { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; } /* img */ img { width: 100%; line-height: 0; } img::-moz-selection { color: #fff; background: transparent; } img::selection { color: #fff; background: transparent; } /* article */ .article { margin-bottom: 1rem; padding: 2rem 2% 1rem 2%; border-radius: 0.25rem; background-color: #ffffff; } .article-header { margin-bottom: 40px; } .article-title { margin-top: 0; } .article-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.9rem; } .meta-info { flex: 1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .meta-info span { padding-right: 1em; } .meta-link { margin-left: 1rem; } @media screen and (max-width: 768px) { .meta-info { overflow: auto; text-overflow: unset; } .meta-info span { padding-right: 6px; } .meta-link { margin-left: 6px; } } .article-content a { color: #08c; text-decoration: none; } .article-toc { position: fixed; top: calc(80px + 1rem); left: calc(50% + (var(--wrapper-width) / 2) + 1rem); min-width: 200px; font-size: 0.9rem; transition: all ease 0.3s; } .article-toc.fade { opacity: 0.8; } .article-toc ol { margin: 0; padding-left: 1em; } .article-toc .home-link { padding: 0.5rem 1rem; margin-top: -0.5rem; } @media screen and (max-width: 768px) { .article-meta { font-size: 0.8rem; } .article-toc { display: none; } } /* tags */ .tags { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; } .tag-item { padding: 2px 6px; margin-right: 10px; margin-bottom: 6px; font-style: italic; background-color: #ffffff; } .tag-list { margin: 0; } .tag-post-title { display: block; } .tag-post-title p { margin: 0.5rem 0; } .tag-post-title:last-of-type p { margin-bottom: 0; } /* archives */ .archive-tag-list, .category-tag-list { list-style: none; padding: 0; margin: 0; } .archive-tag-list-item, .category-tag-list-item { display: flex; justify-content: space-between; align-items: center; } .archive-tag-list-link, .category-tag-list-link { flex: 1; padding-right: 12px; font-size: 0.8rem; } .archive-tag-list-count, .category-tag-list-count { position: relative; width: 26px; font-size: 0.8rem; } .archive-tag-list-count::after, .category-tag-list-count::after { position: absolute; right: 0; top: 0; content: "篇"; } .archives { padding: 0; } .archives li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Hover underline animation */ .hover-underline-animation { display: inline-block; position: relative; } .hover-underline-animation::after { content: ""; position: absolute; width: 100%; transform: scaleX(0); height: 1px; bottom: 0; left: 0; background-color: var(--text-link); transform-origin: bottom right; transition: transform 0.25s ease-out; } .hover-underline-animation:hover::after { transform: scaleX(1); transform-origin: bottom left; } /* loader */ .loader { display: flex; justify-content: center; align-items: center; min-height: 300px; } .loader svg { width: 3.75em; animation: 1.5s spin ease infinite; } .loader .ring { fill: none; stroke: var(--text-gray); stroke-width: 1; } .loader .ball { fill: var(--text-gray); stroke: none; } @keyframes spin { to { transform: rotate(360deg); } } /* comment */ /* .comment { min-height: 300px; } */ /* search-form */ .translate-x { transform: translateX(calc(200px + 1rem)); } .search-form { border-bottom: 1px solid var(--text-gray); } .search-form-input { width: 100%; border: none; outline: none; height: 2rem; padding-left: 7px; border-radius: 2px; } /* project-list */ .project-link { display: block; } .link-disabled { pointer-events: none; color: var(--text-gray); } /* animate */ .slide-in-right { animation: slideInRight 0.3s linear both; } .animate-list__title { margin-top: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } @media screen and (max-width: 768px) { .animate-list__title { font-size: 1rem; } } .animate-list__desc { display: flex; align-items: center; margin: 0; font-size: 0.9em; } .animate-list li:nth-of-type(1) { animation-delay: 0.1s; } .animate-list li:nth-of-type(2) { animation-delay: 0.15s; } .animate-list li:nth-of-type(3) { animation-delay: 0.2s; } .animate-list li:nth-of-type(4) { animation-delay: 0.25s; } .animate-list li:nth-of-type(5) { animation-delay: 0.3s; } .animate-list li:nth-of-type(6) { animation-delay: 0.35s; } .animate-list li:nth-of-type(7) { animation-delay: 0.4s; } .animate-list li:nth-of-type(8) { animation-delay: 0.45s; } @keyframes slideInRight { from { transform: translate3d(1%, 0, 0); } to { transform: translate3d(0, 0, 0); } } /* paginator */ .paginator { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; } .paginator .page-number { width: 2rem; display: inline-block; text-align: center; } .page-number.current { pointer-events: none; color: var(--text-gray); } .paginator .extend { flex: 1; } .paginator .extend.next { text-align: right; } .tag-name, .category-name, .archive-name { font-weight: 600; margin-top: 0; } .archive-date { font-style: italic; padding-right: 0.5rem; } /* footer */ .footer { position: relative; margin-top: 1rem; /* background-color: #fff; */ } .footer-content { position: absolute; top: 20%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; } .footer .theme-link { text-decoration: underline; } .footer .footer-toggle { position: relative; margin-right: 1rem; width: 40px; height: 24px; } .footer-toggle .menu-button { position: absolute; padding: 0; cursor: pointer; transition: all 0.3s ease; background: transparent; color: inherit; visibility: hidden; opacity: 0; text-align: center; border: none; outline: none; } .menu-button.show { visibility: visible; opacity: 1; } .post-info { flex: 1; } .meta-tag { padding: 0 3px; } .read-more { margin-left: 1em; } /* back-to-top */ .back-to-top { position: fixed; bottom: 5vw; left: calc(50% + (var(--wrapper-width) / 2) + 1rem); visibility: hidden; opacity: 0; transition: all linear 0.3s; padding: 8px 12px; cursor: pointer; } .back-to-top.show { visibility: visible; opacity: 1; } /* archive-list */ .archive-list { padding-left: 1em; } /* index-content */ .index-content { display: flex; justify-content: space-between; align-items: flex-start; } .index-post-list { flex: 1; margin-right: 1rem; } .index-post-link { display: block; } .index-aside { width: 200px; min-width: 200px; } @media screen and (max-width: 768px) { .index-post-list { width: 100%; margin: 0; } .index-aside { display: none; } } /* about */ .about { display: flex; flex-direction: column; align-items: center; min-height: 311px; } .about-links { margin: 0; } .avatar { width: 180px; text-align: center; } .avatar-img { border-radius: 50%; } .author { padding: 0; } .author .info { padding: 1rem; } .username { margin-top: 1rem; margin-bottom: 0; font-weight: normal; } .subtitle { margin: 6px 0; font-size: 0.8rem; } .about-link { font-size: 0.8rem; margin-right: 0.5rem; } .aside-tags .tags { display: flex; align-items: center; flex-wrap: wrap; margin: 0; } .aside-tags .tag-item { padding: 4px 6px; margin-right: 4px; font-size: 0.7rem; border-radius: 2px; background-color: var(--bg-white); } .prelude { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #fff; z-index: 999; } /* code */ pre { padding: 0; } blockquote { font-size: 1rem; padding: 1em; color: #6a737d; border: 1px solid #e3e3e3; border-left: 0.25em solid #dfe2e5; overflow: auto; } code { word-wrap: normal; word-break: keep-all; white-space: pre; } .hljs { padding: 12px; } /* shadow */ .card, .header, .article, .avatar-img { box-shadow: var(--shadow); } .utterances { max-width: var(--wrapper-width); } /* prev next */ .prev-next { display: flex; align-items: center; justify-content: space-between; } .prev-next .link { flex: 1; font-size: 0.9rem; overflow: auto; white-space: nowrap; text-overflow: ellipsis; } .prev-next .next { text-align: right; } @media screen and (max-width: 768px) { .prev-next .link { font-size: 10px; text-overflow: unset; } } /* dark */ body.dark, body.dark .search-form-input { color: #ffffff; background-color: var(--bg-dark); } body.dark .card, body.dark .header, body.dark .navbar, body.dark .article, body.dark .tag-item, body.dark .aside-tags .tag-item, body.dark .uk-modal-dialog, body.dark .uk-modal-close-full { background-color: var(--bg-darken); } body.dark .card, body.dark .article { box-shadow: none; } body.dark .card-hover:hover { box-shadow: var(--dark-shadow); } body.dark .footer { box-shadow: none; } body.dark .footer .wave path { fill: var(--bg-dark); } body.dark .search-form { border-color: #fff; } body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6, body.dark .title, body.dark .animate-list__title, body.dark .article-title, body.dark .article-meta, body.dark .navbar a, body.dark blockquote { color: #fff; } body.dark tr:nth-child(2n) { background-color: #4e4a4a; } body.dark .hover-underline-animation::after { background-color: #fff; } @media (prefers-color-scheme: dark) { html, body, .search-form-input { color: #ffffff; background-color: var(--bg-dark); } .card, .header, .footer, .navbar, .article, .tag-item, .aside-tags .tag-item { background-color: var(--bg-darken); } .search-form { border-color: #fff; } h2, h3, h4, h5, h6, .title, .animate-list__title, .article-title, .article-meta, .navbar a, blockquote { color: #fff; } tr:nth-child(2n) { background-color: #4e4a4a; } .hover-underline-animation::after { background-color: #fff; } } .friend-link { display: flex; align-items: center; } .friend-avatar { display: inline-block; width: 36px; border-radius: 50%; margin-right: 12px; } ================================================ FILE: source/sw.js ================================================ importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn/workbox/workbox-sw.js') if (workbox) { console.log(`Yay! Workbox is loaded 🎉`) workbox.routing.registerRoute( '/', new workbox.strategies.NetworkFirst({ cacheName: 'index' }) ) workbox.routing.registerRoute( /\/post.|/, new workbox.strategies.NetworkFirst({ cacheName: 'posts' }) ) workbox.routing.registerRoute( /\.(?:js|css)$/, new workbox.strategies.StaleWhileRevalidate({ cacheName: 'static' }) ) workbox.routing.registerRoute( /\.(otf|woff)$/, new workbox.strategies.StaleWhileRevalidate({ cacheName: 'fonts' }) ) workbox.routing.registerRoute( /\.(png|jpg|jpeg|svg|gif|webp)$/, new workbox.strategies.StaleWhileRevalidate({ cacheName: 'images', plugins: [ new workbox.expiration.Plugin({ maxEntries: 20, maxAgeSeconds: 7 * 24 * 60 * 60 }) ] }) ) } else { console.log(`Boo! Workbox didn't load 😬`) }