├── .github └── workflows │ ├── gh-pages.yml │ └── release.yml ├── .gitignore ├── LICENSE ├── README.md ├── archetypes └── default.md ├── assets ├── js │ ├── builtin-copy.js │ ├── emgithub.js │ ├── header.js │ ├── math.js │ ├── prism-autoloader.js │ ├── prism.js │ ├── search.js │ └── zooming.js ├── lib │ ├── css │ │ └── prism.css │ ├── icns │ │ ├── feather-sprite-v4.29.0.svg │ │ └── simple-icons-sprite-v11.15.0.svg │ └── js │ │ ├── prism-copy-to-clipboard-v1.29.0.min.js │ │ ├── prism-line-numbers-v1.29.0.min.js │ │ ├── prism-v1.29.0.min.js │ │ ├── uFuzzy-v1.0.14.esm.js │ │ └── zooming-v2.1.1.min.js └── scss │ ├── base.scss │ ├── color.scss │ ├── components │ ├── breadcrumbs.scss │ ├── collapsible-menu.scss │ ├── color-block.scss │ ├── emgithub.scss │ ├── footer.scss │ ├── header.scss │ ├── icon-group.scss │ ├── icon.scss │ ├── menus.scss │ ├── nav.scss │ ├── pagination.scss │ ├── search-menu.scss │ ├── sidebar.scss │ └── terms-cloud.scss │ ├── core.scss │ ├── layout │ ├── article.scss │ ├── balloon.scss │ ├── bookcase.scss │ ├── gallery.scss │ ├── list.scss │ ├── postcard.scss │ └── term.scss │ ├── mixins │ ├── items.scss │ ├── margin.scss │ ├── padding.scss │ └── text.scss │ ├── purecss │ └── _base.scss │ └── vars.scss ├── exampleSite ├── .gitignore ├── config │ └── _default │ │ ├── config.toml │ │ ├── languages.toml │ │ ├── markup.toml │ │ ├── menus │ │ ├── menus.en.toml │ │ └── menus.zh-tw.toml │ │ └── params.toml ├── content │ ├── en │ │ ├── _index.md │ │ ├── about │ │ │ ├── acknowledgement.md │ │ │ ├── features.md │ │ │ ├── index.md │ │ │ ├── support.md │ │ │ └── timeline.md │ │ ├── changelog.md │ │ ├── configuration │ │ │ ├── _index.md │ │ │ ├── page.md │ │ │ ├── site.md │ │ │ └── theme.md │ │ ├── layouts │ │ │ ├── _index.md │ │ │ ├── balloon │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ │ ├── _index.md │ │ │ │ │ └── single.md │ │ │ │ └── docs.md │ │ │ ├── blank │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ │ ├── _index.md │ │ │ │ │ ├── post1.md │ │ │ │ │ ├── post2.md │ │ │ │ │ └── post3.md │ │ │ │ └── docs.md │ │ │ ├── bookcase │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ │ ├── _index.md │ │ │ │ │ ├── balloon │ │ │ │ │ │ └── _index.md │ │ │ │ │ ├── list │ │ │ │ │ │ ├── _index.md │ │ │ │ │ │ ├── post1.md │ │ │ │ │ │ ├── post2.md │ │ │ │ │ │ └── post3.md │ │ │ │ │ └── regular-page.md │ │ │ │ └── docs.md │ │ │ ├── gallery │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ │ └── _index.md │ │ │ │ └── docs.md │ │ │ ├── list │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ │ ├── _index.md │ │ │ │ │ ├── post1.md │ │ │ │ │ ├── post2.md │ │ │ │ │ └── post3.md │ │ │ │ └── docs.md │ │ │ └── postcard │ │ │ │ ├── _index.md │ │ │ │ ├── demo │ │ │ │ ├── _index.md │ │ │ │ ├── post1.md │ │ │ │ ├── post2.md │ │ │ │ ├── post3.md │ │ │ │ ├── post4.md │ │ │ │ ├── post5.md │ │ │ │ └── post6.md │ │ │ │ └── docs.md │ │ ├── posts │ │ │ ├── _index.md │ │ │ ├── emoji-support.md │ │ │ ├── markdown-syntax.md │ │ │ ├── math-typesetting.md │ │ │ ├── placeholder-text.md │ │ │ └── rich-content.md │ │ ├── setup.md │ │ └── shortcodes │ │ │ ├── _index.md │ │ │ ├── bookcase.md │ │ │ ├── breadcrumbs.md │ │ │ ├── codepen.md │ │ │ ├── color-block.md │ │ │ ├── emgithub.md │ │ │ ├── icon-group.md │ │ │ ├── icon.md │ │ │ ├── jsfiddle.md │ │ │ ├── recent-posts.md │ │ │ └── terms-cloud.md │ └── zh-tw │ │ ├── _index.md │ │ └── posts │ │ ├── emoji-support.md │ │ ├── markdown-syntax.md │ │ ├── math-typesetting.md │ │ ├── placeholder-text.md │ │ └── rich-content.md ├── resources │ └── _gen │ │ └── assets │ │ └── scss │ │ ├── core.scss_fb96db281e67f7a46a7605a5c94807cc.content │ │ └── core.scss_fb96db281e67f7a46a7605a5c94807cc.json └── static │ ├── clock.jpg │ ├── cover │ ├── balloon.png │ ├── balloon_dark.png │ ├── bookcase.png │ ├── bookcase_dark.png │ ├── catalogue.png │ ├── catalogue_dark.png │ ├── coding.png │ ├── coding_dark.png │ ├── desktop.png │ ├── desktop_dark.png │ ├── list.png │ ├── list_dark.png │ ├── picture.png │ ├── picture_dark.png │ ├── vase.png │ └── vase_dark.png │ ├── favicon.ico │ ├── icons │ ├── balloon.svg │ ├── balloon_dark.svg │ ├── bookcase.svg │ ├── bookcase_dark.svg │ ├── catalogue.svg │ ├── catalogue_dark.svg │ ├── coding.svg │ ├── coding_dark.svg │ ├── desktop.svg │ ├── desktop_dark.svg │ ├── list.svg │ ├── list_dark.svg │ ├── picture.svg │ ├── picture_dark.svg │ ├── vase.svg │ └── vase_dark.svg │ ├── pottery.jpg │ ├── thanks.jpg │ └── user.css ├── i18n ├── en.toml ├── fr-fr.toml ├── ru.toml └── zh-tw.toml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ └── render-heading.html │ ├── baseof.html │ ├── index.json │ ├── list.html │ ├── rss.xml │ ├── single.html │ ├── taxonomy.html │ └── term.html ├── balloon │ ├── list.html │ └── single.html ├── blank │ └── list.html ├── bookcase │ └── list.html ├── gallery │ ├── list.html │ └── single.html ├── home.html ├── partials │ ├── balloon │ │ ├── card-item.html │ │ ├── dot.html │ │ ├── head-item.html │ │ ├── head │ │ │ ├── desktop.html │ │ │ └── mobile.html │ │ ├── layout.html │ │ ├── line.html │ │ └── title-item.html │ ├── bookcase │ │ ├── item.html │ │ └── layout.html │ ├── collapsible-menu.html │ ├── content.html │ ├── disqus.html │ ├── footer.html │ ├── gallery │ │ └── layout.html │ ├── head.html │ ├── header.html │ ├── list.html │ ├── nav.html │ ├── navbar │ │ ├── nested-desktop.html │ │ └── nested-mobile.html │ ├── postcard │ │ └── layout.html │ ├── resources │ │ ├── css.html │ │ └── js.html │ ├── search-menu.html │ ├── svg │ │ ├── feather.html │ │ └── simple.html │ └── terms-cloud.html ├── postcard │ └── list.html └── shortcodes │ ├── bookcase.html │ ├── breadcrumbs.html │ ├── codepen.html │ ├── color-block.html │ ├── emgithub.html │ ├── icon-group.html │ ├── icon.html │ ├── jsfiddle.html │ ├── recent-posts.html │ └── terms-cloud.html └── theme.toml /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: github pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | with: 14 | ref: main 15 | token: ${{ secrets.GITHUB_TOKEN }} 16 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 17 | 18 | - name: Setup Hugo 19 | uses: peaceiris/actions-hugo@v2 20 | with: 21 | hugo-version: '0.128.0' 22 | extended: true 23 | 24 | - name: Setup public 25 | run: git worktree add -B gh-pages ./exampleSite/public origin/gh-pages 26 | 27 | - name: Clean public 28 | run: rm -rf ./exampleSite/public/* 29 | 30 | - name: Build 31 | run: hugo -s exampleSite --baseURL https://kaiiiz.github.io/hugo-theme-monochrome --themesDir=../.. --minify --environment production 32 | 33 | - name: Deploy 34 | uses: peaceiris/actions-gh-pages@v4 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | publish_dir: ./exampleSite/public 38 | publish_branch: gh-pages 39 | 40 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: github pages 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*.*.*" 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | with: 14 | ref: dev 15 | token: ${{ secrets.GITHUB_TOKEN }} 16 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 17 | 18 | - name: Create Release 19 | uses: ncipollo/release-action@v1 20 | with: 21 | draft: true 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/node 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=node 4 | 5 | ### Node ### 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | lerna-debug.log* 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # TypeScript v1 declaration files 50 | typings/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Optional stylelint cache 62 | .stylelintcache 63 | 64 | # Microbundle cache 65 | .rpt2_cache/ 66 | .rts2_cache_cjs/ 67 | .rts2_cache_es/ 68 | .rts2_cache_umd/ 69 | 70 | # Optional REPL history 71 | .node_repl_history 72 | 73 | # Output of 'npm pack' 74 | *.tgz 75 | 76 | # Yarn Integrity file 77 | .yarn-integrity 78 | 79 | # dotenv environment variables file 80 | .env 81 | .env.test 82 | .env*.local 83 | 84 | # parcel-bundler cache (https://parceljs.org/) 85 | .cache 86 | .parcel-cache 87 | 88 | # Next.js build output 89 | .next 90 | 91 | # Nuxt.js build / generate output 92 | .nuxt 93 | dist 94 | 95 | # Gatsby files 96 | .cache/ 97 | # Comment in the public line in if your project uses Gatsby and not Next.js 98 | # https://nextjs.org/blog/next-9-1#public-directory-support 99 | # public 100 | 101 | # vuepress build output 102 | .vuepress/dist 103 | 104 | # Serverless directories 105 | .serverless/ 106 | 107 | # FuseBox cache 108 | .fusebox/ 109 | 110 | # DynamoDB Local files 111 | .dynamodb/ 112 | 113 | # TernJS port file 114 | .tern-port 115 | 116 | # Stores VSCode versions used for testing VSCode extensions 117 | .vscode-test 118 | 119 | # End of https://www.toptal.com/developers/gitignore/api/node 120 | 121 | 122 | # Created by https://www.toptal.com/developers/gitignore/api/macos 123 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos 124 | 125 | ### macOS ### 126 | # General 127 | .DS_Store 128 | .AppleDouble 129 | .LSOverride 130 | 131 | # Icon must end with two \r 132 | Icon 133 | 134 | 135 | # Thumbnails 136 | ._* 137 | 138 | # Files that might appear in the root of a volume 139 | .DocumentRevisions-V100 140 | .fseventsd 141 | .Spotlight-V100 142 | .TemporaryItems 143 | .Trashes 144 | .VolumeIcon.icns 145 | .com.apple.timemachine.donotpresent 146 | 147 | # Directories potentially created on remote AFP share 148 | .AppleDB 149 | .AppleDesktop 150 | Network Trash Folder 151 | Temporary Items 152 | .apdisk 153 | 154 | # End of https://www.toptal.com/developers/gitignore/api/macos 155 | 156 | # Ignore files generated from Hugo build 157 | /assets/jsconfig.json 158 | .hugo_build.lock 159 | 160 | .vscode 161 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021 kaiiiz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Monochrome 4 | 5 |

6 | 7 |

8 | Monochrome 9 |

10 | 11 |

12 | A fast, clean and responsive hugo theme 13 |

14 | 15 | ## Demo & Documents 16 | 17 | See [kaiiiz.github.io/hugo-theme-monochrome](https://kaiiiz.github.io/hugo-theme-monochrome) 18 | 19 | ## Features 20 | 21 | 1. **Clean UI with small resources.** Monochrome has clean UI design with ~5KB gzipped bundled CSS. 22 | 23 | 2. **Self-Contained.** Monochrome doesn't require webpack, nodejs and other dependencies to setup or edit, just hugo. 24 | 25 | 3. **Responsive layout.** Adapt to different viewpoint, from desktop to mobile. 26 | 27 | 4. **Support light/dark mode.** Low-light UI. 28 | 29 | 5. **Multiple layouts built-in.** Monochrome now supports 6 different layouts. See [Demo](https://kaiiiz.github.io/hugo-theme-monochrome/layouts/). 30 | 31 | 6. **Nested navbar and Multilingual mode.** Make good use of hugo's well-designed structure. 32 | 33 | 7. **Syntax Highlighting (with copy feature).** Integrate both server-side solution (Chroma, hugo built-in) and client-side solution (Prism.js, for someone who need more languages supported). 34 | 35 | 8. **Site Search with real-time matches highlight.** Powered by uFuzzy. 36 | 37 | 9. **SEO-friendly.** Easily change your author, description, keywords, open graph, twitter card meatdata. 38 | 39 | 10. **Support mathematical notation.** Powered by MathJax. 40 | 41 | 11. **Useful shortcodes.** See [Document](https://kaiiiz.github.io/hugo-theme-monochrome/shortcodes/). 42 | 43 | ## Installation 44 | 45 | See [Setup](https://kaiiiz.github.io/hugo-theme-monochrome/setup) 46 | 47 | ## Configuration 48 | 49 | See [Configuration](https://kaiiiz.github.io/hugo-theme-monochrome/configuration/) 50 | 51 | ## Acknowledgement 52 | 53 | * [PrismJS/prism](https://github.com/PrismJS/prism) MIT 54 | * [leeoniya/uFuzzy](https://github.com/leeoniya/uFuzzy) MIT 55 | * [mathjax/MathJax](https://github.com/mathjax/MathJax) Apache-2.0 56 | * [kingdido999/zooming](https://github.com/kingdido999/zooming) MIT 57 | * [feathericons/feather](https://github.com/feathericons/feather) MIT 58 | * [simple-icons/simple-icons](https://github.com/simple-icons/simple-icons) CC0-1.0 59 | 60 | ## Support 61 | 62 | If you find my work brings value to your life and would like to support its development, you can sponsor me in the following ways. 63 | 64 | Buy Me A Coffee 65 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | +++ 3 | -------------------------------------------------------------------------------- /assets/js/builtin-copy.js: -------------------------------------------------------------------------------- 1 | function registerHoverEvent(wrapper, button) { 2 | wrapper.addEventListener('mouseenter', function () { 3 | button.classList.remove("hidden"); 4 | }); 5 | wrapper.addEventListener('mouseleave', function () { 6 | button.classList.add("hidden"); 7 | }); 8 | } 9 | 10 | function registerTouchedEvent(pre, button) { 11 | pre.addEventListener("touchend", function () { 12 | if (button.classList.contains("hidden")) { 13 | button.classList.remove("hidden"); 14 | } else { 15 | button.classList.add("hidden"); 16 | } 17 | }); 18 | } 19 | 20 | function registerClipboard(button, code_block) { 21 | button.addEventListener('click', async function () { 22 | try { 23 | await navigator.clipboard.writeText(code_block.innerText); 24 | button.blur(); 25 | button.innerText = 'Copied!'; 26 | setTimeout(function () { 27 | button.innerText = 'Copy'; 28 | }, 2000); 29 | } catch (e) { 30 | button.innerText = 'Error'; 31 | } 32 | }); 33 | } 34 | 35 | window.addEventListener("DOMContentLoaded", function () { 36 | document.querySelectorAll('pre:not(.emgithub-pre) > code').forEach((code_block) => { 37 | var button = document.createElement('span'); 38 | button.className = 'copy-code-button hidden'; 39 | button.type = 'button'; 40 | button.innerText = 'Copy'; 41 | 42 | var pre = code_block.parentNode; 43 | if (pre.parentNode.classList.contains('highlight')) { 44 | var highlight = pre.parentNode; 45 | highlight.appendChild(button); 46 | registerHoverEvent(highlight, button); 47 | registerTouchedEvent(pre, button); 48 | registerClipboard(button, code_block); 49 | } else if (pre.parentNode.tagName === "TD") { 50 | // check is line no 51 | var td = pre.parentNode; 52 | var tr = td.parentNode; 53 | if (td === tr.firstChild) { 54 | return; 55 | } 56 | // get highlight block 57 | var highlight = pre.parentNode; 58 | while (!highlight.classList.contains('highlight') && highlight.tagName !== 'BODY') { 59 | highlight = highlight.parentNode; 60 | } 61 | if (highlight.tagName !== 'BODY') { 62 | highlight.appendChild(button); 63 | registerHoverEvent(highlight, button); 64 | registerTouchedEvent(pre, button); 65 | registerClipboard(button, code_block); 66 | } 67 | } else { 68 | var wrapper = document.createElement('div'); 69 | wrapper.style = "position: relative;" 70 | pre.parentNode.insertBefore(wrapper, pre); 71 | wrapper.appendChild(pre); 72 | wrapper.appendChild(button); 73 | registerHoverEvent(wrapper, button); 74 | registerTouchedEvent(pre, button); 75 | registerClipboard(button, code_block); 76 | } 77 | }); 78 | }); 79 | -------------------------------------------------------------------------------- /assets/js/emgithub.js: -------------------------------------------------------------------------------- 1 | var currentScript = document.currentScript; 2 | 3 | function removeMask (container) { 4 | const emgithubPre = container.querySelector(".emgithub-pre"); 5 | const emgithubLoading = container.querySelector(".emgithub-loading"); 6 | emgithubLoading.classList.add("hide"); 7 | emgithubPre.classList.remove("hide"); 8 | emgithubPre.classList.remove("loading"); 9 | } 10 | 11 | function embedTextToEle (codeText, container, lang, lineBegin, lineEnd) { 12 | const emgithubPre = container.querySelector(".emgithub-pre"); 13 | const emgithubCode = document.createElement("code"); 14 | emgithubPre.appendChild(emgithubCode); 15 | 16 | if (lineBegin > 0) { 17 | const codeTextSplit = codeText.split("\n"); 18 | codeText = codeTextSplit.slice(lineBegin - 1, lineEnd).join("\n") + '\n'; 19 | } 20 | 21 | // Dynamically adjust padding of pre to fit in the line numbers 22 | const lineBeginDigit = lineBegin.toString().length; 23 | const lineEndDigit = lineEnd.toString().length; 24 | if (lineBeginDigit >= 4 || lineEndDigit >= 4) { 25 | emgithubPre.style.paddingLeft = "4.5rem"; 26 | } else if (lineBeginDigit >= 3 || lineEndDigit >= 3) { 27 | emgithubPre.style.paddingLeft = "4rem"; 28 | } else if (lineBeginDigit >= 2 || lineEndDigit >= 2) { 29 | emgithubPre.style.paddingLeft = "3.5rem"; 30 | } 31 | 32 | emgithubCode.classList.add(`language-${lang}`); 33 | emgithubCode.textContent = codeText; 34 | Prism.highlightAllUnder(container, false, () => { 35 | requestAnimationFrame(() => { 36 | removeMask(container); 37 | }) 38 | }); 39 | } 40 | 41 | function embedErrorToEle (errText, container) { 42 | const emgithubPre = container.querySelector(".emgithub-code .emgithub-pre"); 43 | const emgithubCode = document.createElement("code"); 44 | emgithubPre.appendChild(emgithubCode); 45 | 46 | emgithubPre.classList.remove("line-numbers"); 47 | emgithubPre.classList.add("no-line-numbers"); 48 | emgithubCode.textContent = errText; 49 | 50 | removeMask(container); 51 | } 52 | 53 | async function embed () { 54 | const sourceURL = new URL(currentScript.src); 55 | const params = sourceURL.searchParams; 56 | const rawFileURL = new URL(params.get("raw_file_url")); 57 | const lang = params.get("lang"); 58 | const id = params.get("id"); 59 | const lineBegin = Number(params.get("line_begin")); 60 | const lineEnd = Number(params.get("line_end")); 61 | 62 | const emgithubContainer = document.getElementById(id); 63 | const response = await fetch(rawFileURL); 64 | if (response.ok) { 65 | const text = await response.text(); 66 | embedTextToEle(text, emgithubContainer, lang, lineBegin, lineEnd); 67 | } else { 68 | embedErrorToEle(`Failed to process ${rawFileURL}\n${response.status}`, emgithubContainer); 69 | } 70 | } 71 | 72 | window.addEventListener("DOMContentLoaded", () => { 73 | embed(); 74 | }); -------------------------------------------------------------------------------- /assets/js/header.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("DOMContentLoaded", function () { 2 | const dark_mode_btn = document.getElementById("dark_mode_btn"); 3 | const light_mode_btn = document.getElementById("light_mode_btn"); 4 | 5 | dark_mode_btn.addEventListener('click', function () { 6 | document.documentElement.setAttribute("data-theme", "dark"); 7 | localStorage.theme = 'dark'; 8 | }); 9 | 10 | light_mode_btn.addEventListener('click', function () { 11 | document.documentElement.setAttribute("data-theme", "light"); 12 | localStorage.theme = 'light'; 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /assets/js/math.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [['$', '$'], ['\\(', '\\)']], 4 | displayMath: [['$$', '$$'], ['\\[', '\\]']], 5 | processEscapes: true, 6 | processEnvironments: true 7 | }, 8 | options: { 9 | skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'], 10 | }, 11 | chtml: { 12 | displayOverflow: "linebreak" 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /assets/js/prism-autoloader.js: -------------------------------------------------------------------------------- 1 | Prism.plugins.autoloader.languages_path = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/'; 2 | -------------------------------------------------------------------------------- /assets/js/prism.js: -------------------------------------------------------------------------------- 1 | function highlight() { 2 | document.querySelectorAll("pre:not(.emgithub-pre)").forEach(e => { 3 | Prism.highlightAllUnder(e, false, () => { 4 | requestAnimationFrame(() => { 5 | e.classList.remove("hide"); 6 | }) 7 | }); 8 | }); 9 | } 10 | 11 | window.addEventListener("DOMContentLoaded", () => { 12 | highlight(); 13 | }) 14 | -------------------------------------------------------------------------------- /assets/js/zooming.js: -------------------------------------------------------------------------------- 1 | import Zooming from '../lib/js/zooming-v2.1.1.min.js'; 2 | 3 | document.addEventListener('DOMContentLoaded', function () { 4 | let bgColor; 5 | if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { 6 | bgColor = '#333'; 7 | } else { 8 | bgColor = '#fff'; 9 | } 10 | 11 | zooming = new Zooming({ 12 | transitionDuration: 0.2, 13 | bgColor: bgColor, 14 | }); 15 | zooming.listen('#content img'); 16 | 17 | const dark_mode_btn = document.getElementById("dark_mode_btn"); 18 | const light_mode_btn = document.getElementById("light_mode_btn"); 19 | 20 | dark_mode_btn.addEventListener('click', function () { 21 | zooming.config({bgColor: '#333'}); 22 | }); 23 | 24 | light_mode_btn.addEventListener('click', function () { 25 | zooming.config({bgColor: '#fff'}); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /assets/lib/js/prism-copy-to-clipboard-v1.29.0.min.js: -------------------------------------------------------------------------------- 1 | !function() { function t(t) { var e = document.createElement("textarea"); e.value = t.getText(), e.style.top = "0", e.style.left = "0", e.style.position = "fixed", document.body.appendChild(e), e.focus(), e.select(); try { var o = document.execCommand("copy"); setTimeout((function() { o ? t.success() : t.error() }), 1) } catch (e) { setTimeout((function() { t.error(e) }), 1) } document.body.removeChild(e) } "undefined" != typeof Prism && "undefined" != typeof document && (Prism.plugins.toolbar ? Prism.plugins.toolbar.registerButton("copy-to-clipboard", (function(e) { var o = e.element, n = function(t) { var e = { copy: "Copy", "copy-error": "Press Ctrl+C to copy", "copy-success": "Copied!", "copy-timeout": 5e3 }; for (var o in e) { for (var n = "data-prismjs-" + o, c = t; c && !c.hasAttribute(n);)c = c.parentElement; c && (e[o] = c.getAttribute(n)) } return e }(o), c = document.createElement("button"); c.className = "copy-to-clipboard-button", c.setAttribute("type", "button"); var r = document.createElement("span"); return c.appendChild(r), u("copy"), function(e, o) { e.addEventListener("click", (function() { !function(e) { navigator.clipboard ? navigator.clipboard.writeText(e.getText()).then(e.success, (function() { t(e) })) : t(e) }(o) })) }(c, { getText: function() { return o.textContent }, success: function() { u("copy-success"), i() }, error: function() { u("copy-error"), setTimeout((function() { !function(t) { window.getSelection().selectAllChildren(t) }(o) }), 1), i() } }), c; function i() { setTimeout((function() { u("copy") }), n["copy-timeout"]) } function u(t) { r.textContent = n[t], c.setAttribute("data-copy-state", t) } })) : console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")) }(); 2 | -------------------------------------------------------------------------------- /assets/lib/js/prism-line-numbers-v1.29.0.min.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.27.0 2 | https://prismjs.com/download.html#themes=prism-tomorrow&plugins=line-numbers */ 3 | !function() { if ("undefined" != typeof Prism && "undefined" != typeof document) { var e = "line-numbers", n = /\n(?!$)/g, t = Prism.plugins.lineNumbers = { getLine: function(n, t) { if ("PRE" === n.tagName && n.classList.contains(e)) { var i = n.querySelector(".line-numbers-rows"); if (i) { var r = parseInt(n.getAttribute("data-start"), 10) || 1, s = r + (i.children.length - 1); t < r && (t = r), t > s && (t = s); var l = t - r; return i.children[l] } } }, resize: function(e) { r([e]) }, assumeViewportIndependence: !0 }, i = void 0; window.addEventListener("resize", (function() { t.assumeViewportIndependence && i === window.innerWidth || (i = window.innerWidth, r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers")))) })), Prism.hooks.add("complete", (function(t) { if (t.code) { var i = t.element, s = i.parentNode; if (s && /pre/i.test(s.nodeName) && !i.querySelector(".line-numbers-rows") && Prism.util.isActive(i, e)) { i.classList.remove(e), s.classList.add(e); var l, o = t.code.match(n), a = o ? o.length + 1 : 1, u = new Array(a + 1).join(""); (l = document.createElement("span")).setAttribute("aria-hidden", "true"), l.className = "line-numbers-rows", l.innerHTML = u, s.hasAttribute("data-start") && (s.style.counterReset = "linenumber " + (parseInt(s.getAttribute("data-start"), 10) - 1)), t.element.appendChild(l), r([s]), Prism.hooks.run("line-numbers", t) } } })), Prism.hooks.add("line-numbers", (function(e) { e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0 })) } function r(e) { if (0 != (e = e.filter((function(e) { var n, t = (n = e, n ? window.getComputedStyle ? getComputedStyle(n) : n.currentStyle || null : null)["white-space"]; return "pre-wrap" === t || "pre-line" === t }))).length) { var t = e.map((function(e) { var t = e.querySelector("code"), i = e.querySelector(".line-numbers-rows"); if (t && i) { var r = e.querySelector(".line-numbers-sizer"), s = t.textContent.split(n); r || ((r = document.createElement("span")).className = "line-numbers-sizer", t.appendChild(r)), r.innerHTML = "0", r.style.display = "block"; var l = r.getBoundingClientRect().height; return r.innerHTML = "", { element: e, lines: s, lineHeights: [], oneLinerHeight: l, sizer: r } } })).filter(Boolean); t.forEach((function(e) { var n = e.sizer, t = e.lines, i = e.lineHeights, r = e.oneLinerHeight; i[t.length - 1] = void 0, t.forEach((function(e, t) { if (e && e.length > 1) { var s = n.appendChild(document.createElement("span")); s.style.display = "block", s.textContent = e } else i[t] = r })) })), t.forEach((function(e) { for (var n = e.sizer, t = e.lineHeights, i = 0, r = 0; r < t.length; r++)void 0 === t[r] && (t[r] = n.children[i++].getBoundingClientRect().height) })), t.forEach((function(e) { var n = e.sizer, t = e.element.querySelector(".line-numbers-rows"); n.style.display = "none", n.innerHTML = "", e.lineHeights.forEach((function(e, n) { t.children[n].style.height = e + "px" })) })) } } }(); 4 | -------------------------------------------------------------------------------- /assets/scss/base.scss: -------------------------------------------------------------------------------- 1 | html, button, input, select, textarea, 2 | .pure-g [class *= "pure-u"] { 3 | font-family: system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji; 4 | } 5 | 6 | code, kbd, pre { 7 | font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,liberation mono,courier new,monospace; 8 | } 9 | 10 | body { 11 | margin-left: auto; 12 | margin-right: auto; 13 | padding: 1.5rem; 14 | } 15 | 16 | h1, h2, h3, h4, h5, h6 { 17 | @include font-bold; 18 | margin-top: 2rem; 19 | margin-bottom: 1rem; 20 | } 21 | 22 | h1 { 23 | @include text-3xl; 24 | } 25 | 26 | h2 { 27 | @include text-2xl; 28 | } 29 | 30 | h3 { 31 | @include text-xl; 32 | } 33 | 34 | h4 { 35 | @include text-lg; 36 | } 37 | 38 | h5 { 39 | @include text-base; 40 | } 41 | 42 | h6 { 43 | @include text-sm; 44 | } 45 | 46 | figure { 47 | margin: 0; 48 | } 49 | 50 | img { 51 | max-width: 100%; 52 | border-radius: 3px; 53 | } 54 | 55 | input { 56 | background-color: var(--color-background); 57 | color: var(--color-text); 58 | border: none; 59 | } 60 | 61 | mark { 62 | background-color: var(--color-background-mark); 63 | color: var(--color-text-mark); 64 | } 65 | 66 | details > summary { 67 | cursor: pointer; 68 | } 69 | 70 | details[open] > summary { 71 | cursor: pointer; 72 | } 73 | 74 | .content-margin { 75 | @include my-8; 76 | } 77 | 78 | .hidden { 79 | display: none; 80 | } 81 | 82 | @media screen and (min-width: $sm_min_width) { 83 | body { 84 | width: $sm_body_width; 85 | } 86 | } 87 | 88 | @media screen and (min-width: $md_min_width) { 89 | body { 90 | width: $md_body_width; 91 | } 92 | } 93 | 94 | @media screen and (min-width: $lg_min_width) { 95 | body { 96 | width: $lg_body_width; 97 | } 98 | } 99 | 100 | @media screen and (min-width: $xl_min_width) { 101 | body { 102 | width: $xl_body_width; 103 | } 104 | } 105 | 106 | @media screen and (min-width: $xxl_min_width) { 107 | body { 108 | width: $xxl_body_width; 109 | } 110 | } 111 | 112 | // https://github.com/mathjax/MathJax/issues/3001 113 | .MJX_LiveRegion { 114 | background-color: transparent !important; 115 | } 116 | 117 | .MJX_HoverRegion{ 118 | background-color: transparent !important; 119 | } 120 | 121 | .MJX_ToolTip{ 122 | background-color: transparent !important; 123 | } 124 | -------------------------------------------------------------------------------- /assets/scss/color.scss: -------------------------------------------------------------------------------- 1 | $gray-0: #fff; 2 | $gray-50: #f7f7f7; 3 | $gray-100: #f5f5f5; 4 | $gray-150: #ededed; 5 | $gray-200: #e5e5e5; 6 | $gray-250: #dddddd; 7 | $gray-300: #d4d4d4; 8 | $gray-350: #bcbcbc; 9 | $gray-400: #a3a3a3; 10 | $gray-450: #8b8b8b; 11 | $gray-500: #737373; 12 | $gray-550: #636363; 13 | $gray-600: #525252; 14 | $gray-650: #494949; 15 | $gray-700: #404040; 16 | $gray-750: #333333; 17 | $gray-800: #262626; 18 | $gray-850: #1f1f1f; 19 | $gray-900: #171717; 20 | $gray-1000: #000; 21 | 22 | html[data-theme="light"] { 23 | --color-text: #{$gray-900}; 24 | --color-text-secondary: #{$gray-500}; 25 | --color-text-footer: #{$gray-500}; 26 | --color-text-mark: #{$gray-900}; 27 | --color-border: #{$gray-300}; 28 | --color-border-collapsible-menu: #{$gray-200}; 29 | --color-background: #{$gray-0}; 30 | --color-background-hover: #{$gray-50}; 31 | --color-background-overlay: #{$gray-150}; 32 | --color-background-inline-code: #{$gray-100}; 33 | --color-background-card: #{$gray-0}; 34 | --color-background-mark: #ffd70e; 35 | --color-link: #2563eb; 36 | --color-navbar-item-inactive: #{$gray-400}; 37 | --color-navbar-item-active: #{$gray-900}; 38 | --color-navbar-item-in-section: #{$gray-600}; 39 | } 40 | 41 | html[data-theme="dark"] { 42 | --color-text: #{$gray-150}; 43 | --color-text-secondary: #{$gray-450}; 44 | --color-text-footer: #{$gray-400}; 45 | --color-text-mark: #{$gray-900}; 46 | --color-border: #{$gray-500}; 47 | --color-border-collapsible-menu: #{$gray-550}; 48 | --color-background: #{$gray-750}; 49 | --color-background-hover: #{$gray-600}; 50 | --color-background-overlay: #{$gray-700}; 51 | --color-background-inline-code: #{$gray-600}; 52 | --color-background-card: #{$gray-700}; 53 | --color-background-mark: #ffd70e; 54 | --color-link: #93c5fd; 55 | --color-navbar-item-inactive: #{$gray-400}; 56 | --color-navbar-item-active: #{$gray-100}; 57 | --color-navbar-item-in-section: #{$gray-250}; 58 | } 59 | 60 | // Default color settings 61 | 62 | html { 63 | color: var(--color-text); 64 | background: var(--color-background); 65 | font-size: 16px; 66 | } 67 | 68 | a { 69 | color: var(--color-link); 70 | text-decoration: none; 71 | } -------------------------------------------------------------------------------- /assets/scss/components/breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | .breadcrumbs { 2 | @include font-bold; 3 | list-style-type: none; 4 | padding: 0; 5 | margin: 0; 6 | 7 | a { 8 | color: var(--color-text); 9 | border-bottom: 2px solid transparent; 10 | 11 | &:hover { 12 | border-bottom-color: var(--color-text-secondary); 13 | } 14 | } 15 | 16 | li { 17 | display: inline; 18 | margin-right: 0.25rem; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /assets/scss/components/collapsible-menu.scss: -------------------------------------------------------------------------------- 1 | #TableOfContents { 2 | line-height: 1.5rem; 3 | 4 | ul, li { 5 | list-style: none; 6 | padding-left: 0; 7 | margin: 0; 8 | } 9 | 10 | ul ul { 11 | margin-left: .5rem; 12 | } 13 | 14 | li { 15 | margin-top: .375rem; 16 | } 17 | 18 | a { 19 | color: var(--color-text); 20 | } 21 | } 22 | 23 | article#collapsible_menu_changelogs { 24 | line-height: 1.75rem; 25 | display: grid; 26 | gap: .5rem; 27 | grid-template-columns: max-content 1fr; 28 | margin-top: .5rem; 29 | } 30 | 31 | .collapsible-menu-wrapper { 32 | @include my-8; 33 | font-size: 0.875rem; 34 | padding: 1rem; 35 | border: 2px solid var(--color-border-collapsible-menu); 36 | border-radius: .25rem; 37 | 38 | .collapsible-menu-type { 39 | span { 40 | @include font-bold; 41 | line-height: 1.5rem; 42 | } 43 | } 44 | 45 | summary.collapsible-menu-type { 46 | span { 47 | margin-left: .3rem; 48 | } 49 | } 50 | 51 | .collapsible-menu { 52 | margin-left: .5rem; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /assets/scss/components/color-block.scss: -------------------------------------------------------------------------------- 1 | .color-block { 2 | border-radius: 0.25rem; 3 | padding: 0.75rem; 4 | } -------------------------------------------------------------------------------- /assets/scss/components/emgithub.scss: -------------------------------------------------------------------------------- 1 | .emgithub-container { 2 | @include my-6; 3 | 4 | .emgithub-code { 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | 9 | .emgithub-loading { 10 | @include mx-auto; 11 | @include my-4; 12 | z-index: 10; 13 | position: absolute; 14 | left: 0; 15 | right: 0; 16 | width: 2rem; 17 | 18 | &.hide { 19 | display: none; 20 | } 21 | 22 | svg { 23 | width: 2rem; 24 | height: 2rem; 25 | animation: spin 1s linear infinite; 26 | color: white; 27 | fill: #969696; 28 | @keyframes spin { 29 | from { 30 | transform: rotate(0deg); 31 | } 32 | to { 33 | transform: rotate(360deg); 34 | } 35 | } 36 | } 37 | } 38 | 39 | .emgithub-pre { 40 | @include my-0; 41 | border-bottom-right-radius: 0px; 42 | border-bottom-left-radius: 0px; 43 | 44 | &.loading { 45 | min-height: 5rem; 46 | } 47 | 48 | code { 49 | tab-size: inherit; 50 | } 51 | } 52 | } 53 | 54 | .emgithub-toolbar { 55 | @include text-xs; 56 | display: flex; 57 | flex-direction: row; 58 | justify-content: space-between; 59 | padding: 0.75rem 0.75rem 0.625rem 0.75rem; 60 | border-bottom-right-radius: 0.375rem; 61 | border-bottom-left-radius: 0.375rem; 62 | background-color: $gray-900; 63 | 64 | a { 65 | @include font-semibold; 66 | color: white; 67 | border: 0; 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /assets/scss/components/footer.scss: -------------------------------------------------------------------------------- 1 | footer { 2 | @include my-4; 3 | @include text-xs; 4 | text-align: center; 5 | color: var(--color-text-footer); 6 | } -------------------------------------------------------------------------------- /assets/scss/components/header.scss: -------------------------------------------------------------------------------- 1 | html[data-theme="dark"] { 2 | #dark_mode_btn { 3 | display: none; 4 | } 5 | } 6 | 7 | html[data-theme="light"] { 8 | #light_mode_btn { 9 | display: none; 10 | } 11 | } 12 | 13 | header { 14 | display: flex; 15 | justify-content: space-between; 16 | align-items: center; 17 | margin: 1rem 0; 18 | 19 | #header_left { 20 | display: flex; 21 | justify-content: space-between; 22 | align-items: center; 23 | 24 | .brand { 25 | display: flex; 26 | align-items: center; 27 | 28 | a { 29 | @include text-3xl; 30 | @include font-bold; 31 | color: var(--color-text); 32 | } 33 | } 34 | 35 | #sidebar_btn { 36 | margin-right: 0.5rem; 37 | 38 | #sidebar_btn_label { 39 | display: flex; 40 | } 41 | 42 | @media screen and (min-width: $md_min_width) { 43 | display: none; 44 | } 45 | } 46 | } 47 | 48 | .toolbox { 49 | display: flex; 50 | align-items: center; 51 | column-gap: 0.5rem; 52 | 53 | .toolbox-btn { 54 | display: flex; 55 | cursor: pointer; 56 | 57 | &:hover { 58 | color: var(--color-text-secondary); 59 | } 60 | } 61 | 62 | .dropdown-wrapper { 63 | .dropdown-btn.pure-menu-link { 64 | color: unset; 65 | } 66 | 67 | .dropdown-btn { 68 | display: flex; 69 | align-items: center; 70 | padding: 0; 71 | 72 | &:hover { 73 | background-color: unset; 74 | } 75 | 76 | &::after { 77 | content: ""; 78 | padding: 0; 79 | } 80 | 81 | .dropdown-desc { 82 | @include text-sm; 83 | margin-left: 0.35rem; 84 | } 85 | } 86 | } 87 | 88 | #translation_tool { 89 | .dropdown-btn .dropdown-desc { 90 | display: none; 91 | 92 | @media screen and (min-width: $md_min_width) { 93 | display: block; 94 | } 95 | } 96 | 97 | .pure-menu-children { 98 | left: auto; 99 | right: 0; 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /assets/scss/components/icon-group.scss: -------------------------------------------------------------------------------- 1 | .icon-group { 2 | @include my-4; 3 | display: inline-grid; 4 | grid-auto-flow: column; 5 | gap: 0.375rem; 6 | } -------------------------------------------------------------------------------- /assets/scss/components/icon.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | display: inline-block; 3 | width: 1.5rem; 4 | height: 1.5rem; 5 | 6 | a { 7 | color: var(--color-text); 8 | 9 | &:hover { 10 | color: var(--color-text-secondary); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /assets/scss/components/nav.scss: -------------------------------------------------------------------------------- 1 | #navbar { 2 | margin: 1rem 0; 3 | 4 | @media screen and (max-width: $md_min_width) { 5 | display: none; 6 | } 7 | 8 | > ul.pure-menu-list { 9 | display: flex; 10 | 11 | .navbar-dropdown { 12 | > a.pure-menu-link:after { 13 | content: "▾"; 14 | } 15 | 16 | > ul.pure-menu-children { 17 | left: 0; 18 | top: 27px; 19 | width: inherit; 20 | } 21 | } 22 | 23 | .navbar-item { 24 | margin: 0 .5rem 0 0; 25 | border-bottom: 2px solid transparent; 26 | 27 | > a.pure-menu-link { 28 | @include font-medium; 29 | padding: 0 0 .3rem 0; 30 | color: var(--color-navbar-item-inactive); 31 | 32 | &:hover { 33 | background-color: transparent; 34 | } 35 | } 36 | 37 | &:hover { 38 | border-bottom-color: var(--color-navbar-item-active); 39 | 40 | > a { 41 | color: var(--color-navbar-item-active); 42 | } 43 | } 44 | } 45 | 46 | .navbar-item.active { 47 | border-bottom-color: var(--color-navbar-item-active); 48 | 49 | > a { 50 | color: var(--color-navbar-item-active); 51 | } 52 | } 53 | 54 | .navbar-item.insection { 55 | border-bottom-color: var(--color-navbar-item-in-section); 56 | 57 | > a { 58 | color: var(--color-navbar-item-in-section); 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /assets/scss/components/pagination.scss: -------------------------------------------------------------------------------- 1 | .pagination { 2 | padding: 0; 3 | margin: 0; 4 | list-style: none; 5 | 6 | li { 7 | display: inline; 8 | margin: 0 .1rem; 9 | } 10 | 11 | a, span { 12 | color: var(--color-text-secondary); 13 | } 14 | 15 | li.active a { 16 | @include font-semibold; 17 | color: var(--color-text); 18 | } 19 | 20 | li:not(.disabled) a:hover { 21 | color: var(--color-text); 22 | 23 | span { 24 | color: inherit; 25 | } 26 | } 27 | 28 | .disabled { 29 | cursor: not-allowed; 30 | } 31 | } 32 | 33 | .postcard-layout { 34 | .pagination { 35 | text-align: center; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /assets/scss/components/search-menu.scss: -------------------------------------------------------------------------------- 1 | #search_menu_wrapper { 2 | display: flex; 3 | justify-content: center; 4 | position: fixed; 5 | top: 0; 6 | left: 0; 7 | width: 100%; 8 | height: 100%; 9 | z-index: 40; 10 | background-color: rgba(0,0,0,.75); 11 | 12 | #search_menu { 13 | position: fixed; 14 | display: flex; 15 | flex-direction: column; 16 | width: 100%; 17 | height: 100%; 18 | border-radius: 0; 19 | background-color: var(--color-background); 20 | 21 | @media screen and (min-width: $sm_min_width) { 22 | height: auto; 23 | top: 6rem; 24 | bottom: 6rem; 25 | width: 30rem; 26 | z-index: 50; 27 | border-radius: 0.375rem; 28 | } 29 | 30 | #search_menu_toolbar { 31 | display: flex; 32 | min-height: 2.5rem; 33 | box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 34 | 35 | #search_menu_input_wrapper { 36 | display: flex; 37 | flex-grow: 1; 38 | 39 | input { 40 | @include px-4; 41 | flex-grow: 1; 42 | border-top-left-radius: 0.375rem; 43 | } 44 | 45 | input:focus { 46 | outline: 2px solid transparent; 47 | outline-offset: 2px; 48 | } 49 | } 50 | 51 | #search_menu_close_btn { 52 | display: flex; 53 | align-items: center; 54 | justify-content: center; 55 | width: 2.5rem; 56 | border-top-right-radius: 0.375rem; 57 | cursor: pointer; 58 | 59 | &:hover { 60 | background-color: var(--color-background-overlay); 61 | } 62 | } 63 | } 64 | 65 | #search_menu_results { 66 | flex-grow: 1; 67 | overflow-y: auto; 68 | 69 | .search-menu-result-item { 70 | @include px-4; 71 | padding-top: 0.875rem; 72 | padding-bottom: 0.875rem; 73 | min-height: 2.5rem; 74 | 75 | &:hover { 76 | background-color: var(--color-background-overlay); 77 | } 78 | 79 | .search-menu-result-item-title { 80 | @include font-bold; 81 | line-height: 1.7rem; 82 | color: var(--color-text); 83 | } 84 | 85 | .search-menu-result-item-content { 86 | @include text-xs; 87 | color: var(--color-text-secondary); 88 | } 89 | } 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /assets/scss/components/sidebar.scss: -------------------------------------------------------------------------------- 1 | #sidebar_btn_input:checked ~ #sidebar_canvas_overlay_wrapper #sidebar_canvas_overlay { 2 | display: block; 3 | } 4 | 5 | #sidebar_canvas_overlay { 6 | background-color: rgba(0,0,0,.75); 7 | position: fixed; 8 | top: 0; 9 | left: 0; 10 | width: 100%; 11 | height: 100%; 12 | z-index: 10; 13 | display: none; 14 | } 15 | 16 | #sidebar { 17 | position: fixed; 18 | top: 0; 19 | left: 0; 20 | height: 100%; 21 | z-index: 20; 22 | background-color: var(--color-background); 23 | box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 24 | transition: transform 0.2s; 25 | transform: translateX(-100%); 26 | overflow-y: auto; 27 | width: 60%; 28 | 29 | @media screen and (min-width: $sm_min_width) { 30 | width: 40%; 31 | } 32 | 33 | ul { 34 | list-style: none; 35 | padding-left: 0; 36 | margin: 0; 37 | } 38 | 39 | li { 40 | margin: 1.2rem; 41 | } 42 | 43 | a { 44 | color: var(--color-text); 45 | } 46 | } 47 | 48 | #sidebar_btn_input:checked ~ #sidebar { 49 | display: block; 50 | transform: translateX(0); 51 | } 52 | -------------------------------------------------------------------------------- /assets/scss/components/terms-cloud.scss: -------------------------------------------------------------------------------- 1 | .term-item { 2 | @include list-link-item; 3 | margin-right: 0.375rem; 4 | } 5 | -------------------------------------------------------------------------------- /assets/scss/core.scss: -------------------------------------------------------------------------------- 1 | @import 'purecss/base'; 2 | 3 | @import 'mixins/text'; 4 | @import 'mixins/margin'; 5 | @import 'mixins/padding'; 6 | @import 'mixins/items'; 7 | 8 | @import 'color'; 9 | @import 'vars'; 10 | 11 | @import 'base'; 12 | @import 'layout/article'; 13 | @import 'layout/bookcase'; 14 | @import 'layout/gallery'; 15 | @import 'layout/balloon'; 16 | @import 'layout/list'; 17 | @import 'layout/postcard'; 18 | @import 'layout/term'; 19 | @import 'components/header'; 20 | @import 'components/footer'; 21 | @import 'components/menus'; 22 | @import 'components/nav'; 23 | @import 'components/collapsible-menu'; 24 | @import 'components/emgithub'; 25 | @import 'components/terms-cloud'; 26 | @import 'components/icon'; 27 | @import 'components/breadcrumbs'; 28 | @import 'components/color-block'; 29 | @import 'components/icon-group'; 30 | @import 'components/search-menu'; 31 | @import 'components/sidebar'; 32 | @import 'components/pagination'; 33 | -------------------------------------------------------------------------------- /assets/scss/layout/balloon.scss: -------------------------------------------------------------------------------- 1 | %balloon-item-base { 2 | display: flex; 3 | flex-direction: column; 4 | 5 | @media screen and (min-width: $md_min_width) { 6 | flex-direction: row; 7 | } 8 | } 9 | 10 | %balloon-item-line-base { 11 | width: 7rem; 12 | display: flex; 13 | flex-direction: column; 14 | position: relative; 15 | align-items: center; 16 | 17 | @media screen and (max-width: $md_min_width) { 18 | display: none; 19 | } 20 | } 21 | 22 | %balloon-item-content-base { 23 | display: flex; 24 | flex: 1 1 0%; 25 | margin-left: -12px; 26 | 27 | @media screen and (max-width: $md_min_width) { 28 | margin-left: 0; 29 | } 30 | } 31 | 32 | 33 | .balloon-layout { 34 | @media screen and (min-width: $md_min_width) { 35 | margin-left: -1.75rem; 36 | } 37 | 38 | .balloon-head-item { 39 | @extend %balloon-item-base; 40 | width: 100%; 41 | gap: 20px; 42 | 43 | .balloon-head-item-desktop { 44 | @extend %balloon-item-line-base; 45 | } 46 | 47 | .balloon-head-item-mobile { 48 | width: 100%; 49 | justify-content: center; 50 | 51 | @media screen and (min-width: $md_min_width) { 52 | display: none; 53 | } 54 | } 55 | 56 | .balloon-head-item-img-light, .balloon-head-item-img-dark { 57 | display: flex; 58 | justify-content: center; 59 | } 60 | 61 | .balloon-head-item-img { 62 | img { 63 | width: 6rem; 64 | height: 6rem; 65 | } 66 | 67 | .rounded { 68 | border-radius: 9999px; 69 | } 70 | } 71 | 72 | .balloon-head-item-content { 73 | @extend %balloon-item-content-base; 74 | margin: 0; 75 | align-items: center; 76 | 77 | @media screen and (max-width: $md_min_width) { 78 | justify-content: center; 79 | text-align: center; 80 | } 81 | } 82 | } 83 | 84 | .balloon-title-item { 85 | @extend %balloon-item-base; 86 | 87 | .balloon-title-item-line { 88 | @extend %balloon-item-line-base; 89 | } 90 | 91 | .balloon-title-item-content { 92 | @extend %balloon-item-content-base; 93 | 94 | @media screen and (max-width: $md_min_width) { 95 | justify-content: center; 96 | text-align: center; 97 | } 98 | } 99 | } 100 | 101 | .balloon-card-item { 102 | @extend %balloon-item-base; 103 | 104 | .balloon-card-item-line { 105 | @extend %balloon-item-line-base; 106 | } 107 | 108 | .balloon-card-item-content { 109 | @extend %balloon-item-content-base; 110 | @include text-sm; 111 | overflow: auto; 112 | border-radius: 0.375rem; 113 | box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 114 | background-color: var(--color-background-card); 115 | padding: 1rem 1.2rem; 116 | } 117 | } 118 | 119 | .balloon-dot { 120 | width: .8rem; 121 | height: .8rem; 122 | border-radius: 1rem; 123 | margin: 0.25rem 0; 124 | border: 2px solid var(--color-text); 125 | } 126 | 127 | .balloon-line-container { 128 | display: flex; 129 | flex: 1 1 0%; 130 | justify-content: center; 131 | 132 | .balloon-line { 133 | background-color: var(--color-text); 134 | } 135 | } 136 | } 137 | 138 | html[data-theme="dark"] { 139 | .balloon-head-item { 140 | .balloon-head-item-img-light { 141 | display: none; 142 | } 143 | } 144 | } 145 | 146 | html[data-theme="light"] { 147 | .balloon-head-item { 148 | .balloon-head-item-img-dark { 149 | display: none; 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /assets/scss/layout/bookcase.scss: -------------------------------------------------------------------------------- 1 | .bookcase-layout { 2 | display: grid; 3 | gap: 1rem; 4 | grid-template-columns: repeat(auto-fill, 8rem); 5 | 6 | .bookcase-item { 7 | figure { 8 | position: relative; 9 | margin: 0; 10 | } 11 | 12 | figcaption { 13 | @include text-sm; 14 | text-align: center; 15 | margin-top: .7rem; 16 | 17 | a { 18 | color: var(--color-text); 19 | } 20 | } 21 | 22 | img, .bookcase-item-overlay { 23 | width: 8rem; 24 | height: 12rem; 25 | border-radius: 0.375rem; 26 | object-fit: cover; 27 | } 28 | 29 | .bookcase-item-overlay { 30 | position: absolute; 31 | top: 0; 32 | left: 0; 33 | background-color: transparent; 34 | opacity: 0.25; 35 | 36 | &:hover { 37 | background-color: var(--color-background-overlay); 38 | } 39 | } 40 | } 41 | } 42 | 43 | html[data-theme="light"] { 44 | .bookcase-item-img-dark { 45 | display: none; 46 | } 47 | 48 | .bookcase-item { 49 | img, .bookcase-item-overlay { 50 | box-shadow: 0 0 10px -1px rgba(0, 0, 0, 0.1); 51 | } 52 | } 53 | } 54 | 55 | html[data-theme="dark"] { 56 | .bookcase-item-img-light { 57 | display: none; 58 | } 59 | 60 | .bookcase-item { 61 | img, .bookcase-item-overlay { 62 | box-shadow: 0 0 3px 0px rgba(135, 135, 135, 0.2); 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /assets/scss/layout/gallery.scss: -------------------------------------------------------------------------------- 1 | .gallery-layout { 2 | figure { 3 | @media screen and (min-width: $md_min_width) { 4 | margin-left: -1.25rem; 5 | margin-right: -1.25rem; 6 | } 7 | 8 | img { 9 | @include mx-auto; 10 | display: block; 11 | } 12 | } 13 | 14 | figcaption { 15 | @include my-2; 16 | @include text-xs; 17 | font-style: italic; 18 | text-align: center; 19 | } 20 | 21 | .gallery-item { 22 | margin-bottom: 4rem; 23 | } 24 | 25 | .gallery-item-title { 26 | margin: 1rem 0; 27 | 28 | a { 29 | @include list-link-item; 30 | } 31 | 32 | span { 33 | @include text-3xl; 34 | @include font-bold; 35 | } 36 | } 37 | 38 | .gallery-item-content { 39 | @include my-4; 40 | } 41 | 42 | .gallery-item-statistic { 43 | display: grid; 44 | gap: 0.5rem; 45 | grid-template-columns: max-content 1fr; 46 | } 47 | } -------------------------------------------------------------------------------- /assets/scss/layout/list.scss: -------------------------------------------------------------------------------- 1 | ul.list-layout { 2 | list-style: none; 3 | padding: 0; 4 | 5 | li { 6 | margin-bottom: .5rem; 7 | line-height: 1.625; 8 | display: list-item; 9 | list-style-type: none; 10 | 11 | a { 12 | @include list-link-item; 13 | line-height: 1.7rem; 14 | } 15 | 16 | span { 17 | @include text-xs; 18 | color: var(--color-text-secondary); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /assets/scss/layout/postcard.scss: -------------------------------------------------------------------------------- 1 | .postcard-layout { 2 | a { 3 | color: var(--color-text); 4 | } 5 | 6 | .postcard-item { 7 | padding: 1rem; 8 | background-color: var(--color-background-card); 9 | border-radius: .375rem; 10 | margin: 2rem 0; 11 | box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 12 | 13 | &:hover { 14 | background-color: var(--color-background-hover); 15 | } 16 | 17 | .postcard-title { 18 | @include text-xl; 19 | @include font-medium; 20 | } 21 | 22 | .postcard-summary { 23 | @include text-xs; 24 | color: var(--color-text-secondary); 25 | overflow: hidden; 26 | white-space: nowrap; 27 | text-overflow: ellipsis; 28 | margin: .5rem 0; 29 | } 30 | 31 | .postcard-metadata { 32 | @include text-xs; 33 | color: var(--color-text-secondary); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /assets/scss/layout/term.scss: -------------------------------------------------------------------------------- 1 | .term-title { 2 | display: flex; 3 | align-items: center; 4 | gap: 8px; 5 | margin: 2rem 0; 6 | 7 | h1 { 8 | margin: 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /assets/scss/mixins/items.scss: -------------------------------------------------------------------------------- 1 | @mixin list-link-item { 2 | color: var(--color-text); 3 | border-bottom: 2px solid var(--color-border); 4 | 5 | &:hover { 6 | border-bottom-color: var(--color-text-secondary); 7 | } 8 | } -------------------------------------------------------------------------------- /assets/scss/mixins/margin.scss: -------------------------------------------------------------------------------- 1 | @mixin my-0 { 2 | margin-top: 0; 3 | margin-bottom: 0; 4 | } 5 | @mixin my-2 { 6 | margin-top: .5rem; 7 | margin-bottom: .5rem; 8 | } 9 | @mixin my-4 { 10 | margin-top: 1rem; 11 | margin-bottom: 1rem; 12 | } 13 | @mixin my-6 { 14 | margin-top: 1.5rem; 15 | margin-bottom: 1.5rem; 16 | } 17 | @mixin my-8 { 18 | margin-top: 2rem; 19 | margin-bottom: 2rem; 20 | } 21 | 22 | @mixin mx-auto { 23 | margin-left: auto; 24 | margin-right: auto; 25 | } 26 | @mixin mx-0 { 27 | margin-left: 0; 28 | margin-right: 0; 29 | } 30 | @mixin mx-1 { 31 | margin-left: 0.25rem; 32 | margin-right: 0.25rem; 33 | } 34 | @mixin mx-2 { 35 | margin-left: .5rem; 36 | margin-right: .5rem; 37 | } 38 | @mixin mx-4 { 39 | margin-left: 1rem; 40 | margin-right: 1rem; 41 | } 42 | @mixin mx-6 { 43 | margin-left: 1.5rem; 44 | margin-right: 1.5rem; 45 | } 46 | @mixin mx-8 { 47 | margin-left: 2rem; 48 | margin-right: 2rem; 49 | } -------------------------------------------------------------------------------- /assets/scss/mixins/padding.scss: -------------------------------------------------------------------------------- 1 | @mixin py-0 { 2 | padding-top: 0; 3 | padding-bottom: 0; 4 | } 5 | @mixin py-2 { 6 | padding-top: .5rem; 7 | padding-bottom: .5rem; 8 | } 9 | @mixin py-4 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | @mixin py-6 { 14 | padding-top: 1.5rem; 15 | padding-bottom: 1.5rem; 16 | } 17 | @mixin py-8 { 18 | padding-top: 2rem; 19 | padding-bottom: 2rem; 20 | } 21 | 22 | @mixin px-0 { 23 | padding-left: 0; 24 | padding-right: 0; 25 | } 26 | @mixin px-2 { 27 | padding-left: .5rem; 28 | padding-right: .5rem; 29 | } 30 | @mixin px-3 { 31 | padding-left: .75rem; 32 | padding-right: .75rem; 33 | } 34 | @mixin px-4 { 35 | padding-left: 1rem; 36 | padding-right: 1rem; 37 | } 38 | @mixin px-6 { 39 | padding-left: 1.5rem; 40 | padding-right: 1.5rem; 41 | } 42 | @mixin px-8 { 43 | padding-left: 2rem; 44 | padding-right: 2rem; 45 | } -------------------------------------------------------------------------------- /assets/scss/mixins/text.scss: -------------------------------------------------------------------------------- 1 | @mixin text-xs { 2 | font-size: 0.75rem; /* 12px */ 3 | line-height: 1rem; /* 16px */ 4 | } 5 | @mixin text-sm { 6 | font-size: 0.875rem; /* 14px */ 7 | line-height: 1.25rem; /* 20px */ 8 | } 9 | @mixin text-base { 10 | font-size: 1rem; /* 16px */ 11 | line-height: 1.5rem; /* 24px */ 12 | } 13 | @mixin text-lg { 14 | font-size: 1.125rem; /* 18px */ 15 | line-height: 1.75rem; /* 28px */ 16 | } 17 | @mixin text-xl { 18 | font-size: 1.25rem; /* 20px */ 19 | line-height: 1.75rem; /* 28px */ 20 | } 21 | @mixin text-2xl { 22 | font-size: 1.375rem; /* 22px */ 23 | line-height: 1.875rem; /* 30px */ 24 | } 25 | @mixin text-3xl { 26 | font-size: 1.5rem; /* 24px */ 27 | line-height: 2rem; /* 32px */ 28 | } 29 | 30 | @mixin font-thin { 31 | font-weight: 100; 32 | } 33 | @mixin font-extralight { 34 | font-weight: 200; 35 | } 36 | @mixin font-light { 37 | font-weight: 300; 38 | } 39 | @mixin font-normal { 40 | font-weight: 400; 41 | } 42 | @mixin font-medium { 43 | font-weight: 500; 44 | } 45 | @mixin font-semibold { 46 | font-weight: 600; 47 | } 48 | @mixin font-bold { 49 | font-weight: 700; 50 | } 51 | @mixin font-extrabold { 52 | font-weight: 800; 53 | } 54 | @mixin font-black { 55 | font-weight: 900; 56 | } 57 | -------------------------------------------------------------------------------- /assets/scss/vars.scss: -------------------------------------------------------------------------------- 1 | $sm_min_width: 35.5rem; 2 | $md_min_width: 48rem; 3 | $lg_min_width: 64rem; 4 | $xl_min_width: 80rem; 5 | $xxl_min_width: 120rem; 6 | 7 | $sm_body_width: 100vw; 8 | $md_body_width: 80vw; 9 | $lg_body_width: 55vw; 10 | $xl_body_width: 55vw; 11 | $xxl_body_width: 55vw; 12 | 13 | -------------------------------------------------------------------------------- /exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/node 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=node 4 | 5 | ### Node ### 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | lerna-debug.log* 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # TypeScript v1 declaration files 50 | typings/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Optional stylelint cache 62 | .stylelintcache 63 | 64 | # Microbundle cache 65 | .rpt2_cache/ 66 | .rts2_cache_cjs/ 67 | .rts2_cache_es/ 68 | .rts2_cache_umd/ 69 | 70 | # Optional REPL history 71 | .node_repl_history 72 | 73 | # Output of 'npm pack' 74 | *.tgz 75 | 76 | # Yarn Integrity file 77 | .yarn-integrity 78 | 79 | # dotenv environment variables file 80 | .env 81 | .env.test 82 | .env*.local 83 | 84 | # parcel-bundler cache (https://parceljs.org/) 85 | .cache 86 | .parcel-cache 87 | 88 | # Next.js build output 89 | .next 90 | 91 | # Nuxt.js build / generate output 92 | .nuxt 93 | dist 94 | 95 | # Gatsby files 96 | .cache/ 97 | # Comment in the public line in if your project uses Gatsby and not Next.js 98 | # https://nextjs.org/blog/next-9-1#public-directory-support 99 | # public 100 | 101 | # vuepress build output 102 | .vuepress/dist 103 | 104 | # Serverless directories 105 | .serverless/ 106 | 107 | # FuseBox cache 108 | .fusebox/ 109 | 110 | # DynamoDB Local files 111 | .dynamodb/ 112 | 113 | # TernJS port file 114 | .tern-port 115 | 116 | # Stores VSCode versions used for testing VSCode extensions 117 | .vscode-test 118 | 119 | # End of https://www.toptal.com/developers/gitignore/api/node 120 | 121 | # Created by https://www.toptal.com/developers/gitignore/api/hugo 122 | # Edit at https://www.toptal.com/developers/gitignore?templates=hugo 123 | 124 | ### Hugo ### 125 | # Generated files by hugo 126 | /public/ 127 | 128 | # Executable may be added to repository 129 | hugo.exe 130 | hugo.darwin 131 | hugo.linux 132 | 133 | # End of https://www.toptal.com/developers/gitignore/api/hugo 134 | -------------------------------------------------------------------------------- /exampleSite/config/_default/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://example.com" 2 | languageCode = "en" 3 | title = "Monochrome" 4 | theme = "hugo-theme-monochrome" 5 | defaultContentLanguage = "en" 6 | enableEmoji = true 7 | enableGitInfo = true 8 | 9 | [pagination] 10 | pagerSize = 5 11 | 12 | [taxonomies] 13 | category = "categories" 14 | tag = "tags" 15 | series = "series" 16 | 17 | [outputs] 18 | home = ["HTML", "RSS", "JSON"] 19 | -------------------------------------------------------------------------------- /exampleSite/config/_default/languages.toml: -------------------------------------------------------------------------------- 1 | [en] 2 | contentDir = "content/en" 3 | languageName = "English" 4 | languageCode = "en" 5 | weight = 1 6 | 7 | [zh-tw] 8 | contentDir = "content/zh-tw" 9 | languageName = "正體中文" 10 | languageCode = "zh-tw" 11 | weight = 2 12 | -------------------------------------------------------------------------------- /exampleSite/config/_default/markup.toml: -------------------------------------------------------------------------------- 1 | [goldmark.renderer] 2 | unsafe= true 3 | 4 | [highlight] 5 | anchorLineNos = false 6 | codeFences = false 7 | guessSyntax = false 8 | hl_Lines = "" 9 | lineAnchors = "" 10 | lineNoStart = 1 11 | lineNos = false 12 | lineNumbersInTable = true 13 | noHl = false 14 | noClasses = true 15 | style = "monokai" 16 | tabWidth = 4 17 | -------------------------------------------------------------------------------- /exampleSite/config/_default/menus/menus.zh-tw.toml: -------------------------------------------------------------------------------- 1 | [[navbar]] 2 | identifier = "posts" 3 | name = "文章" 4 | url = "/zh-tw/posts/" 5 | weight = 1 6 | -------------------------------------------------------------------------------- /exampleSite/config/_default/params.toml: -------------------------------------------------------------------------------- 1 | navbar_title = 'Monochrome' 2 | footer = "Copyright © 2021-2024 by kaiiiz" 3 | author = "kaiiiz" 4 | color_scheme = "light" 5 | 6 | enable_zooming_js = true 7 | enable_header_anchor = true 8 | enable_toc = true 9 | enable_site_search = true 10 | enable_math = false 11 | 12 | # SEO 13 | enable_open_graph = true 14 | enable_twitter_cards = true 15 | 16 | # Collapsible Menu 17 | enable_collapsible_toc = false 18 | enable_collapsible_changelogs = true 19 | 20 | [list_layout] 21 | enable_group_by_year = true 22 | enable_show_date = true 23 | enable_pagination = false 24 | 25 | # syntax highlight settings 26 | [syntax_highlight] 27 | lib = "prism.js" # "builtin" | "prism.js" 28 | 29 | [syntax_highlight.builtin] 30 | enable_code_copy = true 31 | 32 | [syntax_highlight.prism] 33 | enable_code_copy = true 34 | enable_line_no = false 35 | -------------------------------------------------------------------------------- /exampleSite/content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | type: 'balloon' 3 | balloon_img_src: "icons/vase.svg" 4 | balloon_img_src_dark: "icons/vase_dark.svg" 5 | balloon_circle: false 6 | balloon_resources: "/about" 7 | description: "Demo site of hugo-theme-monochrome" 8 | zooming_js: false 9 | keywords: 10 | - hugo 11 | - hugo theme 12 | - hugo theme monochrome 13 | - clean 14 | - responsive 15 | - programmer-friendly 16 | --- 17 | 18 | {{< icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}} 19 | 20 | This is the demo of hugo-theme-monochrome. 21 | -------------------------------------------------------------------------------- /exampleSite/content/en/about/acknowledgement.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Acknowledgement' 3 | weight: 1000 4 | gallery_img_src: 'thanks.jpg' 5 | gallery_img_caption: 'Photo by Alexander Sinn on Unsplash' 6 | gallery_statistic: 7 | - key: '**key1**' 8 | value: '*value1*' 9 | - key: '**key2**' 10 | value: '*value2*' 11 | - key: '**key3**' 12 | value: '*value3*' 13 | --- 14 | 15 | * [PrismJS/prism](https://github.com/PrismJS/prism) MIT 16 | * [leeoniya/uFuzzy](https://github.com/leeoniya/uFuzzy) MIT 17 | * [mathjax/MathJax](https://github.com/mathjax/MathJax) Apache-2.0 18 | * [kingdido999/zooming](https://github.com/kingdido999/zooming) MIT 19 | * [feathericons/feather](https://github.com/feathericons/feather) MIT 20 | * [simple-icons/simple-icons](https://github.com/simple-icons/simple-icons) CC0-1.0 21 | -------------------------------------------------------------------------------- /exampleSite/content/en/about/features.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Features' 3 | weight: 1 4 | gallery_img_src: 'pottery.jpg' 5 | gallery_img_caption: 'Photo by Mercy on Unsplash' 6 | gallery_statistic: 7 | - key: '**key1**' 8 | value: '*value1*' 9 | - key: '**key2**' 10 | value: '*value2*' 11 | - key: '**key3**' 12 | value: '*value3*' 13 | --- 14 | 15 | 1. **Clean UI with small resources.** Monochrome has clean UI design with ~5KB gzipped bundled CSS. 16 | 2. **Self-Contained.** Monochrome doesn't require webpack, nodejs and other dependencies to setup or edit, just hugo. 17 | 3. **Responsive layout.** Adapt to different viewpoint, from desktop to mobile. 18 | 4. **Support light/dark mode.** Low-light UI. 19 | 5. **Multiple layouts built-in.** Monochrome now supports 6 different layouts. See [Demo](https://kaiiiz.github.io/hugo-theme-monochrome/layouts/). 20 | 6. **Nested navbar and Multilingual mode.** Make good use of hugo's well-designed structure. 21 | 7. **Syntax Highlighting (with copy feature).** Integrate both server-side solution (Chroma, hugo built-in) and client-side solution (Prism.js, for someone who need more languages supported). 22 | 8. **Site Search with real-time matches highlight.** Powered by uFuzzy. 23 | 9. **SEO-friendly.** Easily change your author, description, keywords, open graph, twitter card meatdata. 24 | 10. **Support mathematical notation.** Powered by MathJax. 25 | 11. **Useful shortcodes.** See [Document](https://kaiiiz.github.io/hugo-theme-monochrome/shortcodes/). 26 | -------------------------------------------------------------------------------- /exampleSite/content/en/about/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | headless: true 3 | --- 4 | -------------------------------------------------------------------------------- /exampleSite/content/en/about/support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Support' 3 | weight: 0 4 | --- 5 | 6 | If you find my work brings value to your life and would like to support its development, you can sponsor me in the following ways. 7 | 8 |

9 | Buy Me A Coffee 10 |

11 | -------------------------------------------------------------------------------- /exampleSite/content/en/about/timeline.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Timeline' 3 | weight: 2 4 | gallery_img_src: 'clock.jpg' 5 | gallery_img_caption: 'Photo by Ocean Ng on Unsplash' 6 | gallery_statistic: 7 | - key: '**key1**' 8 | value: '*value1*' 9 | - key: '**key2**' 10 | value: '*value2*' 11 | - key: '**key3**' 12 | value: '*value3*' 13 | --- 14 | 15 | * 2024/11/27 - v4.0.0 release 16 | * 2024/05/26 - v3.1.0 release 17 | * 2024/05/26 - v3.0.0 release 18 | * 2023/07/23 - v2.0.0 release 19 | * 2022/04/02 - v1.0.1 release 20 | * 2022/04/01 - v1.0.0 release 21 | * 2022/02/25 - v0.9.2 release 22 | * 2022/02/25 - v0.9.1 release 23 | * 2022/01/31 - v0.9.0 release 24 | * 2021/07/29 - v0.8.0 release 25 | * 2021/07/08 - v0.7.1 release 26 | * 2021/06/24 - v0.7.0 release 27 | * 2021/04/15 - v0.6.2 release 28 | * 2021/02/17 - v0.6.1 release 29 | * 2021/02/16 - v0.6.0 release 30 | * 2021/02/15 - v0.5.0 release 31 | * 2021/02/12 - v0.4.0 release 32 | * 2021/02/10 - v0.3.0 release 33 | * 2021/02/09 - v0.2.0 release 34 | * 2021/02/08 - v0.1.0 release 35 | -------------------------------------------------------------------------------- /exampleSite/content/en/configuration/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Configuration' 3 | type: 'bookcase' 4 | --- 5 | 6 | These documents show some customizable values that are used in this theme. By adjusting these values, you can easily change the behavior of your website without touching the source code. 7 | 8 | You can refer to the example config in [github](https://github.com/kaiiiz/hugo-theme-monochrome/tree/main/exampleSite/config). 9 | -------------------------------------------------------------------------------- /exampleSite/content/en/configuration/site.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Site Settings' 3 | weight: 1 4 | bookcase_cover_src: 'cover/catalogue.png' 5 | bookcase_cover_src_dark: 'cover/catalogue_dark.png' 6 | --- 7 | 8 | # Site Configuration 9 | 10 | These settings are important for building a website using hugo. See [All Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings) for more details. 11 | 12 | ## Site title 13 | 14 | Site title. This value will become the content of `` tag in html. 15 | 16 | ```toml 17 | title = "Monochrome" 18 | ``` 19 | 20 | ## Theme 21 | 22 | Set this value to the corresponding folder name of your theme. (located by default in `/themes/THEMENAME/`) 23 | 24 | ```toml 25 | theme = "hugo-theme-monochrome" 26 | ``` 27 | 28 | ## Base URL 29 | 30 | Hostname (and path) to the root. 31 | 32 | ```toml 33 | baseURL = "https://kaiiiz.github.io/hugo-theme-monochrome" 34 | ``` 35 | 36 | ## favicon 37 | 38 | Add `favicon.ico` to your site's static folder. 39 | 40 | ## External library 41 | 42 | ### Disqus 43 | 44 | ```toml 45 | services: 46 | disqus: 47 | shortname: "xxx" 48 | ``` 49 | 50 | Other settings checkout [Disqus - Internal Templates](https://gohugo.io/templates/internal/#disqus) for more details. 51 | 52 | ### Google Analytics 53 | 54 | ```toml 55 | services: 56 | googleAnalytics: 57 | id: "xxx" 58 | ``` 59 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Layouts' 3 | type: 'bookcase' 4 | --- 5 | 6 | Monochrome has multiple layouts built in. You can change the layout of section or regular page according to your needs. 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/balloon/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Balloon Layout' 3 | bookcase_cover_src: 'cover/balloon.png' 4 | bookcase_cover_src_dark: 'cover/balloon_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | Balloon layout is useful for demonstrating information step-by-step. 9 | 10 | > This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`). 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/balloon/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Balloon Layout Demo' 3 | bookcase_cover_src: 'cover/balloon.png' 4 | bookcase_cover_src_dark: 'cover/balloon_dark.png' 5 | type: 'balloon' 6 | balloon_img_src: "icons/balloon.svg" 7 | balloon_img_src_dark: "icons/balloon_dark.svg" 8 | balloon_circle: false 9 | balloon_resources: "/about" 10 | weight: 10 11 | --- 12 | 13 | Balloon layout is useful for demonstrating information step-by-step. 14 | 15 | [Go to single page demo](/hugo-theme-monochrome/layouts/balloon/demo/single) 16 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/balloon/demo/single.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'balloon layout single demo' 3 | type: 'balloon' 4 | balloon_img_src: "icons/balloon.svg" 5 | balloon_img_src_dark: "icons/balloon_dark.svg" 6 | balloon_circle: false 7 | balloon_resources: "/about" 8 | --- 9 | 10 | Balloon layout can also be used in regular page. 11 | 12 | [Go to list demo](/hugo-theme-monochrome/layouts/balloon/demo) 13 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/balloon/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Balloon Layout Document' 3 | bookcase_cover_src: 'cover/balloon.png' 4 | bookcase_cover_src_dark: 'cover/balloon_dark.png' 5 | date: 2022-03-29 6 | --- 7 | 8 | # Balloon Layout Document 9 | 10 | Balloon is useful for demonstrating information step-by-step. 11 | 12 | > This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`). 13 | 14 | ## Configuration 15 | 16 | ```yaml 17 | --- 18 | type: 'balloon' 19 | --- 20 | ``` 21 | 22 | > Specify `type` in front-matter will change the template lookup order. 23 | 24 | ### balloon_resources 25 | 26 | Content resources. URL can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path) 27 | 28 | > Hugo will handle multilingual scenario out of the box 29 | 30 | For example: 31 | 32 | ``` 33 | https://kaiiiz.github.io/hugo-theme-monochrome/about 34 | \____________________________________/\____/ 35 | base URL balloon_resources 36 | ``` 37 | 38 | ```yaml 39 | --- 40 | balloon_resources: "/about" 41 | --- 42 | ``` 43 | 44 | > default: error will occur in page 45 | 46 | ### balloon_img_src 47 | 48 | Balloon head image URL. URL must be relative to the base URL. (without `/` prefix) 49 | 50 | For example: 51 | 52 | ``` 53 | https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg 54 | \_____________________________________/\________/ 55 | base URL balloon_img_src 56 | ``` 57 | 58 | ```yaml 59 | --- 60 | balloon_img_src: 'thanks.jpg' 61 | --- 62 | ``` 63 | 64 | > default: fallback to balloon_img_src_dark, if failed, image become dot 65 | 66 | ### balloon_img_src_dark 67 | 68 | Balloon head image URL for dark mode. URL must be relative to the base URL. (without `/` prefix) 69 | 70 | For example: 71 | 72 | ``` 73 | https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg 74 | \_____________________________________/\________/ 75 | base URL balloon_img_src 76 | ``` 77 | 78 | ```yaml 79 | --- 80 | balloon_img_src_dark: 'thanks.jpg' 81 | --- 82 | ``` 83 | 84 | > default: fallback to balloon_img_src, if failed, image become dot 85 | 86 | ### balloon_circle 87 | 88 | balloon head shape can be square or circle. 89 | 90 | ```yaml 91 | --- 92 | balloon_circle: true 93 | --- 94 | ``` 95 | 96 | > default: true 97 | 98 | ## Resouces Configuration 99 | 100 | These settings are under the resource specified in `balloon_resources`. 101 | 102 | ### title 103 | 104 | Title of content card. 105 | 106 | ```yaml 107 | --- 108 | title: 'Story before hugo' 109 | --- 110 | ``` 111 | 112 | > default: no title 113 | 114 | ### weight 115 | 116 | ```yaml 117 | --- 118 | weight: 3 119 | --- 120 | ``` 121 | 122 | > default: [default order](https://gohugo.io/templates/lists/#order-content) 123 | 124 | ## Headless Bundle 125 | 126 | Hugo supports an amazing feature called **Headless Bundle**, which elegantly resolved the resouces publish issue. 127 | 128 | For example, if you don't want to publish the resouces of the balloon layout, you can create a leaf bundle and specified `headless = true` in `index.md`'s front-matter. These resources will only be used during rendering process. In other word, no file will be generated to `/public` folder. 129 | 130 | Checkout [Headless Bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) for more details. 131 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Blank Layout' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | Sometimes, it's useful to fully control your section page, so I create a layout with only render the `_index.md` content and called this Blank Layout. 9 | 10 | > This layout can only be used on section page (`_index.md`). 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Blank Layout Demo' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | type: 'blank' 6 | weight: 40 7 | --- 8 | 9 | ``` 10 | . 11 | ├── _index.md <- you're here! 12 | ├── post1.md 13 | ├── post2.md 14 | └── post3.md 15 | ``` 16 | 17 | Fully customized section page. 18 | 19 | * [post1](./post1) 20 | * [post2](./post2) 21 | * [post3](./post3) 22 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/demo/post1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post1' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/demo/post2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post2' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/demo/post3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post3' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/blank/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Blank Layout Document' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | weight: 40 6 | changelogs: 7 | --- 8 | 9 | Blank layout render only the content of `_index.md`, it's useful for fully customizing your list layout. 10 | 11 | > This layout can only be used on section page (`_index.md`). 12 | 13 | ## Configuration 14 | 15 | ```yaml 16 | --- 17 | type: 'blank' 18 | --- 19 | ``` 20 | 21 | > Specify `type` in front-matter will change the template lookup order. 22 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Bookcase Layout' 3 | bookcase_cover_src: 'cover/bookcase.png' 4 | bookcase_cover_src_dark: 'cover/bookcase_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | Bookcase layout is useful for creating another viewpoint of list contents. 9 | 10 | > This layout can only be used on section page (`_index.md`). 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Bookcase Layout Demo' 3 | type: 'bookcase' 4 | bookcase_cover_src: 'cover/bookcase.png' 5 | bookcase_cover_src_dark: 'cover/bookcase_dark.png' 6 | weight: 20 7 | --- 8 | 9 | Bookcase layout is useful for creating another viewpoint of list contents. 10 | 11 | ``` 12 | . 13 | ├── balloon 14 | │ └── _index.md 15 | ├── regular-page.md 16 | ├── _index.md <- you are here 17 | └── normal 18 | └── _index.md 19 | ``` 20 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/balloon/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'balloon' 3 | bookcase_cover_src: 'cover/balloon.png' 4 | bookcase_cover_src_dark: 'cover/balloon_dark.png' 5 | type: 'balloon' 6 | balloon_img_src: "icons/balloon.svg" 7 | balloon_img_src_dark: "icons/balloon_dark.svg" 8 | balloon_circle: false 9 | balloon_resources: "/about" 10 | weight: 1 11 | --- 12 | 13 | balloon layout in bookcase. 14 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/list/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'List' 3 | bookcase_cover_src: 'cover/list.png' 4 | bookcase_cover_src_dark: 'cover/list_dark.png' 5 | --- 6 | 7 | List section in bookcase layout. 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/list/post1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post1' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/list/post2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post2' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/list/post3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post3' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/demo/regular-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Regular Page' 3 | bookcase_cover_src: 'cover/catalogue.png' 4 | bookcase_cover_src_dark: 'cover/catalogue_dark.png' 5 | --- 6 | 7 | This is a regular page in bookcase. 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/bookcase/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Bookcase Layout Document' 3 | bookcase_cover_src: 'cover/bookcase.png' 4 | bookcase_cover_src_dark: 'cover/bookcase_dark.png' 5 | weight: 20 6 | --- 7 | 8 | Bookcase layout is useful for creating another viewpoint of list contents. 9 | 10 | > This layout can only be used on section page (`_index.md`). 11 | 12 | ## Configuration 13 | 14 | ```yaml 15 | --- 16 | type: 'bookcase' 17 | --- 18 | ``` 19 | 20 | > Specify `type` in front-matter will change the template lookup order. 21 | 22 | ### bookcase_list_sections 23 | 24 | List subsections. 25 | 26 | ```yaml 27 | --- 28 | bookcase_list_sections: true 29 | --- 30 | ``` 31 | 32 | > default: true 33 | 34 | ### bookcase_list_pages 35 | 36 | List pages. 37 | 38 | ```yaml 39 | --- 40 | bookcase_list_pages: true 41 | --- 42 | ``` 43 | 44 | > default: true 45 | 46 | ## Resouces Configuration 47 | 48 | These parameters are located in bookcase item's resource. For example: 49 | 50 | ``` 51 | . 52 | ├── books.md <- config is located in here! 53 | ├── category 54 | │ └── _index.md <- and here! 55 | └── _index.md <- your bookcase layout 56 | ``` 57 | 58 | ### bookcase_cover_src 59 | 60 | The cover image URL relative to the base URL. (with or without `/` prefix) 61 | 62 | > Image ratio is 2:3 (width:height) 63 | 64 | For example: 65 | 66 | ``` 67 | https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg 68 | \_____________________________________/\________/ 69 | base URL bookcase_cover_src 70 | ``` 71 | 72 | ```yaml 73 | --- 74 | bookcase_cover_src: 'thanks.jpg' 75 | --- 76 | ``` 77 | 78 | > default: fallback to bookcase_cover_src_dark, if failed, image become empty 79 | 80 | ### bookcase_cover_src_dark 81 | 82 | The dark mode cover image URL relative to the base URL. (with or without `/` prefix) 83 | 84 | > Image ratio is 2:3 (width:height) 85 | 86 | For example: 87 | 88 | ``` 89 | https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg 90 | \_____________________________________/\________/ 91 | base URL bookcase_cover_src 92 | ``` 93 | 94 | ```yaml 95 | --- 96 | bookcase_cover_src_dark: 'thanks.jpg' 97 | --- 98 | ``` 99 | 100 | > default: fallback to bookcase_cover_src, if failed, image become empty 101 | 102 | ### bookcase_cover_title 103 | 104 | The title used in the bookcase cover 105 | 106 | > default: fallback to the title of the page 107 | 108 | ### bookcase_hidden 109 | 110 | Hide this item from bookcase 111 | 112 | > default: false 113 | 114 | ### weight 115 | 116 | ```yaml 117 | --- 118 | weight: 3 119 | --- 120 | ``` 121 | 122 | > default: [default order](https://gohugo.io/templates/lists/#order-content) 123 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/gallery/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Gallery Layout' 3 | bookcase_cover_src: 'cover/picture.png' 4 | bookcase_cover_src_dark: 'cover/picture_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | Gallery layout is useful for demonstrating pictures and its statistical data. 9 | 10 | > This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`). 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/gallery/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Gallery Layout Demo' 3 | type: 'gallery' 4 | gallery_resources: "about" 5 | bookcase_cover_src: 'cover/picture.png' 6 | bookcase_cover_src_dark: 'cover/picture_dark.png' 7 | weight: 30 8 | --- 9 | 10 | Gallery layout is useful for demonstrating pictures and its statistical data. 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/gallery/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Gallery Layout Document' 3 | bookcase_cover_src: 'cover/picture.png' 4 | bookcase_cover_src_dark: 'cover/picture_dark.png' 5 | weight: 30 6 | --- 7 | 8 | # Gallery Layout Document 9 | 10 | Gallery layout is useful for demonstrating pictures and its statistical data. 11 | 12 | > This layout can be used on both section page and regular post. 13 | 14 | ## Configuration 15 | 16 | ```yaml 17 | --- 18 | type: 'gallery' 19 | --- 20 | ``` 21 | 22 | > Specify `type` in front-matter will change the template lookup order. 23 | 24 | ### gallery_resources 25 | 26 | Content resources. URL can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path) 27 | 28 | > Hugo will handle multilingual scenario out of the box 29 | 30 | For example: 31 | 32 | ``` 33 | https://kaiiiz.github.io/hugo-theme-monochrome/about 34 | \____________________________________/\____/ 35 | base URL gallery_resources 36 | ``` 37 | 38 | ```yaml 39 | --- 40 | gallery_resources: '/about' 41 | --- 42 | ``` 43 | 44 | > default: error will occur in page 45 | 46 | 47 | ## Resouces Configuration 48 | 49 | These settings are under the resource specified in `gallery_resources`. 50 | 51 | ### title 52 | 53 | Title of image. 54 | 55 | ```yaml 56 | --- 57 | title: 'Gallery' 58 | --- 59 | ``` 60 | 61 | > default: no title 62 | 63 | ### gallery_title_link 64 | 65 | Link of the title. 66 | 67 | ```yaml 68 | --- 69 | gallery_title_link: 'https://github.com/kaiiiz' 70 | --- 71 | ``` 72 | 73 | > default: no title link 74 | 75 | ### gallery_img_src 76 | 77 | Image URL relative to the base URL. (with or without `/` prefix) 78 | 79 | For example: 80 | 81 | ``` 82 | https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg 83 | \_____________________________________/\________/ 84 | base URL gallery_img_src 85 | ``` 86 | 87 | ```yaml 88 | --- 89 | gallery_img_src: 'thanks.jpg' 90 | --- 91 | ``` 92 | 93 | > default: no image 94 | 95 | ### gallery_img_link 96 | 97 | Link of the image. 98 | 99 | ```yaml 100 | --- 101 | gallery_img_link: 'https://github.com/kaiiiz' 102 | --- 103 | ``` 104 | 105 | > default: no image link 106 | 107 | ### gallery_img_caption 108 | 109 | Caption of the image. HTML is available. 110 | 111 | ```yaml 112 | --- 113 | gallery_img_caption: '<span>Photo by <a href="https://unsplash.com/@swimstaralex?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Alexander Sinn</a> on <a href="https://unsplash.com/s/photos/thanks?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span>' 114 | --- 115 | ``` 116 | 117 | > default: no figure caption under image 118 | 119 | ### gallery_statistic 120 | 121 | Statistic of the image. The format is: 122 | 123 | ```yaml 124 | --- 125 | - key: key1 126 | value: value1 127 | - key: key2 128 | value: value2 129 | --- 130 | ``` 131 | 132 | key and value both support markdown syntax. 133 | 134 | > default: no figure caption under image 135 | 136 | ### weight 137 | 138 | ```yaml 139 | --- 140 | weight: 3 141 | --- 142 | ``` 143 | 144 | > default: [default order](https://gohugo.io/templates/lists/#order-content) 145 | 146 | ## Headless Bundle 147 | 148 | Hugo supports an amazing feature called **Headless Bundle**, which elegantly resolved the resouces publish issue. 149 | 150 | For example, if you don't want to publish the resouces of the gallery layout, you can create a leaf bundle and specified `headless = true` in `index.md`'s front-matter. These resources will only be used during rendering process. In other word, no file will be generated to `/public` folder. 151 | 152 | Checkout [Headless Bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) for more details. 153 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'List Layout' 3 | bookcase_cover_src: 'cover/list.png' 4 | bookcase_cover_src_dark: 'cover/list_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | List layout is the built-in section layout. Monochrome add options to adjust its behavior. 9 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'List Layout Demo' 3 | bookcase_cover_src: 'cover/list.png' 4 | bookcase_cover_src_dark: 'cover/list_dark.png' 5 | weight: 40 6 | --- 7 | 8 | ``` 9 | . 10 | ├── _index.md <- you're here! 11 | ├── post1.md 12 | ├── post2.md 13 | └── post3.md 14 | ``` 15 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/demo/post1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post1' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/demo/post2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post2' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/demo/post3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post3' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/list/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'List Layout Document' 3 | bookcase_cover_src: 'cover/list.png' 4 | bookcase_cover_src_dark: 'cover/list_dark.png' 5 | weight: 40 6 | changelogs: 7 | --- 8 | 9 | List layout is the built-in section layout. Monochrome add options to adjust its behavior. 10 | 11 | ## Configuration 12 | 13 | ### Group by year 14 | 15 | An option to control group setting. 16 | 17 | ```yaml 18 | group_by_year: false 19 | ``` 20 | 21 | > default: theme's [`list_layout.enable_group_by_year`](/hugo-theme-monochrome/configuration/theme/#list-layout) 22 | 23 | ### Show date 24 | 25 | Show / Hide date right after the post entry. 26 | 27 | ```yaml 28 | show_date: false 29 | ``` 30 | 31 | > default: theme's [`list_layout.enable_show_date`](/hugo-theme-monochrome/configuration/theme/#list-layout) 32 | 33 | ### Pagination 34 | 35 | ```yaml 36 | pagination: false 37 | ``` 38 | 39 | > default: theme's [`list_layout.enable_pagination`](/hugo-theme-monochrome/configuration/theme/#list-layout) 40 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Postcard Layout' 3 | bookcase_cover_src: 'cover/catalogue.png' 4 | bookcase_cover_src_dark: 'cover/catalogue_dark.png' 5 | type: "bookcase" 6 | --- 7 | 8 | Postcard layout shows summary of regular posts, it’s useful for creating home page. Postcard layout paginates page according to your `paginate` config setting. 9 | 10 | > This layout can only be used on section page. (`_index.md`) 11 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Postcard Layout Demo' 3 | bookcase_cover_src: 'cover/catalogue.png' 4 | bookcase_cover_src_dark: 'cover/catalogue_dark.png' 5 | type: 'postcard' 6 | weight: 40 7 | --- 8 | 9 | ``` 10 | . 11 | ├── _index.md <- you're here! 12 | ├── post1.md 13 | ├── post2.md 14 | ├── post3.md 15 | ├── post4.md 16 | ├── post5.md 17 | └── post6.md 18 | ``` 19 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post1' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post2' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post3' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post4.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post4' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post5.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post5' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/demo/post6.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'post6' 3 | date: 2021-02-06 4 | search_hidden: true 5 | --- 6 | 7 | Hello world! 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/layouts/postcard/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Postcard Layout Document' 3 | bookcase_cover_src: 'cover/catalogue.png' 4 | bookcase_cover_src_dark: 'cover/catalogue_dark.png' 5 | weight: 40 6 | changelogs: 7 | --- 8 | 9 | Postcard layout show summary of regular posts, it's useful for creating home page. 10 | 11 | > This layout can only be used on list layout. 12 | 13 | ## Configuration 14 | 15 | ```yaml 16 | --- 17 | type: 'postcard' 18 | --- 19 | ``` 20 | 21 | > Specify `type` in front-matter will change the template lookup order. 22 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | aliases = ["posts", "articles", "blog", "showcase", "docs"] 3 | title = "Posts" 4 | author = "Hugo Authors" 5 | tags = ["index"] 6 | type = "postcard" 7 | +++ 8 | 9 | Some posts from [hugoBasicExample](https://github.com/gohugoio/hugoBasicExample). 10 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Emoji Support" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | tags = [ 7 | "emoji", 8 | ] 9 | +++ 10 | 11 | Emoji can be enabled in a Hugo project in a number of ways. 12 | <!--more--> 13 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 14 | 15 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 16 | 17 | <p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p> 18 | 19 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 20 | 21 | *** 22 | 23 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 24 | 25 | {{< highlight html >}} 26 | .emoji { 27 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 28 | } 29 | {{< /highlight >}} 30 | 31 | {{< css.inline >}} 32 | <style> 33 | .emojify { 34 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 35 | font-size: 2rem; 36 | vertical-align: middle; 37 | } 38 | @media screen and (max-width:650px) { 39 | .nowrap { 40 | display: block; 41 | margin: 25px 0; 42 | } 43 | } 44 | </style> 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: Math Typesetting 4 | date: 2019-03-08 5 | description: A brief guide to setup KaTeX 6 | math: true 7 | --- 8 | 9 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 10 | <!--more--> 11 | 12 | In this example we will be using [KaTeX](https://katex.org/) 13 | 14 | - Create a partial under `/layouts/partials/math.html` 15 | - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. 16 | - Include the partial in your templates like so: 17 | 18 | ```bash 19 | {{ if or .Params.math .Site.Params.math }} 20 | {{ partial "math.html" . }} 21 | {{ end }} 22 | ``` 23 | 24 | - To enable KaTex globally set the parameter `math` to `true` in a project's configuration 25 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 26 | 27 | **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) 28 | 29 | {{< math.inline >}} 30 | {{ if or .Page.Params.math .Site.Params.math }} 31 | <!-- KaTeX --> 32 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous"> 33 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script> 34 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> 35 | {{ end }} 36 | {{</ math.inline >}} 37 | 38 | ### Examples 39 | 40 | Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$ 41 | 42 | Block math: 43 | $$ 44 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 45 | $$ 46 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Placeholder Text" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | tags = [ 7 | "markdown", 8 | "text", 9 | ] 10 | +++ 11 | 12 | Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 13 | 14 | 1. Exierant elisi ambit vivere dedere 15 | 2. Duce pollice 16 | 3. Eris modo 17 | 4. Spargitque ferrea quos palude 18 | 19 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 20 | 21 | 1. Comas hunc haec pietate fetum procerum dixit 22 | 2. Post torum vates letum Tiresia 23 | 3. Flumen querellas 24 | 4. Arcanaque montibus omnes 25 | 5. Quidem et 26 | 27 | # Vagus elidunt 28 | 29 | <svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg> 30 | 31 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 32 | 33 | ## Mane refeci capiebant unda mulcebat 34 | 35 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 36 | 37 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 38 | 39 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 40 | 41 | {{< css.inline >}} 42 | <style> 43 | .canon { background: white; width: 100%; height: auto; } 44 | </style> 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Rich Content" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | tags = [ 7 | "shortcodes", 8 | "privacy", 9 | ] 10 | +++ 11 | 12 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 13 | <!--more--> 14 | --- 15 | 16 | ## YouTube Privacy Enhanced Shortcode 17 | 18 | {{< youtube ZJthWmvUzzc >}} 19 | 20 | --- 21 | 22 | ## Twitter Simple Shortcode 23 | 24 | {{< twitter_simple user="designreviewed" id="1085870671291310081" >}} 25 | 26 | --- 27 | 28 | ## Vimeo Simple Shortcode 29 | 30 | {{< vimeo_simple 48912912 >}} 31 | -------------------------------------------------------------------------------- /exampleSite/content/en/setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Setup' 3 | --- 4 | 5 | This document shows a brief guide to setup hugo-theme-monochrome in your hugo project. 6 | 7 | ## Quick Start 8 | 9 | ### Install Hugo 10 | 11 | You need "extended" version of hugo to support SASS. Checkout [Install Hugo](https://gohugo.io/getting-started/installing/) for more details. 12 | 13 | Take Linux for example: 14 | 15 | ```bash 16 | snap install hugo --channel=extended 17 | ``` 18 | 19 | > The minimum hugo version that hugo-theme-monochrome required is `0.128.0` 20 | 21 | ### Create a New Site 22 | 23 | ```bash 24 | hugo new site <project name> 25 | ``` 26 | 27 | ### Add a Theme 28 | 29 | ```bash 30 | cd <project name> 31 | git init 32 | git submodule add https://github.com/kaiiiz/hugo-theme-monochrome.git themes/hugo-theme-monochrome 33 | ``` 34 | 35 | Then add `theme = "hugo-theme-monochrome"` to your `config.toml` 36 | 37 | ### Customize the Theme 38 | 39 | See [Configuration](/hugo-theme-monochrome/configuration/). 40 | 41 | ### Start the Hugo server 42 | 43 | ```bash 44 | hugo server 45 | ``` 46 | 47 | Minify CSS and JS resources. The minifier of JavaScript here is powered by [ESBuild](https://github.com/evanw/esbuild). 48 | 49 | ```bash 50 | hugo server --environment production 51 | ``` 52 | 53 | ### Build static pages 54 | 55 | Generate files to `/public` folder, `--minify` option can minify other resouces (e.g. HTML/XML/JSON...). 56 | 57 | See [Configure Minify](https://gohugo.io/getting-started/configuration/#configure-minify) to adjust the behavior of hugo minifier (powered by [minify](https://github.com/tdewolff/minify)). 58 | 59 | ```bash 60 | hugo --environment production --minify 61 | ``` 62 | 63 | ### Deployment 64 | 65 | Push `/public` folder to your server. 66 | 67 | > For reference, this site is built by using Github Action and Github Pages. The CI script is available [here](https://github.com/kaiiiz/hugo-theme-monochrome/blob/main/.github/workflows/gh-pages.yml). 68 | 69 | #### Deployment on github 70 | 71 | If you want to deploy your own site on github and you would like it to be built using Github Action and Github Pages you can follow [these instructions](https://gohugo.io/hosting-and-deployment/hosting-on-github/#build-hugo-with-github-action) on the HUGO website with the only change being to uncomment the following line in Setup Hugo: 72 | 73 | ``` 74 | # extended: true 75 | ``` 76 | 77 | This is needed since Monochrome uses SCSS. 78 | 79 | Otherwise the Github Action will fail with the following message: 80 | 81 | ``` 82 | Run hugo --minify 83 | Start building sites … 84 | hugo v0.96.0-2fd4a7d3d6845e75f8b8ae3a2a7bd91438967bbb linux/amd64 BuildDate=2022-03-26T09:15:58Z VendorInfo=gohugoio 85 | Error: Error building site: TOCSS: failed to transform "scss/core.scss" (text/x-scss). Check your Hugo installation; you need the extended version to build SCSS/SASS.: this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information 86 | Total in 156 ms 87 | Error: Process completed with exit code 255. 88 | ``` 89 | 90 | ## Run exampleSite 91 | 92 | ```bash 93 | git clone https://github.com/kaiiiz/hugo-theme-monochrome 94 | cd hugo-theme-monochrome/exampleSite 95 | hugo --themesDir=../.. server 96 | ``` 97 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Shortcodes' 3 | group_by_year: false 4 | show_date: false 5 | --- 6 | 7 | See [Shortcodes](https://gohugo.io/content-management/shortcodes/) for more details. 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/bookcase.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Bookcase' 3 | --- 4 | 5 | # Bookcase 6 | 7 | Render bookcase layout 8 | 9 | ## Usage 10 | 11 | ``` 12 | {{</* bookcase section="" /*/>}} 13 | ``` 14 | 15 | `section`: Content resources. Must be a section. Path can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path) 16 | 17 | > Hugo will handle multilingual scenario out of the box 18 | 19 | For example: 20 | 21 | ``` 22 | https://kaiiiz.github.io/hugo-theme-monochrome/configuration 23 | \____________________________________/\____________/ 24 | base URL section path 25 | ``` 26 | 27 | 28 | 29 | ## Examples 30 | 31 | ```html 32 | {{</* bookcase section="/configuration" */>}} 33 | ``` 34 | 35 | {{< bookcase section="/configuration" >}} 36 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/breadcrumbs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Breadcrumbs' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # Breadcrumbs 8 | 9 | Render breadcrumbs navigation 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* breadcrumbs /*/>}} 15 | ``` 16 | 17 | ## Examples 18 | 19 | ```html 20 | {{</* breadcrumbs */>}} 21 | ``` 22 | 23 | {{< breadcrumbs >}} 24 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/codepen.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'CodePen' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # CodePen 8 | 9 | Embeded codepen to page. 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* codepen id="" */>}} 15 | ``` 16 | 17 | Paramters: 18 | 19 | * `id`: codepen id 20 | 21 | ## Examples 22 | 23 | ```html 24 | {{</* codepen id="Vwmpjba" */>}} 25 | ``` 26 | 27 | {{< codepen id="Vwmpjba" >}} 28 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/color-block.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Color Block' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # Color Block 8 | 9 | A block with color 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* color-block style="" */>}} 15 | 16 | {{</* /color-block */>}} 17 | ``` 18 | 19 | Paramters: 20 | 21 | * `style`: block style 22 | * success 23 | * info 24 | * warning 25 | * error 26 | 27 | ## Examples 28 | 29 | ```html 30 | {{</* color-block */>}} 31 | hello world 32 | {{</* /color-block */>}} 33 | ``` 34 | 35 | {{< color-block >}} 36 | hello world 37 | {{< /color-block >}} 38 | 39 | 40 | ```html 41 | {{</* color-block style="success" */>}} 42 | hello world 43 | {{</* /color-block */>}} 44 | ``` 45 | 46 | {{< color-block style="success" >}} 47 | hello world 48 | {{< /color-block >}} 49 | 50 | 51 | ```html 52 | {{</* color-block style="info" */>}} 53 | hello world 54 | {{</* /color-block */>}} 55 | ``` 56 | 57 | {{< color-block style="info" >}} 58 | hello world 59 | {{< /color-block >}} 60 | 61 | ```html 62 | {{</* color-block style="warning" */>}} 63 | hello world 64 | {{</* /color-block */>}} 65 | ``` 66 | 67 | {{< color-block style="warning" >}} 68 | hello world 69 | {{< /color-block >}} 70 | 71 | ```html 72 | {{</* color-block style="error" */>}} 73 | hello world 74 | {{</* /color-block */>}} 75 | ``` 76 | 77 | {{< color-block style="error" >}} 78 | hello world 79 | {{< /color-block >}} 80 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/emgithub.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Embed github' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # Embed github 8 | 9 | Directly embed github source code like gist with Prism.js syntax highlight. 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* emgithub target="" lang="" hl="" tab_size="" /*/>}} 15 | ``` 16 | 17 | Paramters: 18 | 19 | * `target` (required): A valid github file url, for example: 20 | * https://github.com/torvalds/linux/blob/v5.4/README 21 | * https://github.com/torvalds/linux/blob/v5.4/README#L1 22 | * https://github.com/torvalds/linux/blob/v5.4/README#L1-L7 23 | * `lang` (optional): Which language should use for syntax highlighting? `text` will be applied by default. 24 | * `hl` (optional): Line highlight settings. For details, please refer [Prism.js Line Highlight Plugin](https://prismjs.com/plugins/line-highlight/) 25 | * `tab_size` (optional): Default setting is 4 characters. 26 | 27 | ## Examples 28 | 29 | ```html 30 | {{</* emgithub target="https://github.com/torvalds/linux/blob/v5.4/README" /*/>}} 31 | ``` 32 | 33 | {{< emgithub target="https://github.com/torvalds/linux/blob/v5.4/README" >}} 34 | 35 | ```html 36 | {{</* emgithub target="https://github.com/torvalds/linux/blob/v5.4/arch/arm64/kernel/stacktrace.c#L171-L199" lang=c tab_size=8 hl="172-173,192" /*/>}} 37 | ``` 38 | 39 | {{< emgithub target="https://github.com/torvalds/linux/blob/v5.4/arch/arm64/kernel/stacktrace.c#L171-L199" lang=c tab_size=8 hl="171-172,192" >}} 40 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/icon-group.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Icon Group' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # Icon Group 8 | 9 | Wrap icons with grid layout 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* icon-group */>}} 15 | 16 | {{</* /icon-group */>}} 17 | ``` 18 | 19 | ## Examples 20 | 21 | ```html 22 | {{</* icon-group */>}} 23 | {{</* icon vendor="feather" name="github" */>}} 24 | {{</* icon vendor="feather" name="rss" */>}} 25 | {{</* icon vendor="feather" name="twitter" */>}} 26 | {{</* /icon-group */>}} 27 | ``` 28 | 29 | {{< icon-group >}} 30 | {{< icon vendor="feather" name="github" >}} 31 | {{< icon vendor="feather" name="rss" >}} 32 | {{< icon vendor="feather" name="twitter" >}} 33 | {{< /icon-group >}} 34 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/icon.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Icon" 3 | bookcase_cover_src: "cover/coding.png" 4 | bookcase_cover_src_dark: "cover/coding_dark.png" 5 | --- 6 | 7 | # Icon 8 | 9 | Monochrome built-in icons. 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* icon vendor="" name="" link="" */>}} 15 | ``` 16 | 17 | Paramters: 18 | 19 | - `vendor`: Icon vendor (Supported value: `feather`, `simple`) 20 | - `link`: Render link for icon 21 | - `name`: Icon name 22 | 23 | ## Available Icons 24 | 25 | Icons from [Feather icons](https://feathericons.com/) 26 | 27 | | name | svg | 28 | | -------- | ------------------------------------ | 29 | | globe | {{< icon vendor="feather" name="globe" >}} | 30 | | moon | {{< icon vendor="feather" name="moon" >}} | 31 | | sun | {{< icon vendor="feather" name="sun" >}} | 32 | | github | {{< icon vendor="feather" name="github" >}} | 33 | | facebook | {{< icon vendor="feather" name="facebook" >}} | 34 | | rss | {{< icon vendor="feather" name="rss" >}} | 35 | | twitter | {{< icon vendor="feather" name="twitter" >}} | 36 | | mail | {{< icon vendor="feather" name="mail" >}} | 37 | 38 | Icons from [Simple icons](https://simpleicons.org/) 39 | 40 | | name | svg | 41 | | -------- | ------------------------------------ | 42 | | dotenv | {{< icon vendor="simple" name="dotenv" >}} | 43 | | dotnet | {{< icon vendor="simple" name="dotnet" >}} | 44 | | e | {{< icon vendor="simple" name="e" >}} | 45 | | 1001tracklists | {{< icon vendor="simple" name="1001tracklists" >}} | 46 | 47 | ## Examples 48 | 49 | ```html 50 | {{</* icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" */>}} 51 | ``` 52 | 53 | {{< icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}} 54 | 55 | ```html 56 | {{</* icon vendor="simple" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" */>}} 57 | ``` 58 | 59 | {{< icon vendor="simple" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}} 60 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/jsfiddle.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'JSFiddle' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # JSFiddle 8 | 9 | Embeded jsfiddle to page. 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* jsfiddle id="" */>}} 15 | ``` 16 | 17 | Paramters: 18 | 19 | * `id`: jsfiddle id 20 | 21 | ## Examples 22 | 23 | ```html 24 | {{</* jsfiddle id="5byh90rz" */>}} 25 | ``` 26 | 27 | {{< jsfiddle id="5byh90rz" >}} 28 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/recent-posts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Recent Posts' 3 | --- 4 | 5 | # Recent Posts 6 | 7 | Render recent posts list 8 | 9 | ## Usage 10 | 11 | ``` 12 | {{</* recent-posts sortby="" limit="" */>}} 13 | ``` 14 | 15 | Paramters: 16 | 17 | * `sortby`: `publishDate` or `lastMod` 18 | * `limit`: positive integer, `0` means unlimited 19 | 20 | ## Examples 21 | 22 | ```html 23 | {{</* recent-posts sortby="lastMod" limit=5 */>}} 24 | ``` 25 | 26 | {{< recent-posts sortby="lastMod" limit=5 >}} 27 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/terms-cloud.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Terms Cloud' 3 | bookcase_cover_src: 'cover/coding.png' 4 | bookcase_cover_src_dark: 'cover/coding_dark.png' 5 | --- 6 | 7 | # Terms Cloud 8 | 9 | Render terms cloud, hugo supports `tag` and `category` terms by default, if you want to add your custom terms. Follow the instructions in the [document](https://gohugo.io/content-management/taxonomies/#configure-taxonomies). 10 | 11 | ## Usage 12 | 13 | ``` 14 | {{</* terms-cloud terms="" sortby="" order="" /*/>}} 15 | ``` 16 | 17 | Paramters: 18 | 19 | * `terms`: terms name 20 | * `sortby`: `count` or `alphabetical` (default: `count`) 21 | * `order`: `asc` or `desc` (default: `asc`) 22 | 23 | ## Examples 24 | 25 | ```html 26 | {{</* terms-cloud terms="series" */>}} 27 | ``` 28 | 29 | {{< terms-cloud terms="series" >}} 30 | 31 | ```html 32 | {{</* terms-cloud terms="tags" order="desc" */>}} 33 | ``` 34 | 35 | {{< terms-cloud terms="tags" order="desc" >}} 36 | 37 | ```html 38 | {{</* terms-cloud terms="tags" sortby="alphabetical" */>}} 39 | ``` 40 | 41 | {{< terms-cloud terms="tags" sortby="alphabetical" >}} 42 | 43 | -------------------------------------------------------------------------------- /exampleSite/content/zh-tw/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | {{< icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}} 5 | 6 | This is the demo of multilingual capability of hugo-theme-monochrome. 7 | -------------------------------------------------------------------------------- /exampleSite/content/zh-tw/posts/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Emoji Support" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | tags = [ 7 | "emoji", 8 | ] 9 | +++ 10 | 11 | Emoji can be enabled in a Hugo project in a number of ways. 12 | <!--more--> 13 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 14 | 15 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 16 | 17 | <p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p> 18 | 19 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 20 | 21 | *** 22 | 23 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 24 | 25 | {{< highlight html >}} 26 | .emoji { 27 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 28 | } 29 | {{< /highlight >}} 30 | 31 | {{< css.inline >}} 32 | <style> 33 | .emojify { 34 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 35 | font-size: 2rem; 36 | vertical-align: middle; 37 | } 38 | @media screen and (max-width:650px) { 39 | .nowrap { 40 | display: block; 41 | margin: 25px 0; 42 | } 43 | } 44 | </style> 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/zh-tw/posts/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: Math Typesetting 4 | date: 2019-03-08 5 | description: A brief guide to setup KaTeX 6 | math: true 7 | --- 8 | 9 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 10 | <!--more--> 11 | 12 | In this example we will be using [KaTeX](https://katex.org/) 13 | 14 | - Create a partial under `/layouts/partials/math.html` 15 | - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. 16 | - Include the partial in your templates like so: 17 | 18 | ```bash 19 | {{ if or .Params.math .Site.Params.math }} 20 | {{ partial "math.html" . }} 21 | {{ end }} 22 | ``` 23 | 24 | - To enable KaTex globally set the parameter `math` to `true` in a project's configuration 25 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 26 | 27 | **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) 28 | 29 | {{< math.inline >}} 30 | {{ if or .Page.Params.math .Site.Params.math }} 31 | <!-- KaTeX --> 32 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous"> 33 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script> 34 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> 35 | {{ end }} 36 | {{</ math.inline >}} 37 | 38 | ### Examples 39 | 40 | Inline math: $\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…$ 41 | 42 | Block math: 43 | $$ 44 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 45 | $$ 46 | -------------------------------------------------------------------------------- /exampleSite/content/zh-tw/posts/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Placeholder Text" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | tags = [ 7 | "markdown", 8 | "text", 9 | ] 10 | +++ 11 | 12 | Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 13 | 14 | 1. Exierant elisi ambit vivere dedere 15 | 2. Duce pollice 16 | 3. Eris modo 17 | 4. Spargitque ferrea quos palude 18 | 19 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 20 | 21 | 1. Comas hunc haec pietate fetum procerum dixit 22 | 2. Post torum vates letum Tiresia 23 | 3. Flumen querellas 24 | 4. Arcanaque montibus omnes 25 | 5. Quidem et 26 | 27 | # Vagus elidunt 28 | 29 | <svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg> 30 | 31 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 32 | 33 | ## Mane refeci capiebant unda mulcebat 34 | 35 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 36 | 37 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 38 | 39 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 40 | 41 | {{< css.inline >}} 42 | <style> 43 | .canon { background: white; width: 100%; height: auto; } 44 | </style> 45 | {{< /css.inline >}} 46 | -------------------------------------------------------------------------------- /exampleSite/content/zh-tw/posts/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Rich Content" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | tags = [ 7 | "shortcodes", 8 | "privacy", 9 | ] 10 | +++ 11 | 12 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 13 | <!--more--> 14 | --- 15 | 16 | ## YouTube Privacy Enhanced Shortcode 17 | 18 | {{< youtube ZJthWmvUzzc >}} 19 | 20 | --- 21 | 22 | ## Twitter Simple Shortcode 23 | 24 | {{< twitter_simple user="designreviewed" id="1085870671291310081" >}} 25 | 26 | --- 27 | 28 | ## Vimeo Simple Shortcode 29 | 30 | {{< vimeo_simple 48912912 >}} 31 | -------------------------------------------------------------------------------- /exampleSite/resources/_gen/assets/scss/core.scss_fb96db281e67f7a46a7605a5c94807cc.json: -------------------------------------------------------------------------------- 1 | {"Target":"style.min.6326d9dc8b173d44c2b431addc7b78633138d874bd37824a3ca1ddac925110e2.css","MediaType":"text/css","Data":{"Integrity":"sha256-YybZ3IsXPUTCtDGt3Ht4YzE42HS9N4JKPKHdrJJREOI="}} -------------------------------------------------------------------------------- /exampleSite/static/clock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/clock.jpg -------------------------------------------------------------------------------- /exampleSite/static/cover/balloon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/balloon.png -------------------------------------------------------------------------------- /exampleSite/static/cover/balloon_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/balloon_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/bookcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/bookcase.png -------------------------------------------------------------------------------- /exampleSite/static/cover/bookcase_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/bookcase_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/catalogue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/catalogue.png -------------------------------------------------------------------------------- /exampleSite/static/cover/catalogue_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/catalogue_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/coding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/coding.png -------------------------------------------------------------------------------- /exampleSite/static/cover/coding_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/coding_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/desktop.png -------------------------------------------------------------------------------- /exampleSite/static/cover/desktop_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/desktop_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/list.png -------------------------------------------------------------------------------- /exampleSite/static/cover/list_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/list_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/picture.png -------------------------------------------------------------------------------- /exampleSite/static/cover/picture_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/picture_dark.png -------------------------------------------------------------------------------- /exampleSite/static/cover/vase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/vase.png -------------------------------------------------------------------------------- /exampleSite/static/cover/vase_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/cover/vase_dark.png -------------------------------------------------------------------------------- /exampleSite/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/favicon.ico -------------------------------------------------------------------------------- /exampleSite/static/icons/balloon.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="iso-8859-1"?> 2 | <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 3 | <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 4 | viewBox="0 0 470 470" style="enable-background:new 0 0 470 470;" xml:space="preserve"> 5 | <g> 6 | <path d="M235,0C132.991,0,50,82.99,50,185c0,50.538,19.963,108.442,53.401,154.894c17.384,24.147,37.048,43.376,58.448,57.151 7 | c17.553,11.3,35.629,18.457,53.948,21.404c-10.86,11.882-17.169,27.572-17.169,44.051c0,4.143,3.358,7.5,7.5,7.5h57.744 8 | c4.142,0,7.5-3.357,7.5-7.5c0-16.479-6.309-32.168-17.169-44.051c18.318-2.948,36.394-10.104,53.948-21.404 9 | c21.4-13.775,41.064-33.004,58.448-57.151C400.037,293.442,420,235.538,420,185C420,82.99,337.009,0,235,0z M214.196,455 10 | c2.055-13.481,9.573-25.693,20.804-33.605c11.231,7.912,18.749,20.124,20.804,33.605H214.196z M354.425,331.13 11 | c-34.29,47.634-76.7,73.868-119.419,73.87c-42.73-0.002-85.141-26.237-119.431-73.87C84.379,287.794,65,231.8,65,185 12 | c0-93.738,76.262-170,170-170s170,76.262,170,170C405,231.8,385.621,287.794,354.425,331.13z"/> 13 | <path d="M235,40c-79.953,0-145,65.047-145,145c0,4.143,3.358,7.5,7.5,7.5s7.5-3.357,7.5-7.5c0-71.683,58.318-130,130-130 14 | c4.142,0,7.5-3.357,7.5-7.5S239.142,40,235,40z"/> 15 | </g> 16 | <g> 17 | </g> 18 | <g> 19 | </g> 20 | <g> 21 | </g> 22 | <g> 23 | </g> 24 | <g> 25 | </g> 26 | <g> 27 | </g> 28 | <g> 29 | </g> 30 | <g> 31 | </g> 32 | <g> 33 | </g> 34 | <g> 35 | </g> 36 | <g> 37 | </g> 38 | <g> 39 | </g> 40 | <g> 41 | </g> 42 | <g> 43 | </g> 44 | <g> 45 | </g> 46 | </svg> 47 | -------------------------------------------------------------------------------- /exampleSite/static/icons/balloon_dark.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="iso-8859-1"?> 2 | <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 3 | <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 4 | viewBox="0 0 470 470" style="enable-background:new 0 0 470 470;" fill="#e5e5e5" xml:space="preserve"> 5 | <g> 6 | <path d="M235,0C132.991,0,50,82.99,50,185c0,50.538,19.963,108.442,53.401,154.894c17.384,24.147,37.048,43.376,58.448,57.151 7 | c17.553,11.3,35.629,18.457,53.948,21.404c-10.86,11.882-17.169,27.572-17.169,44.051c0,4.143,3.358,7.5,7.5,7.5h57.744 8 | c4.142,0,7.5-3.357,7.5-7.5c0-16.479-6.309-32.168-17.169-44.051c18.318-2.948,36.394-10.104,53.948-21.404 9 | c21.4-13.775,41.064-33.004,58.448-57.151C400.037,293.442,420,235.538,420,185C420,82.99,337.009,0,235,0z M214.196,455 10 | c2.055-13.481,9.573-25.693,20.804-33.605c11.231,7.912,18.749,20.124,20.804,33.605H214.196z M354.425,331.13 11 | c-34.29,47.634-76.7,73.868-119.419,73.87c-42.73-0.002-85.141-26.237-119.431-73.87C84.379,287.794,65,231.8,65,185 12 | c0-93.738,76.262-170,170-170s170,76.262,170,170C405,231.8,385.621,287.794,354.425,331.13z"/> 13 | <path d="M235,40c-79.953,0-145,65.047-145,145c0,4.143,3.358,7.5,7.5,7.5s7.5-3.357,7.5-7.5c0-71.683,58.318-130,130-130 14 | c4.142,0,7.5-3.357,7.5-7.5S239.142,40,235,40z"/> 15 | </g> 16 | <g> 17 | </g> 18 | <g> 19 | </g> 20 | <g> 21 | </g> 22 | <g> 23 | </g> 24 | <g> 25 | </g> 26 | <g> 27 | </g> 28 | <g> 29 | </g> 30 | <g> 31 | </g> 32 | <g> 33 | </g> 34 | <g> 35 | </g> 36 | <g> 37 | </g> 38 | <g> 39 | </g> 40 | <g> 41 | </g> 42 | <g> 43 | </g> 44 | <g> 45 | </g> 46 | </svg> 47 | -------------------------------------------------------------------------------- /exampleSite/static/icons/bookcase.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><g><path d="m78.79 439.85c0 4.142 3.358 7.5 7.5 7.5h339.42c4.142 0 7.5-3.358 7.5-7.5v-64.65c0-4.142-3.358-7.5-7.5-7.5h-260.39c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h252.89v49.65h-324.42v-49.65h36.53c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-44.03c-4.142 0-7.5 3.358-7.5 7.5z"/><path d="m272.163 415.024c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m458.03 0h-404.06c-4.142 0-7.5 3.358-7.5 7.5v44.65c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-37.15h389.06v345.429c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-352.929c0-4.142-3.358-7.5-7.5-7.5z"/><path d="m458.03 387.929c-4.142 0-7.5 3.358-7.5 7.5v69.241h-389.06v-377.52c0-4.142-3.358-7.5-7.5-7.5s-7.5 3.358-7.5 7.5v385.02c0 4.142 3.358 7.5 7.5 7.5h22.802v24.83c0 4.142 3.358 7.5 7.5 7.5h32.325c3.28 0 6.18-2.132 7.159-5.263l8.458-27.067h247.571l8.458 27.067c.979 3.131 3.878 5.263 7.159 5.263h32.325c4.142 0 7.5-3.358 7.5-7.5v-24.83h22.802c4.142 0 7.5-3.358 7.5-7.5v-76.741c.001-4.142-3.357-7.5-7.499-7.5zm-346.947 109.071h-19.311v-17.33h24.727zm309.145 0h-19.311l-5.416-17.33h24.727z"/><path d="m78.792 342.874c0 4.142 3.358 7.5 7.5 7.5h339.415c4.142 0 7.5-3.358 7.5-7.5v-135.362c0-4.142-3.358-7.5-7.5-7.5h-339.415c-4.142 0-7.5 3.358-7.5 7.5zm55.407-7.5v-88.037h17.325v88.037zm81.976 0h-17.325v-75.915h17.325zm15-83.415v-4.622h17.325v4.622 83.415h-17.325zm32.325 83.415v-75.915h17.325v75.915zm81.976 0h-17.326v-75.915h17.325v75.915zm15 0v-83.415-4.622h17.325v88.037zm-266.684-120.362h324.415v120.362h-25.407v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-83.415c0-4.142-3.358-7.5-7.5-7.5h-24.825v-4.622c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v95.537h-25.408z"/><path d="m86.292 182.687h339.415c4.142 0 7.5-3.358 7.5-7.5v-135.362c0-4.142-3.358-7.5-7.5-7.5h-339.415c-4.142 0-7.5 3.358-7.5 7.5v135.362c0 4.142 3.358 7.5 7.5 7.5zm47.907-15v-88.037h17.325v88.037zm81.976 0h-17.325v-75.915h17.325zm15-83.415v-4.622h17.325v88.037h-17.325zm32.325-4.622h17.325v88.037h-17.325zm32.325 0h17.325v4.622 83.415h-17.325zm32.325 12.122h17.325v75.915h-17.325zm32.326 75.915v-83.415-4.622h17.325v88.037zm-266.684-120.362h324.415v120.362h-25.407v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-17.325v-4.622c0-4.142-3.358-7.5-7.5-7.5h-64.65-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v95.537h-25.408z"/></g></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/bookcase_dark.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" fill="#e5e5e5" xmlns="http://www.w3.org/2000/svg"><g><g><path d="m78.79 439.85c0 4.142 3.358 7.5 7.5 7.5h339.42c4.142 0 7.5-3.358 7.5-7.5v-64.65c0-4.142-3.358-7.5-7.5-7.5h-260.39c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h252.89v49.65h-324.42v-49.65h36.53c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-44.03c-4.142 0-7.5 3.358-7.5 7.5z"/><path d="m272.163 415.024c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m458.03 0h-404.06c-4.142 0-7.5 3.358-7.5 7.5v44.65c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-37.15h389.06v345.429c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-352.929c0-4.142-3.358-7.5-7.5-7.5z"/><path d="m458.03 387.929c-4.142 0-7.5 3.358-7.5 7.5v69.241h-389.06v-377.52c0-4.142-3.358-7.5-7.5-7.5s-7.5 3.358-7.5 7.5v385.02c0 4.142 3.358 7.5 7.5 7.5h22.802v24.83c0 4.142 3.358 7.5 7.5 7.5h32.325c3.28 0 6.18-2.132 7.159-5.263l8.458-27.067h247.571l8.458 27.067c.979 3.131 3.878 5.263 7.159 5.263h32.325c4.142 0 7.5-3.358 7.5-7.5v-24.83h22.802c4.142 0 7.5-3.358 7.5-7.5v-76.741c.001-4.142-3.357-7.5-7.499-7.5zm-346.947 109.071h-19.311v-17.33h24.727zm309.145 0h-19.311l-5.416-17.33h24.727z"/><path d="m78.792 342.874c0 4.142 3.358 7.5 7.5 7.5h339.415c4.142 0 7.5-3.358 7.5-7.5v-135.362c0-4.142-3.358-7.5-7.5-7.5h-339.415c-4.142 0-7.5 3.358-7.5 7.5zm55.407-7.5v-88.037h17.325v88.037zm81.976 0h-17.325v-75.915h17.325zm15-83.415v-4.622h17.325v4.622 83.415h-17.325zm32.325 83.415v-75.915h17.325v75.915zm81.976 0h-17.326v-75.915h17.325v75.915zm15 0v-83.415-4.622h17.325v88.037zm-266.684-120.362h324.415v120.362h-25.407v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-83.415c0-4.142-3.358-7.5-7.5-7.5h-24.825v-4.622c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v95.537h-25.408z"/><path d="m86.292 182.687h339.415c4.142 0 7.5-3.358 7.5-7.5v-135.362c0-4.142-3.358-7.5-7.5-7.5h-339.415c-4.142 0-7.5 3.358-7.5 7.5v135.362c0 4.142 3.358 7.5 7.5 7.5zm47.907-15v-88.037h17.325v88.037zm81.976 0h-17.325v-75.915h17.325zm15-83.415v-4.622h17.325v88.037h-17.325zm32.325-4.622h17.325v88.037h-17.325zm32.325 0h17.325v4.622 83.415h-17.325zm32.325 12.122h17.325v75.915h-17.325zm32.326 75.915v-83.415-4.622h17.325v88.037zm-266.684-120.362h324.415v120.362h-25.407v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-17.325v-4.622c0-4.142-3.358-7.5-7.5-7.5h-64.65-32.325c-4.142 0-7.5 3.358-7.5 7.5v4.622h-24.825c-4.142 0-7.5 3.358-7.5 7.5v83.415h-17.325v-95.537c0-4.142-3.358-7.5-7.5-7.5h-32.325c-4.142 0-7.5 3.358-7.5 7.5v95.537h-25.408z"/></g></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/catalogue.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m363.328 0h-180.036c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h160.17l-200.045 63.999c-10.162 2.441-17.242 11.468-17.242 21.87v317.758h-21.292c-4.134 0-7.497-3.363-7.497-7.497v-388.633c0-4.134 3.363-7.497 7.497-7.497h43.41c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-43.41c-12.405 0-22.498 10.092-22.498 22.497v388.634c0 12.405 10.092 22.497 22.497 22.497h21.292v55.875c0 12.405 10.092 22.497 22.497 22.497h258.446c12.405 0 22.497-10.092 22.497-22.497v-26.859c0-4.142-3.358-7.5-7.5-7.5s-7.5 3.358-7.5 7.5v26.859c0 4.134-3.363 7.497-7.497 7.497h-258.445c-4.134 0-7.497-3.363-7.497-7.497v-63.375c0-10.845 0-311.552 0-325.258 0-4.101 3.385-7.497 7.497-7.497h258.446c4.134 0 7.497 3.363 7.497 7.497v326.775c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-326.776c0-12.405-10.092-22.497-22.497-22.497h-21.292v-55.875c-.001-12.327-9.998-22.497-22.498-22.497zm-168.726 78.373 176.208-56.373c.01.162.016.327.016.497v55.875h-176.224z"/><path d="m269.344 128.873c0-7.995-6.505-14.5-14.5-14.5h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5zm-15 71.96h-77.169v-71.461h77.169z"/><path d="m254.844 374.539h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5v-72.461c0-7.995-6.505-14.5-14.5-14.5zm-.5 86.461h-77.169v-71.461h77.169z"/><path d="m269.344 263c0-7.995-6.505-14.5-14.5-14.5h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5zm-15 71.961h-77.169v-71.461h77.169z"/><path d="m386.115 143.43h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/><path d="m293.434 186.776h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-34.667c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m386.115 277.557h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/><path d="m293.434 320.904h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-34.667c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m393.615 411.096c0-4.142-3.358-7.5-7.5-7.5h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5z"/><path d="m293.434 431.943c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/catalogue_dark.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" fill="#e5e5e5" xmlns="http://www.w3.org/2000/svg"><g><path d="m363.328 0h-180.036c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h160.17l-200.045 63.999c-10.162 2.441-17.242 11.468-17.242 21.87v317.758h-21.292c-4.134 0-7.497-3.363-7.497-7.497v-388.633c0-4.134 3.363-7.497 7.497-7.497h43.41c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-43.41c-12.405 0-22.498 10.092-22.498 22.497v388.634c0 12.405 10.092 22.497 22.497 22.497h21.292v55.875c0 12.405 10.092 22.497 22.497 22.497h258.446c12.405 0 22.497-10.092 22.497-22.497v-26.859c0-4.142-3.358-7.5-7.5-7.5s-7.5 3.358-7.5 7.5v26.859c0 4.134-3.363 7.497-7.497 7.497h-258.445c-4.134 0-7.497-3.363-7.497-7.497v-63.375c0-10.845 0-311.552 0-325.258 0-4.101 3.385-7.497 7.497-7.497h258.446c4.134 0 7.497 3.363 7.497 7.497v326.775c0 4.142 3.358 7.5 7.5 7.5s7.5-3.358 7.5-7.5v-326.776c0-12.405-10.092-22.497-22.497-22.497h-21.292v-55.875c-.001-12.327-9.998-22.497-22.498-22.497zm-168.726 78.373 176.208-56.373c.01.162.016.327.016.497v55.875h-176.224z"/><path d="m269.344 128.873c0-7.995-6.505-14.5-14.5-14.5h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5zm-15 71.96h-77.169v-71.461h77.169z"/><path d="m254.844 374.539h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5v-72.461c0-7.995-6.505-14.5-14.5-14.5zm-.5 86.461h-77.169v-71.461h77.169z"/><path d="m269.344 263c0-7.995-6.505-14.5-14.5-14.5h-78.169c-7.995 0-14.5 6.505-14.5 14.5v72.461c0 7.995 6.505 14.5 14.5 14.5h78.169c7.995 0 14.5-6.505 14.5-14.5zm-15 71.961h-77.169v-71.461h77.169z"/><path d="m386.115 143.43h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/><path d="m293.434 186.776h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-34.667c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m386.115 277.557h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/><path d="m293.434 320.904h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5h-34.667c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5z"/><path d="m393.615 411.096c0-4.142-3.358-7.5-7.5-7.5h-92.681c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h92.681c4.142 0 7.5-3.358 7.5-7.5z"/><path d="m293.434 431.943c-4.142 0-7.5 3.358-7.5 7.5s3.358 7.5 7.5 7.5h34.667c4.142 0 7.5-3.358 7.5-7.5s-3.358-7.5-7.5-7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/coding.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="iso-8859-1"?> 2 | <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 3 | <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 4 | viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> 5 | <g> 6 | <g> 7 | <path d="M407.07,377.01c-1.86-1.86-4.44-2.93-7.07-2.93s-5.21,1.07-7.07,2.93c-1.86,1.86-2.93,4.44-2.93,7.07s1.07,5.21,2.93,7.07 8 | c1.86,1.87,4.44,2.93,7.07,2.93s5.21-1.06,7.07-2.93c1.86-1.86,2.93-4.44,2.93-7.07S408.93,378.871,407.07,377.01z"/> 9 | </g> 10 | </g> 11 | <g> 12 | <g> 13 | <path d="M472,0.001H40c-22.056,0-40,17.944-40,40v314.083c0,22.056,17.944,40,40,40h157v50.197 14 | c-29.332,2.858-52.333,27.65-52.333,57.719c0,5.523,4.477,10,10,10h202.667c5.523,0,10-4.477,10-10 15 | c0-30.749-24.055-55.972-54.333-57.872v-50.044h46.667c5.523,0,10-4.477,10-10s-4.477-10-10-10H40c-11.028,0-20-8.972-20-20 16 | V40.001c0-11.028,8.972-20,20-20h432c11.028,0,20,8.972,20,20v314.083c0,11.028-8.972,20-20,20h-37.333c-5.523,0-10,4.477-10,10 17 | s4.477,10,10,10H472c22.056,0,40-17.944,40-40V40.001C512,17.944,494.056,0.001,472,0.001z M217,394.084h76v49.917h-76V394.084z 18 | M309.333,464.001c17.494,0,32.265,11.882,36.666,28H166.001c4.4-16.118,19.171-28,36.665-28H309.333z"/> 19 | </g> 20 | </g> 21 | <g> 22 | <g> 23 | <path d="M262.07,345.011c-1.86-1.86-4.44-2.93-7.07-2.93c-2.63,0-5.21,1.07-7.07,2.93c-1.86,1.86-2.93,4.44-2.93,7.07 24 | c0,2.64,1.07,5.21,2.93,7.07c1.86,1.87,4.44,2.93,7.07,2.93s5.21-1.06,7.07-2.93c1.86-1.86,2.93-4.43,2.93-7.07 25 | C265,349.451,263.93,346.871,262.07,345.011z"/> 26 | </g> 27 | </g> 28 | <g> 29 | <g> 30 | <path d="M146.196,183.314l48.996-48.995c3.906-3.905,3.906-10.237,0.001-14.142c-3.905-3.905-10.237-3.905-14.143,0 31 | l-56.066,56.066c-3.905,3.905-3.905,10.237,0,14.143l56.066,56.066c1.953,1.953,4.512,2.929,7.071,2.929 32 | c2.559,0,5.119-0.976,7.071-2.929c3.905-3.905,3.905-10.237,0-14.143L146.196,183.314z"/> 33 | </g> 34 | </g> 35 | <g> 36 | <g> 37 | <path d="M387.015,176.243l-56.066-56.066c-3.905-3.905-10.237-3.905-14.143,0c-3.905,3.905-3.905,10.237,0,14.143l48.996,48.995 38 | l-48.996,48.995c-3.904,3.905-3.904,10.237,0.001,14.142c1.953,1.953,4.512,2.929,7.071,2.929s5.119-0.976,7.071-2.929 39 | l56.066-56.066C390.92,186.48,390.92,180.149,387.015,176.243z"/> 40 | </g> 41 | </g> 42 | <g> 43 | <g> 44 | <path d="M273.557,121.53c-5.334-1.432-10.818,1.737-12.248,7.071l-29.938,111.731c-1.429,5.335,1.737,10.818,7.071,12.248 45 | c0.867,0.232,1.738,0.343,2.595,0.343c4.415,0,8.456-2.947,9.653-7.414l29.938-111.731 46 | C282.058,128.442,278.892,122.96,273.557,121.53z"/> 47 | </g> 48 | </g> 49 | <g> 50 | <g> 51 | <path d="M462,40.084H303c-5.523,0-10,4.477-10,10s4.477,10,10,10h149v250H60v-250h153.5c5.523,0,10-4.477,10-10s-4.477-10-10-10 52 | H50c-5.523,0-10,4.477-10,10v270c0,5.523,4.477,10,10,10h412c5.523,0,10-4.477,10-10v-270C472,44.561,467.523,40.084,462,40.084z" 53 | /> 54 | </g> 55 | </g> 56 | <g> 57 | <g> 58 | <path d="M265.07,43.011c-1.86-1.86-4.44-2.93-7.07-2.93s-5.21,1.07-7.07,2.93s-2.93,4.44-2.93,7.07s1.07,5.21,2.93,7.08 59 | c1.86,1.86,4.44,2.92,7.07,2.92s5.21-1.06,7.07-2.92c1.86-1.87,2.93-4.44,2.93-7.08C268,47.451,266.93,44.871,265.07,43.011z"/> 60 | </g> 61 | </g> 62 | <g> 63 | </g> 64 | <g> 65 | </g> 66 | <g> 67 | </g> 68 | <g> 69 | </g> 70 | <g> 71 | </g> 72 | <g> 73 | </g> 74 | <g> 75 | </g> 76 | <g> 77 | </g> 78 | <g> 79 | </g> 80 | <g> 81 | </g> 82 | <g> 83 | </g> 84 | <g> 85 | </g> 86 | <g> 87 | </g> 88 | <g> 89 | </g> 90 | <g> 91 | </g> 92 | </svg> 93 | -------------------------------------------------------------------------------- /exampleSite/static/icons/coding_dark.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="iso-8859-1"?> 2 | <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 3 | <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 4 | viewBox="0 0 512 512" fill="#e5e5e5" style="enable-background:new 0 0 512 512;" xml:space="preserve"> 5 | <g> 6 | <g> 7 | <path d="M407.07,377.01c-1.86-1.86-4.44-2.93-7.07-2.93s-5.21,1.07-7.07,2.93c-1.86,1.86-2.93,4.44-2.93,7.07s1.07,5.21,2.93,7.07 8 | c1.86,1.87,4.44,2.93,7.07,2.93s5.21-1.06,7.07-2.93c1.86-1.86,2.93-4.44,2.93-7.07S408.93,378.871,407.07,377.01z"/> 9 | </g> 10 | </g> 11 | <g> 12 | <g> 13 | <path d="M472,0.001H40c-22.056,0-40,17.944-40,40v314.083c0,22.056,17.944,40,40,40h157v50.197 14 | c-29.332,2.858-52.333,27.65-52.333,57.719c0,5.523,4.477,10,10,10h202.667c5.523,0,10-4.477,10-10 15 | c0-30.749-24.055-55.972-54.333-57.872v-50.044h46.667c5.523,0,10-4.477,10-10s-4.477-10-10-10H40c-11.028,0-20-8.972-20-20 16 | V40.001c0-11.028,8.972-20,20-20h432c11.028,0,20,8.972,20,20v314.083c0,11.028-8.972,20-20,20h-37.333c-5.523,0-10,4.477-10,10 17 | s4.477,10,10,10H472c22.056,0,40-17.944,40-40V40.001C512,17.944,494.056,0.001,472,0.001z M217,394.084h76v49.917h-76V394.084z 18 | M309.333,464.001c17.494,0,32.265,11.882,36.666,28H166.001c4.4-16.118,19.171-28,36.665-28H309.333z"/> 19 | </g> 20 | </g> 21 | <g> 22 | <g> 23 | <path d="M262.07,345.011c-1.86-1.86-4.44-2.93-7.07-2.93c-2.63,0-5.21,1.07-7.07,2.93c-1.86,1.86-2.93,4.44-2.93,7.07 24 | c0,2.64,1.07,5.21,2.93,7.07c1.86,1.87,4.44,2.93,7.07,2.93s5.21-1.06,7.07-2.93c1.86-1.86,2.93-4.43,2.93-7.07 25 | C265,349.451,263.93,346.871,262.07,345.011z"/> 26 | </g> 27 | </g> 28 | <g> 29 | <g> 30 | <path d="M146.196,183.314l48.996-48.995c3.906-3.905,3.906-10.237,0.001-14.142c-3.905-3.905-10.237-3.905-14.143,0 31 | l-56.066,56.066c-3.905,3.905-3.905,10.237,0,14.143l56.066,56.066c1.953,1.953,4.512,2.929,7.071,2.929 32 | c2.559,0,5.119-0.976,7.071-2.929c3.905-3.905,3.905-10.237,0-14.143L146.196,183.314z"/> 33 | </g> 34 | </g> 35 | <g> 36 | <g> 37 | <path d="M387.015,176.243l-56.066-56.066c-3.905-3.905-10.237-3.905-14.143,0c-3.905,3.905-3.905,10.237,0,14.143l48.996,48.995 38 | l-48.996,48.995c-3.904,3.905-3.904,10.237,0.001,14.142c1.953,1.953,4.512,2.929,7.071,2.929s5.119-0.976,7.071-2.929 39 | l56.066-56.066C390.92,186.48,390.92,180.149,387.015,176.243z"/> 40 | </g> 41 | </g> 42 | <g> 43 | <g> 44 | <path d="M273.557,121.53c-5.334-1.432-10.818,1.737-12.248,7.071l-29.938,111.731c-1.429,5.335,1.737,10.818,7.071,12.248 45 | c0.867,0.232,1.738,0.343,2.595,0.343c4.415,0,8.456-2.947,9.653-7.414l29.938-111.731 46 | C282.058,128.442,278.892,122.96,273.557,121.53z"/> 47 | </g> 48 | </g> 49 | <g> 50 | <g> 51 | <path d="M462,40.084H303c-5.523,0-10,4.477-10,10s4.477,10,10,10h149v250H60v-250h153.5c5.523,0,10-4.477,10-10s-4.477-10-10-10 52 | H50c-5.523,0-10,4.477-10,10v270c0,5.523,4.477,10,10,10h412c5.523,0,10-4.477,10-10v-270C472,44.561,467.523,40.084,462,40.084z" 53 | /> 54 | </g> 55 | </g> 56 | <g> 57 | <g> 58 | <path d="M265.07,43.011c-1.86-1.86-4.44-2.93-7.07-2.93s-5.21,1.07-7.07,2.93s-2.93,4.44-2.93,7.07s1.07,5.21,2.93,7.08 59 | c1.86,1.86,4.44,2.92,7.07,2.92s5.21-1.06,7.07-2.92c1.86-1.87,2.93-4.44,2.93-7.08C268,47.451,266.93,44.871,265.07,43.011z"/> 60 | </g> 61 | </g> 62 | <g> 63 | </g> 64 | <g> 65 | </g> 66 | <g> 67 | </g> 68 | <g> 69 | </g> 70 | <g> 71 | </g> 72 | <g> 73 | </g> 74 | <g> 75 | </g> 76 | <g> 77 | </g> 78 | <g> 79 | </g> 80 | <g> 81 | </g> 82 | <g> 83 | </g> 84 | <g> 85 | </g> 86 | <g> 87 | </g> 88 | <g> 89 | </g> 90 | <g> 91 | </g> 92 | </svg> 93 | -------------------------------------------------------------------------------- /exampleSite/static/icons/desktop.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m474.5 18.5h-437c-20.678 0-37.5 16.822-37.5 37.5v330c0 20.678 16.822 37.5 37.5 37.5h160.057l-9.027 31.594c-3.625 12.688-17.835 23.406-31.03 23.406h-56.5c-4.142 0-7.5 3.357-7.5 7.5s3.358 7.5 7.5 7.5h310c4.142 0 7.5-3.357 7.5-7.5s-3.358-7.5-7.5-7.5h-56.5c-13.195 0-27.405-10.719-31.03-23.406l-9.027-31.594h160.057c20.678 0 37.5-16.822 37.5-37.5v-330c0-20.678-16.822-37.5-37.5-37.5zm-437 15h437c12.407 0 22.5 10.094 22.5 22.5v262.5h-482v-262.5c0-12.406 10.093-22.5 22.5-22.5zm271.547 425.715c2.058 7.205 6.149 13.824 11.512 19.285h-129.118c5.363-5.461 9.454-12.081 11.512-19.285l10.204-35.715h85.685zm165.453-50.715h-437c-12.407 0-22.5-10.094-22.5-22.5v-52.5h482v52.5c0 12.406-10.093 22.5-22.5 22.5z"/><path d="m37.5 303.5h437c4.142 0 7.5-3.357 7.5-7.5v-240c0-4.143-3.358-7.5-7.5-7.5h-437c-4.142 0-7.5 3.357-7.5 7.5v105c0 4.143 3.358 7.5 7.5 7.5s7.5-3.357 7.5-7.5v-97.5h422v225h-422v-97.5c0-4.143-3.358-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v105c0 4.143 3.358 7.5 7.5 7.5z"/><path d="m256 348.5c-12.407 0-22.5 10.094-22.5 22.5s10.093 22.5 22.5 22.5 22.5-10.094 22.5-22.5-10.093-22.5-22.5-22.5zm0 30c-4.136 0-7.5-3.364-7.5-7.5s3.364-7.5 7.5-7.5 7.5 3.364 7.5 7.5-3.364 7.5-7.5 7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/desktop_dark.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" fill="#e5e5e5" xmlns="http://www.w3.org/2000/svg"><g><path d="m474.5 18.5h-437c-20.678 0-37.5 16.822-37.5 37.5v330c0 20.678 16.822 37.5 37.5 37.5h160.057l-9.027 31.594c-3.625 12.688-17.835 23.406-31.03 23.406h-56.5c-4.142 0-7.5 3.357-7.5 7.5s3.358 7.5 7.5 7.5h310c4.142 0 7.5-3.357 7.5-7.5s-3.358-7.5-7.5-7.5h-56.5c-13.195 0-27.405-10.719-31.03-23.406l-9.027-31.594h160.057c20.678 0 37.5-16.822 37.5-37.5v-330c0-20.678-16.822-37.5-37.5-37.5zm-437 15h437c12.407 0 22.5 10.094 22.5 22.5v262.5h-482v-262.5c0-12.406 10.093-22.5 22.5-22.5zm271.547 425.715c2.058 7.205 6.149 13.824 11.512 19.285h-129.118c5.363-5.461 9.454-12.081 11.512-19.285l10.204-35.715h85.685zm165.453-50.715h-437c-12.407 0-22.5-10.094-22.5-22.5v-52.5h482v52.5c0 12.406-10.093 22.5-22.5 22.5z"/><path d="m37.5 303.5h437c4.142 0 7.5-3.357 7.5-7.5v-240c0-4.143-3.358-7.5-7.5-7.5h-437c-4.142 0-7.5 3.357-7.5 7.5v105c0 4.143 3.358 7.5 7.5 7.5s7.5-3.357 7.5-7.5v-97.5h422v225h-422v-97.5c0-4.143-3.358-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v105c0 4.143 3.358 7.5 7.5 7.5z"/><path d="m256 348.5c-12.407 0-22.5 10.094-22.5 22.5s10.093 22.5 22.5 22.5 22.5-10.094 22.5-22.5-10.093-22.5-22.5-22.5zm0 30c-4.136 0-7.5-3.364-7.5-7.5s3.364-7.5 7.5-7.5 7.5 3.364 7.5 7.5-3.364 7.5-7.5 7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/list.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m402.021 37.605h-34.442v-22.654c-.001-8.244-6.708-14.951-14.952-14.951h-19.559c-8.245 0-14.952 6.707-14.952 14.951v22.654h-37.385v-22.654c0-8.244-6.707-14.951-14.952-14.951h-19.559c-8.244 0-14.951 6.707-14.951 14.951v22.654h-37.386v-22.654c.001-8.244-6.706-14.951-14.95-14.951h-19.559c-8.245 0-14.952 6.707-14.952 14.951v22.654h-34.442c-14.035 0-25.454 11.418-25.454 25.453v38.056c0 4.143 3.357 7.5 7.5 7.5s7.5-3.357 7.5-7.5v-38.055c0-5.764 4.689-10.453 10.454-10.453h34.441v10.683c0 8.244 6.707 14.951 14.952 14.951h19.559c8.244 0 14.951-6.707 14.951-14.951v-10.684h37.386v10.683c0 8.244 6.707 14.951 14.951 14.951h19.559c8.245 0 14.952-6.707 14.952-14.951v-10.683h37.385v10.683c0 8.244 6.707 14.951 14.952 14.951h19.559c8.244 0 14.951-6.707 14.951-14.951v-10.683h34.442c5.764 0 10.453 4.689 10.453 10.453v423.487c0 5.765-4.689 10.454-10.453 10.454h-26.948c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5h26.948c14.035 0 25.453-11.419 25.453-25.454v-423.486c.001-14.036-11.417-25.454-25.452-25.454zm-242.599 25.683-.048-48.288 19.51-.049.053 48.288zm86.848 0-.049-48.288 19.511-.049.053 48.288zm86.846 0-.048-48.288 19.51-.049.053 48.288z"/><path d="m148.341 168.972c14.509 0 26.312-11.804 26.312-26.312 0-14.51-11.804-26.313-26.312-26.313-14.51 0-26.313 11.804-26.313 26.313-.001 14.508 11.803 26.312 26.313 26.312zm0-37.626c6.237 0 11.312 5.075 11.312 11.313 0 6.237-5.075 11.312-11.312 11.312-6.238 0-11.313-5.075-11.313-11.312-.001-6.238 5.075-11.313 11.313-11.313z"/><path d="m226.438 136.289h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 168.972h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 259.705c14.509 0 26.312-11.804 26.312-26.313s-11.804-26.313-26.312-26.313c-14.51 0-26.313 11.804-26.313 26.313s11.803 26.313 26.313 26.313zm0-37.627c6.237 0 11.312 5.075 11.312 11.313s-5.075 11.313-11.312 11.313c-6.238 0-11.313-5.075-11.313-11.313s5.075-11.313 11.313-11.313z"/><path d="m226.438 227.021h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 259.705h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 350.438c14.509 0 26.312-11.804 26.312-26.313s-11.804-26.312-26.312-26.312c-14.51 0-26.313 11.804-26.313 26.312-.001 14.509 11.803 26.313 26.313 26.313zm0-37.626c6.237 0 11.312 5.075 11.312 11.312 0 6.238-5.075 11.313-11.312 11.313-6.238 0-11.313-5.075-11.313-11.313-.001-6.237 5.075-11.312 11.313-11.312z"/><path d="m226.438 317.754h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 350.438h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 441.17c14.509 0 26.312-11.804 26.312-26.312 0-14.51-11.804-26.313-26.312-26.313-14.51 0-26.313 11.804-26.313 26.313-.001 14.508 11.803 26.312 26.313 26.312zm0-37.626c6.237 0 11.312 5.075 11.312 11.313 0 6.237-5.075 11.312-11.312 11.312-6.238 0-11.313-5.075-11.313-11.312-.001-6.238 5.075-11.313 11.313-11.313z"/><path d="m226.438 408.486h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 441.17h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m345.085 497h-235.105c-5.765 0-10.454-4.689-10.454-10.454v-355.445c0-4.143-3.357-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v355.445c0 14.035 11.419 25.454 25.454 25.454h235.104c4.143 0 7.5-3.357 7.5-7.5s-3.356-7.5-7.499-7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/list_dark.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" fill="#e5e5e5" xmlns="http://www.w3.org/2000/svg"><g><path d="m402.021 37.605h-34.442v-22.654c-.001-8.244-6.708-14.951-14.952-14.951h-19.559c-8.245 0-14.952 6.707-14.952 14.951v22.654h-37.385v-22.654c0-8.244-6.707-14.951-14.952-14.951h-19.559c-8.244 0-14.951 6.707-14.951 14.951v22.654h-37.386v-22.654c.001-8.244-6.706-14.951-14.95-14.951h-19.559c-8.245 0-14.952 6.707-14.952 14.951v22.654h-34.442c-14.035 0-25.454 11.418-25.454 25.453v38.056c0 4.143 3.357 7.5 7.5 7.5s7.5-3.357 7.5-7.5v-38.055c0-5.764 4.689-10.453 10.454-10.453h34.441v10.683c0 8.244 6.707 14.951 14.952 14.951h19.559c8.244 0 14.951-6.707 14.951-14.951v-10.684h37.386v10.683c0 8.244 6.707 14.951 14.951 14.951h19.559c8.245 0 14.952-6.707 14.952-14.951v-10.683h37.385v10.683c0 8.244 6.707 14.951 14.952 14.951h19.559c8.244 0 14.951-6.707 14.951-14.951v-10.683h34.442c5.764 0 10.453 4.689 10.453 10.453v423.487c0 5.765-4.689 10.454-10.453 10.454h-26.948c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5h26.948c14.035 0 25.453-11.419 25.453-25.454v-423.486c.001-14.036-11.417-25.454-25.452-25.454zm-242.599 25.683-.048-48.288 19.51-.049.053 48.288zm86.848 0-.049-48.288 19.511-.049.053 48.288zm86.846 0-.048-48.288 19.51-.049.053 48.288z"/><path d="m148.341 168.972c14.509 0 26.312-11.804 26.312-26.312 0-14.51-11.804-26.313-26.312-26.313-14.51 0-26.313 11.804-26.313 26.313-.001 14.508 11.803 26.312 26.313 26.312zm0-37.626c6.237 0 11.312 5.075 11.312 11.313 0 6.237-5.075 11.312-11.312 11.312-6.238 0-11.313-5.075-11.313-11.312-.001-6.238 5.075-11.313 11.313-11.313z"/><path d="m226.438 136.289h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 168.972h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 259.705c14.509 0 26.312-11.804 26.312-26.313s-11.804-26.313-26.312-26.313c-14.51 0-26.313 11.804-26.313 26.313s11.803 26.313 26.313 26.313zm0-37.627c6.237 0 11.312 5.075 11.312 11.313s-5.075 11.313-11.312 11.313c-6.238 0-11.313-5.075-11.313-11.313s5.075-11.313 11.313-11.313z"/><path d="m226.438 227.021h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 259.705h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 350.438c14.509 0 26.312-11.804 26.312-26.313s-11.804-26.312-26.312-26.312c-14.51 0-26.313 11.804-26.313 26.312-.001 14.509 11.803 26.313 26.313 26.313zm0-37.626c6.237 0 11.312 5.075 11.312 11.312 0 6.238-5.075 11.313-11.312 11.313-6.238 0-11.313-5.075-11.313-11.313-.001-6.237 5.075-11.312 11.313-11.312z"/><path d="m226.438 317.754h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 350.438h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m148.341 441.17c14.509 0 26.312-11.804 26.312-26.312 0-14.51-11.804-26.313-26.312-26.313-14.51 0-26.313 11.804-26.313 26.313-.001 14.508 11.803 26.312 26.313 26.312zm0-37.626c6.237 0 11.312 5.075 11.312 11.313 0 6.237-5.075 11.312-11.312 11.312-6.238 0-11.313-5.075-11.313-11.312-.001-6.238 5.075-11.313 11.313-11.313z"/><path d="m226.438 408.486h86.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-86.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m226.438 441.17h156.036c4.143 0 7.5-3.357 7.5-7.5s-3.357-7.5-7.5-7.5h-156.036c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5z"/><path d="m345.085 497h-235.105c-5.765 0-10.454-4.689-10.454-10.454v-355.445c0-4.143-3.357-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v355.445c0 14.035 11.419 25.454 25.454 25.454h235.104c4.143 0 7.5-3.357 7.5-7.5s-3.356-7.5-7.499-7.5z"/></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/icons/vase.svg: -------------------------------------------------------------------------------- 1 | <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><g><path d="m409.83 93.97c-13.499 0-26.86 4.504-37.624 12.682-3.298 2.506-3.94 7.211-1.435 10.509 2.505 3.299 7.211 3.938 10.509 1.435 8.169-6.207 18.309-9.625 28.549-9.625 25.993 0 47.14 21.147 47.14 47.141v45.55c0 15.523-7.642 30.048-20.439 38.85l-33.282 22.883c-.002-5.123-.235-10.235-.649-15.328l26.569-18.273c9.268-6.372 14.801-16.889 14.801-28.131v-45.55c0-18.825-15.315-34.141-34.14-34.141-7.987 0-15.764 2.821-21.899 7.945l-22.31 18.643-10.843-17.598c-6.92-11.25-10.578-24.169-10.578-37.36v-25.232l13.354-13.24c8.613-8.54 11.695-21.03 8.044-32.597-4.253-13.477-16.607-22.533-30.741-22.533h-159.172c-14.133 0-26.488 9.056-30.742 22.533-3.651 11.566-.568 24.057 8.044 32.597l13.354 13.24v25.23c0 10.294-2.237 20.419-6.503 29.715l-17.821-14.893c-11.164-9.319-25.315-14.452-39.846-14.452-34.264 0-62.14 27.876-62.14 62.141v45.55c0 20.468 10.067 39.611 26.932 51.211l41.171 28.303c1.048 15.421 7.06 37.372 10.57 52.619 3.418 14.395 11.345 26.679 22.071 35.537h-55.755c-15.454 0-28.027 12.573-28.027 28.027v23.681c0 15.454 12.573 28.027 28.027 28.027h131.284v46.004c0 9.336 7.595 16.931 16.931 16.931h44.073c9.335 0 16.931-7.595 16.931-16.931v-17.898c0-4.143-3.358-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v17.898c0 1.064-.866 1.931-1.931 1.931h-44.073c-1.064 0-1.931-.866-1.931-1.931v-46.004h55.435 138.784c15.454 0 28.027-12.573 28.027-28.027v-23.681c0-15.454-12.573-28.027-28.027-28.027h-55.755c10.727-8.858 18.653-21.142 22.071-35.538l6.27-26.429c1.963-8.265 3.35-16.663 4.191-25.114l42.732-29.38c16.869-11.603 26.94-30.747 26.94-51.21v-45.55c-.001-34.264-27.877-62.14-62.141-62.14zm-12.282 47.457c3.441-2.874 7.803-4.457 12.282-4.457 10.554 0 19.14 8.587 19.14 19.141v45.55c0 6.302-3.103 12.197-8.3 15.771l-20.166 13.87c-4.213-24.78-13.476-48.6-26.932-69.839zm-68.348-58.537h-147.86v-10.14h147.86zm-219.01 147.51-18.86-12.97c-5.197-3.572-8.299-9.468-8.299-15.77v-45.55c0-10.554 8.586-19.141 19.14-19.141 4.48 0 8.836 1.581 12.271 4.455l23.019 19.238c-13.596 21.308-22.945 45.036-27.271 69.738zm49.056-203.351c2.275-7.207 8.88-12.049 16.438-12.049h159.173c7.557 0 14.163 4.842 16.438 12.049 1.952 6.185.304 12.863-4.301 17.429l-13.381 13.268h-156.684l-13.382-13.268c-4.605-4.566-6.253-11.245-4.301-17.429zm-104.216 174.611v-45.55c0-25.993 21.147-47.141 47.14-47.141 11.024 0 21.762 3.895 30.23 10.965l19.905 16.635-6.895 11.189-21.347-17.841c-6.125-5.125-13.9-7.948-21.894-7.948-18.825 0-34.14 15.315-34.14 34.141v45.55c0 11.242 5.533 21.759 14.8 28.13l25.166 17.307c-.438 5.076-.668 10.181-.697 15.302l-31.838-21.888c-12.793-8.799-20.43-23.323-20.43-38.851zm370.491 182.67c9.347-.1 14.239 8.897 13.027 17.368h-305.6c-4.142 0-7.5 3.357-7.5 7.5s3.358 7.5 7.5 7.5h305.601c1.213 8.471-3.684 17.469-13.027 17.367h-340.503c-9.346.1-14.239-8.896-13.027-17.367h25.803c4.142 0 7.5-3.357 7.5-7.5s-3.358-7.5-7.5-7.5h-25.804c-1.213-8.471 3.684-17.47 13.027-17.368zm-48.278-54.002c-5.452 22.964-25.743 39.002-49.343 39.002h-145.26c-23.6 0-43.891-16.038-49.343-39.001-2.871-12.638-8.608-33.844-9.818-46.496-8.016-52.542 15.897-102.86 45.059-145.014 7.623-12.392 11.963-26.461 12.682-40.93h148.1c.72 14.469 5.06 28.538 12.685 40.935 34.738 50.278 56.964 103.234 41.508 165.074z"/><path d="m335.031 313.284c-40.669 9.276-82.322 8.703-110.102 6.589-4.136-.327-7.734 2.779-8.048 6.909-.314 4.131 2.779 7.733 6.909 8.048 10.094.769 21.956 1.338 34.943 1.338 24.083 0 52.023-1.962 79.633-8.259 4.038-.921 6.565-4.941 5.644-8.98-.92-4.038-4.938-6.568-8.979-5.645z"/><path d="m190.718 315.98c-9.564-1.47-15.218-2.698-15.273-2.71-4.047-.885-8.043 1.675-8.93 5.72-.887 4.046 1.674 8.046 5.72 8.933.245.054 6.121 1.334 16.205 2.884 4.004.644 7.942-2.16 8.552-6.274.629-4.095-2.18-7.924-6.274-8.553z"/><path d="m256.831 230.353c11.218 0 23.799-.95 36.298-3.801 4.039-.922 6.565-4.942 5.644-8.98-.921-4.039-4.939-6.563-8.98-5.645-33.34 7.605-68.759.063-69.112-.015-4.044-.885-8.04 1.676-8.927 5.721-.888 4.046 1.673 8.045 5.719 8.933 1.037.227 17.645 3.787 39.358 3.787z"/></g></g></svg> -------------------------------------------------------------------------------- /exampleSite/static/pottery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/pottery.jpg -------------------------------------------------------------------------------- /exampleSite/static/thanks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/exampleSite/static/thanks.jpg -------------------------------------------------------------------------------- /exampleSite/static/user.css: -------------------------------------------------------------------------------- 1 | html[data-theme="dark"] { 2 | } 3 | -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | "tags" = "Tags" 2 | "recent_posts" = "Recent Posts" 3 | "toc" = "Table of contents" 4 | "no_page_under_resouces" = 'There is no page under {{ .resources_path }}. You need to specify "{{ .resources_name }}" correctly and check the existence of posts under this folder.' 5 | "resources_not_found" = 'Resources not found. You need to specify "{{ .resources_name }}" correctly.' 6 | "search" = "Search Posts" 7 | "changelogs" = "Changelogs" 8 | -------------------------------------------------------------------------------- /i18n/fr-fr.toml: -------------------------------------------------------------------------------- 1 | "tags" = "Tags" 2 | "recent_posts" = "Articles récents" 3 | "toc" = "Sommaire" 4 | "no_page_under_resouces" = 'Aucune page présente dans {{ .resources_path }}. Veuillez spécifier « {{ .resources_name }} » correctement et vérifier l’existence d’articles dans ce répertoire.' 5 | "resources_not_found" = 'Ressources introuvables. Vous devez spécifier « {{ .resources_name }} » correctement.' 6 | "search" = "Rechercher des articles" 7 | "changelogs" = "Notes de version" 8 | -------------------------------------------------------------------------------- /i18n/ru.toml: -------------------------------------------------------------------------------- 1 | "tags" = "Теги" 2 | "recent_posts" = "Недавние записи" 3 | "toc" = "Содержание" 4 | "no_page_under_resouces" = 'Страницы {{ .resources_path }} не существует. Вам стоит указать "{{ .resources_name }}" правильно проверить наличие записей в соответствующем разделе.' 5 | "resources_not_found" = 'Страница не найдена. Вам стоит указать "{{ .resources_name }}" правильно.' 6 | "search" = "Поиск по записям" 7 | "changelogs" = "Свод изменений" 8 | -------------------------------------------------------------------------------- /i18n/zh-tw.toml: -------------------------------------------------------------------------------- 1 | "tags" = "標籤" 2 | "recent_posts" = "最近文章" 3 | "toc" = "文章目錄" 4 | "no_page_under_resouces" = '{{ .resources_path }} 下沒有找到任何頁面. 你需要檢查 "{{ .resources_name }}" 的設定是否正確並確認該目錄下是否有頁面存在' 5 | "resources_not_found" = '找不到資源,你需要檢查 "{{ .resources_name }}" 的設定是否正確' 6 | "search" = "搜索文章" 7 | "changelogs" = "更新日誌" 8 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaiiiz/hugo-theme-monochrome/139a6b68d2f804a99f6f3b3c30efa2db69a3924b/layouts/404.html -------------------------------------------------------------------------------- /layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{ if (.Page.Scratch.Get "params").enable_header_anchor }} 2 | <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="header-anchor-wrapper">{{ .Text | safeHTML }} 3 | <a href="#{{ .Anchor | safeURL }}" class="header-anchor-link"> 4 | <svg width="16px" height="16px" viewBox="0 0 24 24"> 5 | {{- partial "svg/feather.html" "hash" -}} 6 | </svg> 7 | </a> 8 | </h{{ .Level }}> 9 | {{ else }} 10 | <h{{ .Level }}>{{ .Text | safeHTML }}</h{{ .Level }}> 11 | {{ end }} 12 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | {{ .Scratch.SetInMap "params" "syntax_highlight" (.Site.Params.syntax_highlight | default (dict "lib" "builtin" "builtin" (dict "enable_code_copy" true))) }} 2 | {{ .Scratch.SetInMap "params" "enable_site_search" (.Site.Params.enable_site_search | default false) }} 3 | {{ .Scratch.SetInMap "params" "search_hidden" (.Params.search_hidden | default false) }} 4 | {{ .Scratch.SetInMap "params" "navbar_title" (.Params.navbar_title | default .Site.Params.navbar_title | default .Site.Title) }} 5 | {{ .Scratch.SetInMap "params" "author" (.Params.author | default .Site.Params.author) }} 6 | {{ .Scratch.SetInMap "params" "enable_open_graph" (.Params.open_graph | default .Site.Params.enable_open_graph | default true) }} 7 | {{ .Scratch.SetInMap "params" "enable_twitter_cards" (.Params.twitter_cards | default .Site.Params.enable_twitter_cards | default true) }} 8 | {{ .Scratch.SetInMap "params" "enable_toc" (.Params.toc | default .Site.Params.enable_toc | default true) }} 9 | {{ .Scratch.SetInMap "params" "enable_zooming_js" (.Params.zooming_js | default .Site.Params.enable_zooming_js | default true) }} 10 | {{ .Scratch.SetInMap "params" "enable_header_anchor" (.Params.header_anchor | default .Site.Params.enable_header_anchor | default true) }} 11 | {{ .Scratch.SetInMap "params" "ga_code" (.Params.ga | default .Site.Config.Services.GoogleAnalytics.ID) }} 12 | {{ .Scratch.SetInMap "params" "footer" (.Params.footer | default .Site.Params.footer) }} 13 | {{ .Scratch.SetInMap "params" "math" (.Params.math | default .Site.Params.enable_math | default false) }} 14 | {{ .Scratch.SetInMap "params" "enable_collapsible_toc" (.Params.collapsible_toc | default .Site.Params.enable_collapsible_toc | default false) }} 15 | {{ .Scratch.SetInMap "params" "enable_collapsible_changelogs" (.Params.collapsible_changelogs | default .Site.Params.enable_collapsible_changelogs | default false) }} 16 | {{ .Scratch.SetInMap "params" "color_scheme" (.Site.Params.color_scheme | default "light") }} 17 | 18 | <!DOCTYPE html> 19 | <html lang='{{ .Site.LanguageCode }}'> 20 | {{- partial "head.html" . -}} 21 | <body> 22 | {{- partial "header.html" . -}} 23 | {{- partial "nav.html" . -}} 24 | <main> 25 | <div id="content" class="content-margin"> 26 | {{ if .Params.changelogs }} 27 | {{ $enable_collapsible_changelogs := (.Scratch.Get "params").enable_collapsible_changelogs }} 28 | {{ partial "collapsible-menu.html" (dict "type" "changelogs" "context" . "enable" $enable_collapsible_changelogs) }} 29 | {{ end }} 30 | 31 | {{- block "content" . }}{{- end }} 32 | 33 | {{ if eq .Kind "page" }} 34 | {{ if (.Params.disqus | default .Site.Config.Services.Disqus.Shortname) }} 35 | {{- partial "disqus.html" . -}} 36 | {{ end }} 37 | {{ else }} 38 | {{ if (.Params.disqus | default false) }} 39 | {{- partial "disqus.html" . -}} 40 | {{ end }} 41 | {{ end }} 42 | 43 | {{ if templates.Exists "partials/user_content_end.html" -}} 44 | {{ partial "partials/user_content_end.html" . }} 45 | {{- end }} 46 | </div> 47 | </main> 48 | {{- partial "footer.html" . -}} 49 | </body> 50 | </html> 51 | -------------------------------------------------------------------------------- /layouts/_default/index.json: -------------------------------------------------------------------------------- 1 | {{- $index := slice -}} 2 | {{- range .Site.RegularPages -}} 3 | {{ if not (.Scratch.Get "params").search_hidden }} 4 | {{- $index = $index | append (dict "title" .Title "content" (.Content | safeHTML | replaceRE `(<div[^>]*highlight[^>]*>\s*<div[^>]*>\s*<table[^>]*>\s*<tr[^>]*>\s*<td[^>]*>\s*)(<pre[^>]*>\s*<code[^>]*>(\s*<span[^>]*>\s*.*\s*(<\/span>)+)*\s*<\/code>\s*<\/pre>)(\s*<\/td>\s*<td[^>]*>\s*<pre[^>]*>)` "$1$5" | plainify) "permalink" .Permalink) -}} 5 | {{ end }} 6 | {{- end -}} 7 | {{- $index | jsonify -}} 8 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ if and .Content (eq .Paginator.PageNumber 1) }} 4 | <div class="content-margin"> 5 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 6 | </div> 7 | {{ end }} 8 | 9 | {{- $group_by_year := .Params.group_by_year | default .Site.Params.list_layout.enable_group_by_year | default true -}} 10 | {{- $show_date := .Params.show_date | default .Site.Params.list_layout.enable_show_date | default true -}} 11 | {{- $pagination := .Params.pagination | default .Site.Params.list_layout.enable_pagination | default false -}} 12 | 13 | {{- $pages := .Pages -}} 14 | {{- if and $pagination $group_by_year -}} 15 | {{ $pages = (.Paginate (.Pages.GroupByPublishDate "2006")).PageGroups }} 16 | {{- else if and $pagination (not $group_by_year) -}} 17 | {{ $pages = .Paginator.Pages }} 18 | {{- else if and (not $pagination) $group_by_year -}} 19 | {{ $pages = .Pages.GroupByPublishDate "2006" }} 20 | {{- end -}} 21 | 22 | {{ if $group_by_year }} 23 | {{ range $pages }} 24 | <div class="content-margin"> 25 | <h1>{{- .Key -}}</h1> 26 | {{- partial "list.html" (dict "pages" .Pages "show_date" $show_date "group_by_year" $group_by_year) -}} 27 | </div> 28 | {{ end }} 29 | {{ if $pagination }} 30 | {{ template "_internal/pagination.html" . }} 31 | {{ end }} 32 | {{ else }} 33 | <div class="content-margin"> 34 | {{- partial "list.html" (dict "pages" $pages "show_date" $show_date "group_by_year" $group_by_year) -}} 35 | </div> 36 | {{ if $pagination }} 37 | {{ template "_internal/pagination.html" . }} 38 | {{ end }} 39 | {{ end }} 40 | 41 | {{ end }} 42 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | {{- $pctx := . -}} 2 | {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} 3 | {{- $pages := slice -}} 4 | {{- if or $.IsHome $.IsSection -}} 5 | {{- $pages = $pctx.RegularPages -}} 6 | {{- else -}} 7 | {{- $pages = $pctx.Pages -}} 8 | {{- end -}} 9 | {{- $limit := .Site.Config.Services.RSS.Limit -}} 10 | {{- if ge $limit 1 -}} 11 | {{- $pages = $pages | first $limit -}} 12 | {{- end -}} 13 | {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} 14 | <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 15 | <channel> 16 | <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} 17 | {{ .Permalink }} 18 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} 19 | Hugo -- gohugo.io{{ with .Site.LanguageCode }} 20 | {{.}}{{end}}{{ with .Site.Author.email }} 21 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} 22 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} 23 | {{.}}{{end}}{{ if not .Date.IsZero }} 24 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 25 | {{- with .OutputFormats.Get "RSS" -}} 26 | {{ printf "" .Permalink .MediaType | safeHTML }} 27 | {{- end -}} 28 | {{ range $pages }} 29 | 30 | {{ .Title }} 31 | {{ .Permalink }} 32 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 33 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} 34 | {{ .Permalink }} 35 | {{ .Summary | html }} 36 | 37 | {{ end }} 38 | 39 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{- define "content" -}} 2 | 3 | {{ if and (ne .TableOfContents "") (.Scratch.Get "params").enable_toc }} 4 | {{ $enable_collapsible_toc := (.Scratch.Get "params").enable_collapsible_toc }} 5 | {{ partial "collapsible-menu.html" (dict "type" "toc" "context" . "enable" $enable_collapsible_toc) }} 6 | {{ end }} 7 | 8 | {{ if .Content }} 9 |
10 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 11 |
12 | {{ end }} 13 | 14 | {{- end -}} 15 | -------------------------------------------------------------------------------- /layouts/_default/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{- define "content" -}} 2 | 3 |
4 |

{{ .Title }}

5 |
6 | {{- partial "terms-cloud.html" (dict "terms" .Data.Terms "sortby" "count" "order" "desc") -}} 7 |
8 |
9 | 10 | {{- end -}} 11 | -------------------------------------------------------------------------------- /layouts/_default/term.html: -------------------------------------------------------------------------------- 1 | {{- define "content" -}} 2 | 3 | {{- $group_by_year := .Site.Params.list_layout.enable_group_by_year | default true -}} 4 | {{- $show_date := .Site.Params.list_layout.enable_show_date | default true -}} 5 | {{- $pagination := .Site.Params.list_layout.enable_pagination | default false -}} 6 | 7 | {{- $pages := .Pages -}} 8 | {{- if and $pagination $group_by_year -}} 9 | {{ $pages = (.Paginate (.Pages.GroupByPublishDate "2006")).PageGroups }} 10 | {{- else if and $pagination (not $group_by_year) -}} 11 | {{ $pages = .Paginator.Pages }} 12 | {{- else if and (not $pagination) $group_by_year -}} 13 | {{ $pages = .Pages.GroupByPublishDate "2006" }} 14 | {{- end -}} 15 | 16 |
17 |
18 |

{{ .Title }}

19 | {{ range .AlternativeOutputFormats -}} 20 | {{ if eq .MediaType.Type "application/rss+xml" }} 21 | 26 | {{ end }} 27 | {{ end -}} 28 |
29 | {{ if $group_by_year }} 30 | {{ range $pages }} 31 |
32 |

{{- .Key -}}

33 | {{- partial "list.html" (dict "pages" .Pages "show_date" $show_date "group_by_year" $group_by_year) -}} 34 |
35 | {{ end }} 36 | {{ if $pagination }} 37 | {{ template "_internal/pagination.html" . }} 38 | {{ end }} 39 | {{ else }} 40 |
41 | {{- partial "list.html" (dict "pages" $pages "show_date" $show_date "group_by_year" $group_by_year) -}} 42 |
43 | {{ if $pagination }} 44 | {{ template "_internal/pagination.html" . }} 45 | {{ end }} 46 | {{ end }} 47 |
48 | 49 | {{- end -}} 50 | -------------------------------------------------------------------------------- /layouts/balloon/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | {{ partial "balloon/layout.html" . }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/balloon/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | {{- partial "balloon/layout.html" . -}} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/blank/list.html: -------------------------------------------------------------------------------- 1 | {{- define "content" -}} 2 | 3 | {{ if .Content }} 4 |
5 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 6 |
7 | {{ end }} 8 | 9 | {{- end -}} 10 | -------------------------------------------------------------------------------- /layouts/bookcase/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ $list_sections := .Params.bookcase_list_sections | default true }} 4 | {{ $list_pages := .Params.bookcase_list_pages | default true }} 5 | 6 | {{ $res := default nil }} 7 | {{ if and $list_sections $list_pages }} 8 | {{ $res = .Pages }} 9 | {{ else if $list_sections }} 10 | {{ $res = .Sections }} 11 | {{ else if $list_pages }} 12 | {{ $res = .RegularPages }} 13 | {{ end }} 14 | 15 | {{ partial "bookcase/layout.html" (dict "ctx" . "title" .Title "content" .Content "res" $res) }} 16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /layouts/gallery/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | {{ partial "gallery/layout.html" . }} 3 | {{ end }} -------------------------------------------------------------------------------- /layouts/gallery/single.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | {{- partial "gallery/layout.html" . -}} 3 | {{ end }} -------------------------------------------------------------------------------- /layouts/home.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ if .Content }} 4 |
5 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 6 |
7 | {{ end }} 8 | 9 | {{ partial "postcard/layout.html" (dict "pages" .Site.RegularPages "ctx" .) }} 10 | 11 | {{ end }} 12 | -------------------------------------------------------------------------------- /layouts/partials/balloon/card-item.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ partial "balloon/line.html" false }} 4 | {{ partial "balloon/dot.html" }} 5 | {{ partial "balloon/line.html" .last_item }} 6 |
7 | 8 |
9 | {{- partial "content.html" (dict "ctx" .ctx "content" .ctx.Content) -}} 10 |
11 |
12 | -------------------------------------------------------------------------------- /layouts/partials/balloon/dot.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /layouts/partials/balloon/head-item.html: -------------------------------------------------------------------------------- 1 | {{ $img := .Params.balloon_img_src | default .Params.balloon_img_src_dark }} 2 | {{ $img_dark := .Params.balloon_img_src_dark | default .Params.balloon_img_src }} 3 | {{ $balloon_circle := .Params.balloon_circle | default true }} 4 | 5 |
6 | {{/* For desktop layout */}} 7 |
8 |
9 | {{ partial "balloon/head/desktop.html" (dict "img" $img "balloon_circle" $balloon_circle) }} 10 |
11 |
12 | {{ partial "balloon/head/desktop.html" (dict "img" $img_dark "balloon_circle" $balloon_circle ) }} 13 |
14 | {{ partial "balloon/line.html" false }} 15 |
16 | {{/* For mobile layout */}} 17 |
18 |
19 | {{ partial "balloon/head/mobile.html" (dict "img" $img "balloon_circle" $balloon_circle) }} 20 |
21 |
22 | {{ partial "balloon/head/mobile.html" (dict "img" $img_dark "balloon_circle" $balloon_circle ) }} 23 |
24 |
25 | 26 |
27 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 28 |
29 |
30 | -------------------------------------------------------------------------------- /layouts/partials/balloon/head/desktop.html: -------------------------------------------------------------------------------- 1 | {{ if .img }} 2 |
3 | balloon_head 4 |
5 | {{ else }} 6 | {{ partial "balloon/dot.html" }} 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /layouts/partials/balloon/head/mobile.html: -------------------------------------------------------------------------------- 1 | {{ if .img }} 2 |
3 | balloon_head 4 |
5 | {{ end }} 6 | -------------------------------------------------------------------------------- /layouts/partials/balloon/layout.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.balloon_resources }} 2 |
3 | {{ partial "balloon/head-item.html" . }} 4 | 5 | {{ $res := .Site.GetPage .Params.balloon_resources }} 6 | {{ $pages := $res.Resources.ByType "page" }} 7 | {{ if eq (len $pages) 0 }} 8 | {{ $pages = $res.RegularPages }} 9 | {{ end }} 10 | 11 | {{ if $pages }} 12 | {{ $max_idx := sub (len $pages) 1 }} 13 | 14 | {{ range $index, $value := (sort $pages "Params.weight" "asc") }} 15 | {{ partial "balloon/title-item.html" . }} 16 | {{ partial "balloon/card-item.html" (dict "ctx" . "last_item" (eq $index $max_idx)) }} 17 | {{ end }} 18 | {{ else }} 19 | {{ i18n "no_page_under_resouces" (dict "resources_name" "balloon_resources" "resources_path" .Params.balloon_resources ) }} 20 | {{ end }} 21 |
22 | {{ else }} 23 | {{ i18n "resources_not_found" (dict "resources_name" "balloon_resources")}} 24 | {{ end }} 25 | -------------------------------------------------------------------------------- /layouts/partials/balloon/line.html: -------------------------------------------------------------------------------- 1 | {{ $last_item := . }} 2 |
3 | {{ if not $last_item }} 4 |
5 | {{ end }} 6 |
7 | -------------------------------------------------------------------------------- /layouts/partials/balloon/title-item.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ partial "balloon/line.html" false }} 4 |
5 |
{{ .Title }}
6 |
-------------------------------------------------------------------------------- /layouts/partials/bookcase/item.html: -------------------------------------------------------------------------------- 1 | {{ $cover_src := .Params.bookcase_cover_src | default .Params.bookcase_cover_src_dark }} 2 | {{ $cover_src_dark := .Params.bookcase_cover_src_dark | default .Params.bookcase_cover_src }} 3 | {{ $cover_title := .Params.bookcase_cover_title | default .Title }} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 | {{ $cover_title }} 13 |
14 |
15 | -------------------------------------------------------------------------------- /layouts/partials/bookcase/layout.html: -------------------------------------------------------------------------------- 1 | {{ $ctx := .ctx }} 2 | {{ $title := .title }} 3 | {{ $content := .content }} 4 | {{ $res := .res }} 5 | 6 |
7 |
8 |

{{ $title }}

9 | {{ if $content }} 10 | {{- partial "content.html" (dict "ctx" $ctx "content" $content) -}} 11 | {{ end }} 12 |
13 | 14 | {{ with $res }} 15 |
16 | {{ range . }} 17 | {{ $hidden := .Params.bookcase_hidden | default false }} 18 | {{ if not $hidden -}} 19 | {{- partial "bookcase/item.html" . -}} 20 | {{- end }} 21 | {{ end }} 22 |
23 | {{ end }} 24 |
25 | -------------------------------------------------------------------------------- /layouts/partials/collapsible-menu.html: -------------------------------------------------------------------------------- 1 | {{- if .enable -}} 2 |
3 | {{- else -}} 4 |
5 | {{- end -}} 6 | 7 | {{- if .enable -}} 8 | 9 | {{- else -}} 10 |
11 | {{- end -}} 12 | {{ i18n .type }} 13 | {{- if .enable -}} 14 |
15 | {{- else -}} 16 |
17 | {{- end -}} 18 | 19 |
20 | {{ if eq .type "changelogs" }} 21 |
22 | {{ range $log := .context.Params.changelogs }} 23 |
{{ $log.tag | markdownify }}
24 |
25 | {{ range $log.description }} 26 |
{{ . | markdownify }}
27 | {{ end }} 28 |
29 | {{ end }} 30 |
31 | {{ else if eq .type "toc" }} 32 | {{ .context.TableOfContents }} 33 | {{ end }} 34 |
35 | {{- if .enable -}} 36 |
37 | {{- else -}} 38 | 39 | {{- end -}} 40 | -------------------------------------------------------------------------------- /layouts/partials/content.html: -------------------------------------------------------------------------------- 1 | {{ $ctx := .ctx }} 2 | {{ $content := .content }} 3 | {{ $enable_line_no := ($ctx.Scratch.Get "params").syntax_highlight.prism.enable_line_no | default true }} 4 | 5 |
6 | {{ $content := $content | replaceRE "" "" }} 7 | {{ if eq ($ctx.Scratch.Get "params").syntax_highlight.lib "prism.js" }} 8 | {{ $content = $content | replaceRE "
" "
" }}
 9 |         {{ $content = $content | replaceRE "]*)class=\"([^>]*)\"([^>]*)>" "" }}
10 |     {{ end }}
11 |     {{ $content | safeHTML }}
12 | 
13 | -------------------------------------------------------------------------------- /layouts/partials/disqus.html: -------------------------------------------------------------------------------- 1 |
2 | {{ template "_internal/disqus.html" . }} 3 |
4 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{ with (.Scratch.Get "params").footer }} 2 | 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /layouts/partials/gallery/layout.html: -------------------------------------------------------------------------------- 1 | {{ if .Content }} 2 |
3 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 4 |
5 | {{ end }} 6 | 7 | {{ if .Params.gallery_resources }} 8 | {{ $res := .Site.GetPage .Params.gallery_resources }} 9 | {{ $pages := $res.Resources.ByType "page" }} 10 | {{ if eq (len $pages) 0 }} 11 | {{ $pages = $res.RegularPages }} 12 | {{ end }} 13 | 14 | {{ if $pages }} 15 | 63 | {{ else }} 64 | {{ i18n "no_page_under_resouces" (dict "resources_name" "gallery_resources" "resources_path" .Params.gallery_resources ) }} 65 | {{ end }} 66 | {{ else }} 67 | {{ i18n "resources_not_found" (dict "resources_name" "gallery_resources")}} 68 | {{ end }} 69 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{- if eq .Kind "home" -}} 7 | {{- print .Site.Title -}} 8 | {{- else if eq .Kind "section" -}} 9 | {{- print .CurrentSection.Title " - " .Site.Title }} 10 | {{- else -}} 11 | {{- print .Title " - " .Site.Title -}} 12 | {{- end -}} 13 | 14 | 15 | {{ with .Description }} 16 | 17 | {{ end }} 18 | 19 | {{ with .Keywords }} 20 | 21 | {{ end }} 22 | 23 | {{ with (.Scratch.Get "params").author }} 24 | 25 | {{ end }} 26 | 27 | {{ if (.Scratch.Get "params").enable_open_graph }} 28 | {{ template "_internal/opengraph.html" . }} 29 | {{ end }} 30 | 31 | {{ if (.Scratch.Get "params").enable_twitter_cards }} 32 | {{ template "_internal/twitter_cards.html" . }} 33 | {{ end }} 34 | 35 | {{- partial "resources/css.html" . -}} 36 | 37 | {{ if (.Scratch.Get "params").ga_code }} 38 | {{ template "_internal/google_analytics.html" . }} 39 | {{ end }} 40 | 41 | {{/* Dark theme: inline in `head` to avoid FOUC */}} 42 | 58 | 59 | {{- partial "resources/js.html" . -}} 60 | 61 | {{ if fileExists "/static/user.css" -}} 62 | 63 | {{- end }} 64 | 65 | {{ if templates.Exists "partials/user_head.html" -}} 66 | {{ partial "partials/user_head.html" . }} 67 | {{- end }} 68 | 69 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 32 | 33 | 42 |
43 | 44 |
45 |
46 | 47 | {{- partial "svg/feather.html" "sun" -}} 48 | 49 | 50 | {{- partial "svg/feather.html" "moon" -}} 51 | 52 |
53 | 54 | {{ if (.Scratch.Get "params").enable_site_search }} 55 |
56 | 57 | {{- partial "svg/feather.html" "search" -}} 58 | 59 | {{- partial "search-menu.html" -}} 60 |
61 | {{ end }} 62 | 63 | {{ if hugo.IsMultilingual }} 64 | 83 | {{ end }} 84 |
85 |
86 | -------------------------------------------------------------------------------- /layouts/partials/list.html: -------------------------------------------------------------------------------- 1 | {{ $show_date := .show_date | default true }} 2 | {{ $pages := .pages }} 3 | {{ $group_by_year := .group_by_year | default true }} 4 | 5 | {{- if $pages -}} 6 | {{- if $show_date -}} 7 | {{- $pages = $pages.ByPublishDate.Reverse -}} 8 | {{- end -}} 9 | 27 | {{- end -}} 28 | -------------------------------------------------------------------------------- /layouts/partials/nav.html: -------------------------------------------------------------------------------- 1 | 46 | -------------------------------------------------------------------------------- /layouts/partials/navbar/nested-desktop.html: -------------------------------------------------------------------------------- 1 | {{ range .Children }} 2 | {{- $name := .Name }} 3 | {{- with .Identifier }} 4 | {{- with T . }} 5 | {{- $name = . }} 6 | {{- end }} 7 | {{- end }} 8 | 9 | {{ if .Children }} 10 |
  • 11 | {{ if .URL }} 12 | {{- $name -}} 13 | {{ else }} 14 | 15 | {{ end }} 16 | 19 |
  • 20 | {{ else }} 21 |
  • 22 | {{ if .URL }} 23 | {{- $name -}} 24 | {{ else }} 25 | 26 | {{ end }} 27 |
  • 28 | {{ end }} 29 | {{ end }} 30 | -------------------------------------------------------------------------------- /layouts/partials/navbar/nested-mobile.html: -------------------------------------------------------------------------------- 1 | {{ with .Children }} 2 | 31 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/postcard/layout.html: -------------------------------------------------------------------------------- 1 | {{ $ctx := .ctx }} 2 | {{ $pages := .pages }} 3 | 4 |
    5 | {{ range ($ctx.Paginator).Pages }} 6 | 7 |
    8 |
    9 | {{ .Title }} 10 |
    11 |
    12 | {{ .Summary | plainify }} 13 |
    14 | 17 |
    18 |
    19 | {{ end }} 20 | {{ template "_internal/pagination.html" $ctx }} 21 |
    22 | 23 | {{ define "breadcrumbtext" }} 24 | {{ if .p1.Parent }} 25 | {{ if not .p1.Parent.IsHome }} 26 | {{ template "breadcrumbtext" (dict "p1" .p1.Parent) }} 27 | {{ end }} 28 | {{ end }} 29 | 30 | {{ if .p1.Parent }} 31 | {{ if .p1.Parent.IsHome }} 32 | {{ .p1.Title }} 33 | {{ else }} 34 | / 35 | {{ .p1.Title }} 36 | {{ end }} 37 | {{ end }} 38 | {{ end }} 39 | -------------------------------------------------------------------------------- /layouts/partials/resources/css.html: -------------------------------------------------------------------------------- 1 | {{- $styles := resources.Get "scss/core.scss" -}} 2 | {{- if hugo.IsProduction -}} 3 | {{- $tocss_opts := dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true -}} 4 | {{- $styles = $styles | css.Sass $tocss_opts | resources.Minify | resources.Fingerprint "sha256" -}} 5 | {{- else -}} 6 | {{- $tocss_opts := dict "targetPath" "style.css" "enableSourceMap" true -}} 7 | {{- $styles = $styles | css.Sass $tocss_opts -}} 8 | {{- end -}} 9 | 10 | 11 | {{/* Prism.js style */}} 12 | {{ if or (and (findRE " 18 | {{ end }} 19 | -------------------------------------------------------------------------------- /layouts/partials/search-menu.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /layouts/partials/svg/feather.html: -------------------------------------------------------------------------------- 1 | {{- $icon_name := . -}} 2 | {{- $feather_sprite := resources.Get "lib/icns/feather-sprite-v4.29.0.svg" -}} 3 | {{- $regex := printf `(.*?)<\/symbol>` $icon_name -}} 4 | {{- $path := index (index (findRESubmatch $regex $feather_sprite.Content) 0) 1 | safeHTML }} 5 | 10 | {{ $path }} 11 | 12 | 13 | -------------------------------------------------------------------------------- /layouts/partials/svg/simple.html: -------------------------------------------------------------------------------- 1 | {{- $icon_name := . -}} 2 | {{- $sprite := resources.Get "lib/icns/simple-icons-sprite-v11.15.0.svg" -}} 3 | {{- $regex := printf `(.*?)\n<\/symbol>` $icon_name -}} 4 | {{- $path := index (index (findRESubmatch $regex $sprite.Content) 0) 1 | safeHTML }} 5 | 8 | {{ $path }} 9 | 10 | 11 | -------------------------------------------------------------------------------- /layouts/partials/terms-cloud.html: -------------------------------------------------------------------------------- 1 | {{- $terms := .terms -}} 2 | {{- $sortby := .sortby | default "count" -}} 3 | {{- $order := .order | default "asc" -}} 4 | {{- if eq $sortby "count" -}} 5 | {{- $terms = sort $terms "Count" $order -}} 6 | {{- else if eq $sortby "alphabetical" -}} 7 | {{- $terms = sort $terms "Page.Title" $order -}} 8 | {{- end -}} 9 | 10 | {{ if $terms }} 11 | {{ $fontSmall := 0.875 }} 12 | {{ $fontBig := 1.6 }} 13 | {{ $fontSpread := sub $fontBig $fontSmall }} 14 | 15 | {{ $termCount := slice }} 16 | {{ range $terms }} 17 | {{ $termCount = append .Count $termCount }} 18 | {{ end }} 19 | {{ $termCount = sort $termCount }} 20 | 21 | {{ $min := int (index $termCount 0) }} 22 | {{ $max := add (int (index $termCount (sub (len $termCount) 1))) 1 }} 23 | 24 |
    25 | {{ range $terms }} 26 | {{ $weight := div (sub (math.Log .Count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }} 27 | {{ $fontSize := (add $fontSmall (mul $fontSpread $weight)) }} 28 | {{ $lineHeight := add $fontSize 0.85 }} 29 | 30 | 31 | {{- .Page.Title -}} 32 | ({{- .Count -}}) 33 | 34 | {{ end }} 35 |
    36 | {{ end }} 37 | -------------------------------------------------------------------------------- /layouts/postcard/list.html: -------------------------------------------------------------------------------- 1 | {{ define "content" }} 2 | 3 | {{ if and .Content (eq .Paginator.PageNumber 1) }} 4 |
    5 | {{- partial "content.html" (dict "ctx" . "content" .Content) -}} 6 |
    7 | {{ end }} 8 | 9 | {{ partial "postcard/layout.html" (dict "pages" .RegularPages "ctx" .) }} 10 | 11 | {{ end }} 12 | -------------------------------------------------------------------------------- /layouts/shortcodes/bookcase.html: -------------------------------------------------------------------------------- 1 | {{ $section_name := .Get "section" }} 2 | 3 | {{ $section := .Site.GetPage $section_name }} 4 | {{ if not $section }} 5 | {{ errorf "bookcase resource not found" }} 6 | {{ end }} 7 | 8 | {{ if ne $section.Kind "section" }} 9 | {{ errorf "bookcase resource must be a section" }} 10 | {{ end }} 11 | 12 | {{ $list_sections := $section.Params.bookcase_list_sections | default true }} 13 | {{ $list_pages := $section.Params.bookcase_list_pages | default true }} 14 | 15 | {{ $pages := default nil }} 16 | {{ if and $list_sections $list_pages }} 17 | {{ $pages = $section.Pages }} 18 | {{ else if $list_sections }} 19 | {{ $pages = $section.Sections }} 20 | {{ else if $list_pages }} 21 | {{ $pages = $section.RegularPages }} 22 | {{ end }} 23 | 24 | {{ partial "bookcase/layout.html" (dict "ctx" . "title" $section.Title "content" $section.Content "res" $pages) }} 25 | 26 | -------------------------------------------------------------------------------- /layouts/shortcodes/breadcrumbs.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 |
    6 | 7 | {{ define "breadcrumbnav" }} 8 | {{- if .p1.Parent -}} 9 | {{- template "breadcrumbnav" (dict "p1" .p1.Parent) -}} 10 | {{- else if not .p1.IsHome -}} 11 | {{- template "breadcrumbnav" (dict "p1" .p1.Site.Home) -}} 12 | {{- end -}} 13 | {{- if not .p1.IsHome -}} 14 |
  • /
  • {{- .p1.Title -}}
  • 15 | {{- else -}} 16 |
  • Home
  • 17 | {{- end -}} 18 | {{ end }} 19 | -------------------------------------------------------------------------------- /layouts/shortcodes/codepen.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get "id" }} 2 | 3 |

    4 | 5 | -------------------------------------------------------------------------------- /layouts/shortcodes/color-block.html: -------------------------------------------------------------------------------- 1 | {{ $style := .Get "style" }} 2 | 3 | {{ $bg_color := "#f0f0f0" }} 4 | {{ $color := "#494949" }} 5 | 6 | {{ if eq $style "error" }} 7 | {{ $bg_color = "#f2dede" }} 8 | {{ $color = "#a94442" }} 9 | {{ else if eq $style "warning" }} 10 | {{ $bg_color = "#fcf8e3" }} 11 | {{ $color = "#8a6d3b" }} 12 | {{ else if eq $style "info" }} 13 | {{ $bg_color = "#d9edf7" }} 14 | {{ $color = "#31708f" }} 15 | {{ else if eq $style "success" }} 16 | {{ $bg_color = "#dff0d8" }} 17 | {{ $color = "#3c763d" }} 18 | {{ end }} 19 | 20 |
    21 | {{ .Inner | safeHTML }} 22 |
    23 | -------------------------------------------------------------------------------- /layouts/shortcodes/icon-group.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ .Inner | safeHTML }} 3 |
    -------------------------------------------------------------------------------- /layouts/shortcodes/icon.html: -------------------------------------------------------------------------------- 1 | {{- $icon_vendor := .Get "vendor" -}} 2 | {{- $icon_link := .Get "link" -}} 3 | {{- $icon_name := .Get "name" -}} 4 | 5 | 22 | -------------------------------------------------------------------------------- /layouts/shortcodes/jsfiddle.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get "id" }} 2 | 3 | 4 | -------------------------------------------------------------------------------- /layouts/shortcodes/recent-posts.html: -------------------------------------------------------------------------------- 1 | {{ $sortby := .Get "sortby" }} 2 | {{ $limit := int (.Get "limit") }} 3 | {{ $pages := .Site.RegularPages }} 4 | 5 | {{- if $pages -}} 6 | {{- if eq $sortby "publishDate" -}} 7 | {{- $pages = $pages.ByPublishDate.Reverse -}} 8 | {{- else if eq $sortby "lastMod" -}} 9 | {{- $pages = $pages.ByLastmod.Reverse -}} 10 | {{- else -}} 11 | {{- errorf "Unsupported recent posts sort option" -}} 12 | {{- end -}} 13 | 14 | {{- if gt $limit 0 -}} 15 | {{- $pages = first $limit $pages -}} 16 | {{- end -}} 17 | 18 |
      19 | {{ range $pages }} 20 |
    • 21 | 22 | {{- .Title -}} 23 | 24 | 25 | {{- if eq $sortby "publishDate" -}} 26 | {{- .PublishDate.Format "2006/01/02" -}} 27 | {{- else if eq $sortby "lastMod" -}} 28 | {{- .Lastmod.Format "2006/01/02" -}} 29 | {{- end -}} 30 | 31 |
    • 32 | {{ end }} 33 |
    34 | {{- end -}} 35 | 36 | -------------------------------------------------------------------------------- /layouts/shortcodes/terms-cloud.html: -------------------------------------------------------------------------------- 1 | {{- $terms := .Get "terms" -}} 2 | {{- $sortby := .Get "sortby" -}} 3 | {{- $order := .Get "order" -}} 4 |
    5 | {{- partial "terms-cloud.html" (dict "terms" (index .Site.Taxonomies $terms) "sortby" $sortby "order" $order) -}} 6 |
    7 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "Monochrome" 2 | license = "MIT" 3 | licenselink = "https://github.com/kaiiiz/hugo-theme-monochrome/blob/main/LICENSE" 4 | description = "Monochrome is a clean, responsive, and programmer-friendly hugo theme" 5 | homepage = "https://github.com/kaiiiz/hugo-theme-monochrome/" 6 | demosite = "https://kaiiiz.github.io/hugo-theme-monochrome/" 7 | tags = ["blog", "responsive", "dark", "light", "multilingual"] 8 | features = ["Clean UI with small resources", "Responsive layout", "Dark mode", "Multiple layouts built-in", "Nested navbar", "Multilingual mode", "Syntax Highlighting with copy feature", "Site Search", "SEO-friendly", "MathJax Integration", "Useful shortcodes"] 9 | min_version = "0.80.0" 10 | 11 | [author] 12 | name = "You-Kai Zheng" 13 | homepage = "https://github.com/kaiiiz/" 14 | --------------------------------------------------------------------------------