├── README.md ├── assets ├── js │ ├── app.js │ ├── vendor │ │ └── .gitkeep │ ├── lazysizes.js │ ├── instant.page.js │ ├── bootstrap.js │ ├── alert-init.js │ ├── katex.js │ ├── mermaid.js │ ├── scroll-lock.js │ ├── alert.js │ ├── darkmode-init.js │ ├── clipboard.js │ ├── highlight.js │ ├── darkmode.js │ └── index.js ├── fonts │ └── .gitkeep ├── images │ └── .gitkeep └── scss │ ├── vendor │ └── .gitkeep │ ├── components │ ├── _tables.scss │ ├── _mermaid.scss │ ├── _forms.scss │ ├── _comments.scss │ ├── _images.scss │ ├── _code.scss │ ├── _syntax.scss │ ├── _search.scss │ ├── _details.scss │ ├── _alerts.scss │ └── _buttons.scss │ ├── layouts │ ├── _footer.scss │ ├── _posts.scss │ ├── _pages.scss │ ├── _sidebar.scss │ └── _header.scss │ ├── app.scss │ └── common │ ├── _fonts.scss │ ├── _global.scss │ ├── _variables.scss │ └── _dark.scss ├── static ├── css │ └── vendor │ │ └── .gitkeep ├── fonts │ ├── vendor │ │ ├── .gitkeep │ │ └── jost │ │ │ ├── jost-v4-latin-500.woff │ │ │ ├── jost-v4-latin-700.woff │ │ │ ├── jost-v4-latin-500.woff2 │ │ │ ├── jost-v4-latin-700.woff2 │ │ │ ├── jost-v4-latin-italic.woff │ │ │ ├── jost-v4-latin-italic.woff2 │ │ │ ├── jost-v4-latin-regular.woff │ │ │ ├── jost-v4-latin-regular.woff2 │ │ │ ├── jost-v4-latin-500italic.woff │ │ │ ├── jost-v4-latin-500italic.woff2 │ │ │ ├── jost-v4-latin-700italic.woff │ │ │ └── jost-v4-latin-700italic.woff2 │ ├── KaTeX_Main-Bold.ttf │ ├── KaTeX_AMS-Regular.ttf │ ├── KaTeX_AMS-Regular.woff │ ├── KaTeX_Fraktur-Bold.ttf │ ├── KaTeX_Main-Bold.woff │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-Italic.ttf │ ├── KaTeX_Main-Italic.woff │ ├── KaTeX_Main-Regular.ttf │ ├── KaTeX_Math-Italic.ttf │ ├── KaTeX_Math-Italic.woff │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.woff │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.woff │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_SansSerif-Bold.ttf │ ├── KaTeX_Script-Regular.ttf │ ├── KaTeX_Size1-Regular.ttf │ ├── KaTeX_Size1-Regular.woff │ ├── KaTeX_Size2-Regular.ttf │ ├── KaTeX_Size2-Regular.woff │ ├── KaTeX_Size3-Regular.ttf │ ├── KaTeX_Size3-Regular.woff │ ├── KaTeX_Size4-Regular.ttf │ ├── KaTeX_Size4-Regular.woff │ ├── KaTeX_Caligraphic-Bold.ttf │ ├── KaTeX_Caligraphic-Bold.woff │ ├── KaTeX_Fraktur-Regular.ttf │ ├── KaTeX_Fraktur-Regular.woff │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-BoldItalic.ttf │ ├── KaTeX_Main-BoldItalic.woff │ ├── KaTeX_Main-BoldItalic.woff2 │ ├── KaTeX_Math-BoldItalic.ttf │ ├── KaTeX_Math-BoldItalic.woff │ ├── KaTeX_Math-BoldItalic.woff2 │ ├── KaTeX_SansSerif-Bold.woff │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.ttf │ ├── KaTeX_SansSerif-Italic.woff │ ├── KaTeX_SansSerif-Regular.ttf │ ├── KaTeX_Script-Regular.woff │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.ttf │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.woff │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Typewriter-Regular.ttf │ ├── KaTeX_Typewriter-Regular.woff │ ├── KaTeX_Caligraphic-Regular.woff │ ├── KaTeX_Caligraphic-Regular.woff2 │ └── KaTeX_Typewriter-Regular.woff2 ├── js │ └── vendor │ │ └── .gitkeep ├── images │ └── vendor │ │ └── .gitkeep ├── doks.png ├── favicon.ico ├── logo-doks.png ├── favicon-16x16.png ├── favicon-32x32.png ├── videos │ ├── flower.mp4 │ └── flower.webm ├── apple-touch-icon.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── site.webmanifest ├── doks.svg └── logo-doks.svg ├── config ├── next │ └── config.toml ├── production │ └── config.toml ├── _default │ ├── markup.toml │ ├── languages.toml │ ├── menus │ │ └── menus.en.toml │ ├── params.toml │ └── config.toml └── postcss.config.js ├── i18n ├── en.toml └── nl.toml ├── changelog.md ├── images ├── tn.png └── screenshot.png ├── .eslintignore ├── .stylelintignore ├── .gitignore ├── content └── en │ ├── book │ ├── .DS_Store │ ├── _index.md │ └── introduction │ │ ├── _index.md │ │ ├── about_author.md │ │ └── about.md │ └── _index.md ├── archetypes ├── default.md ├── blog.md ├── book.md └── docs.md ├── layouts ├── robots.txt ├── _default │ ├── _markup │ │ ├── render-heading.html │ │ └── render-image.html │ ├── single.html │ ├── index.json │ ├── index.js │ ├── list.html │ ├── baseof.html │ ├── versions.html │ └── section.sitemap.xml ├── partials │ ├── sidebar │ │ ├── docs-toc.html │ │ ├── docs-menu.html │ │ ├── auto-default-menu.html │ │ ├── manual-default-menu.html │ │ ├── auto-collapsible-menu.html │ │ └── manual-collapsible-menu.html │ ├── main │ │ ├── date.html │ │ ├── breadcrumb.html │ │ ├── blog-meta.html │ │ ├── docs-navigation.html │ │ ├── last-modified.html │ │ └── edit-page.html │ ├── head │ │ ├── script-header.html │ │ ├── favicons.html │ │ ├── head.html │ │ ├── resource-hints.html │ │ ├── stylesheet.html │ │ ├── twitter_cards.html │ │ ├── seo.html │ │ ├── opengraph.html │ │ └── structured-data.html │ ├── header │ │ ├── alert.html │ │ └── header.html │ └── footer │ │ ├── footer.html │ │ └── script-footer.html ├── shortcodes │ ├── details.html │ ├── email.html │ ├── mermaid.html │ ├── video.html │ └── alert.html ├── 404.html ├── blog │ ├── single.html │ └── list.html ├── index.redirects ├── contributors │ └── list.html ├── book │ ├── list.html │ └── single.html ├── docs │ ├── list.html │ └── single.html ├── index.headers ├── sitemap.xml ├── rss.xml └── index.html ├── .editorconfig ├── .markdownlint-cli2.jsonc ├── functions └── hi-from-lambda.js ├── babel.config.js ├── theme.toml ├── .eslintrc.json ├── LICENSE ├── .github └── workflows │ └── gh-pages.yml ├── .stylelintrc.json ├── data └── docs-versions.yml └── package.json /README.md: -------------------------------------------------------------------------------- 1 | BUIDL -------------------------------------------------------------------------------- /assets/js/app.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/js/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/scss/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/css/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/fonts/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/js/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/images/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/js/lazysizes.js: -------------------------------------------------------------------------------- 1 | import 'lazysizes'; 2 | -------------------------------------------------------------------------------- /config/next/config.toml: -------------------------------------------------------------------------------- 1 | canonifyURLs = false 2 | -------------------------------------------------------------------------------- /assets/js/instant.page.js: -------------------------------------------------------------------------------- 1 | import 'instant.page'; 2 | -------------------------------------------------------------------------------- /config/production/config.toml: -------------------------------------------------------------------------------- 1 | canonifyURLs = false -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | [get-started] 2 | other = "Get Started" -------------------------------------------------------------------------------- /i18n/nl.toml: -------------------------------------------------------------------------------- 1 | [get-started] 2 | other = "Aan de slag" -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 2022/06/15 - v0.0.1 4 | 5 | - Initial release -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/images/tn.png -------------------------------------------------------------------------------- /static/doks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/doks.png -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | assets/js/index.js 2 | assets/js/katex.js 3 | assets/js/vendor 4 | node_modules -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | assets/scss/components/_syntax.scss 2 | assets/scss/vendor 3 | node_modules -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | public 3 | resources 4 | .netlify 5 | .hugo_build.lock 6 | .DS_Store -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/logo-doks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/logo-doks.png -------------------------------------------------------------------------------- /assets/scss/components/_tables.scss: -------------------------------------------------------------------------------- 1 | table { 2 | @extend .table; 3 | 4 | margin: 3rem 0; 5 | } 6 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /content/en/book/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/content/en/book/.DS_Store -------------------------------------------------------------------------------- /static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/favicon-32x32.png -------------------------------------------------------------------------------- /static/videos/flower.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/videos/flower.mp4 -------------------------------------------------------------------------------- /static/videos/flower.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/videos/flower.webm -------------------------------------------------------------------------------- /static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/apple-touch-icon.png -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap/dist/js/bootstrap.bundle.min.js' 2 | // import 'bootstrap/dist/js/bootstrap.min.js' 3 | -------------------------------------------------------------------------------- /static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/android-chrome-512x512.png -------------------------------------------------------------------------------- /static/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /static/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /static/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-500.woff -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-700.woff -------------------------------------------------------------------------------- /assets/scss/components/_mermaid.scss: -------------------------------------------------------------------------------- 1 | .mermaid { 2 | margin: 1.5rem 0; 3 | padding: 1.5rem; 4 | } 5 | 6 | .mermaid svg { 7 | height: auto; 8 | } 9 | -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-500.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-700.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-italic.woff -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-italic.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-regular.woff -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-regular.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-500italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-500italic.woff -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-500italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-500italic.woff2 -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-700italic.woff -------------------------------------------------------------------------------- /static/fonts/vendor/jost/jost-v4-latin-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forrestchang/readbuidl/HEAD/static/fonts/vendor/jost/jost-v4-latin-700italic.woff2 -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: "" 4 | date: {{ .Date }} 5 | lastmod: {{ .Date }} 6 | draft: true 7 | images: [] 8 | --- 9 | -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | {{ if eq (hugo.Environment) "production" -}} 3 | Allow: / 4 | {{ else -}} 5 | Disallow: / 6 | {{ end }} 7 | Sitemap: {{ "sitemap.xml" | absURL -}} 8 | -------------------------------------------------------------------------------- /assets/js/alert-init.js: -------------------------------------------------------------------------------- 1 | Object.keys(localStorage).forEach(function(key) { 2 | if (/^global-alert-/.test(key)) { 3 | document.documentElement.setAttribute('data-global-alert', 'closed'); 4 | } 5 | }); -------------------------------------------------------------------------------- /layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{ .Text | safeHTML }} 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true -------------------------------------------------------------------------------- /layouts/partials/sidebar/docs-toc.html: -------------------------------------------------------------------------------- 1 | {{ if and (ne .Params.toc false) (ne .TableOfContents "") -}} 2 | 6 | {{ end -}} 7 | -------------------------------------------------------------------------------- /content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : "一周学会 Web 3 开发" 3 | description: "写给 Web 2 从业者的 Web 3 开发指南" 4 | lead: "写给 Web 2 从业者的 Web 3 开发指南" 5 | date: 2022-06-15T08:47:36+00:00 6 | lastmod: 2020-06-15T08:47:36+00:00 7 | draft: false 8 | images: [] 9 | --- 10 | -------------------------------------------------------------------------------- /layouts/partials/main/date.html: -------------------------------------------------------------------------------- 1 | 5 | {{ $format := default "January 2, 2006" .Format -}} 6 | {{ return (.Date.Format $format) -}} -------------------------------------------------------------------------------- /archetypes/blog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: "" 4 | lead: "" 5 | date: {{ .Date }} 6 | lastmod: {{ .Date }} 7 | draft: true 8 | weight: 50 9 | images: ["{{ .Name | urlize }}.jpg"] 10 | contributors: [] 11 | --- 12 | -------------------------------------------------------------------------------- /.markdownlint-cli2.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "default": true, 4 | "MD013": false, 5 | "MD024": false, 6 | "MD026": false, 7 | "MD033": false, 8 | "MD034": false 9 | }, 10 | "ignores": ["node_modules", "CHANGELOG.md", "README.md"] 11 | } -------------------------------------------------------------------------------- /content/en/book/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Book" 3 | description: "" 4 | lead: "" 5 | date: 2022-06-17T12:37:41+08:00 6 | lastmod: 2022-06-17T12:37:41+08:00 7 | draft: false 8 | images: [] 9 | menu: 10 | docs: 11 | parent: "" 12 | weight: 999 13 | toc: true 14 | --- 15 | -------------------------------------------------------------------------------- /archetypes/book.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: "" 4 | lead: "" 5 | date: {{ .Date }} 6 | lastmod: {{ .Date }} 7 | draft: false 8 | images: [] 9 | menu: 10 | book: 11 | parent: "" 12 | weight: 999 13 | toc: true 14 | --- 15 | 16 | WIP -------------------------------------------------------------------------------- /archetypes/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | description: "" 4 | lead: "" 5 | date: {{ .Date }} 6 | lastmod: {{ .Date }} 7 | draft: true 8 | images: [] 9 | menu: 10 | docs: 11 | parent: "" 12 | weight: 999 13 | toc: true 14 | --- 15 | 16 | WIP -------------------------------------------------------------------------------- /content/en/book/introduction/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "介绍" 3 | description: "" 4 | lead: "" 5 | date: 2022-06-17T12:38:17+08:00 6 | lastmod: 2022-06-17T12:38:17+08:00 7 | draft: false 8 | images: [] 9 | menu: 10 | book: 11 | parent: "" 12 | weight: 999 13 | toc: true 14 | --- -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

{{ .Title }}

6 | {{ .Content }} 7 |
8 |
9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /layouts/_default/index.json: -------------------------------------------------------------------------------- 1 | {{- $.Scratch.Add "index" slice -}} 2 | {{- range .Site.RegularPages -}} 3 | {{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "RelPermalink" .RelPermalink) -}} 4 | {{- end -}} 5 | {{- $.Scratch.Get "index" | jsonify -}} -------------------------------------------------------------------------------- /static/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"Doks Theme","short_name":"Doks","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#fff","background_color":"#fff","display":"standalone"} -------------------------------------------------------------------------------- /layouts/_default/index.js: -------------------------------------------------------------------------------- 1 | var docs = [ 2 | {{ range $index, $page := (where .Site.Pages "Section" "docs") -}} 3 | { 4 | id: {{ $index }}, 5 | title: "{{ .Title }}", 6 | description: "{{ .Params.description }}", 7 | href: "{{ .URL | relURL }}" 8 | }, 9 | {{ end -}} 10 | ]; -------------------------------------------------------------------------------- /layouts/partials/main/breadcrumb.html: -------------------------------------------------------------------------------- 1 | {{ with .Parent -}} 2 | {{ partial "main/breadcrumb.html" . -}} 3 | 4 | {{ end -}} -------------------------------------------------------------------------------- /functions/hi-from-lambda.js: -------------------------------------------------------------------------------- 1 | exports.handler = (event, context, callback) => { 2 | callback (null, { 3 | statusCode: 200, 4 | headers: { 5 | 'Content-Type': 'application/json', 6 | }, 7 | body: JSON.stringify({ 8 | message: 'Hi from Lambda.', 9 | }), 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /layouts/shortcodes/details.html: -------------------------------------------------------------------------------- 1 | 2 | {{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}} 3 | {{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}} 4 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

Page not found :(

6 |

The page you are looking for doesn't exist or has been moved.

7 |
8 |
9 |
10 | {{ end }} -------------------------------------------------------------------------------- /assets/js/katex.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | renderMathInElement(document.body, { 3 | delimiters: [ 4 | {left: '$$', right: '$$', display: true}, 5 | {left: '$', right: '$', display: false}, 6 | {left: '\\(', right: '\\)', display: false}, 7 | {left: '\\[', right: '\\]', display: true}, 8 | ], 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /layouts/shortcodes/email.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ if .Page.Params.mermaid -}} 2 |
3 | {{ $data := replaceRE "(^\\s+```)" "" .Inner -}} 4 | {{ replaceRE "(```\\s+$)" "" $data -}} 5 |
6 | {{ else -}} 7 | {{ errorf "Failed to process mermaid shortcode: %s. Set mermaid to true in page front matter." .Position }} 8 | {{ end -}} 9 | -------------------------------------------------------------------------------- /assets/scss/components/_forms.scss: -------------------------------------------------------------------------------- 1 | /** Search form */ 2 | .search-form { 3 | @extend .form-inline !optional; 4 | } 5 | 6 | .search-form label { 7 | @extend .form-group; 8 | 9 | font-weight: normal; 10 | } 11 | 12 | .search-form .search-field { 13 | @extend .form-control; 14 | } 15 | 16 | .search-form .search-submit { 17 | @extend .btn; 18 | @extend .btn-secondary; 19 | } 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [ 4 | '@babel/preset-env', 5 | { 6 | targets: { 7 | browsers: [ 8 | // Best practice: https://github.com/babel/babel/issues/7789 9 | '>=1%', 10 | 'not ie 11', 11 | 'not op_mini all' 12 | ] 13 | } 14 | } 15 | ] 16 | ] 17 | }; -------------------------------------------------------------------------------- /content/en/book/introduction/about_author.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "关于作者" 3 | description: "" 4 | lead: "" 5 | date: 2022-06-17T14:58:10+08:00 6 | lastmod: 2022-06-17T14:58:10+08:00 7 | draft: false 8 | images: [] 9 | menu: 10 | book: 11 | parent: "" 12 | weight: 20 13 | toc: true 14 | --- 15 | 16 | - Twitter: [https://twitter.com/tisoga](https://twitter.com/tisoga) 17 | - 前互联网大厂程序员,拥有多年的 Web 2 开发经验 -------------------------------------------------------------------------------- /assets/scss/layouts/_footer.scss: -------------------------------------------------------------------------------- 1 | .footer { 2 | border-top: 1px solid $gray-200; 3 | padding-top: 1.125rem; 4 | padding-bottom: 1.125rem; 5 | } 6 | 7 | .footer ul { 8 | margin-bottom: 0; 9 | } 10 | 11 | .footer li { 12 | font-size: $font-size-sm; 13 | margin-bottom: 0; 14 | } 15 | 16 | @include media-breakpoint-up(md) { 17 | .footer li { 18 | font-size: $font-size-base; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | {{ range .Paginator.Pages }} 5 | 9 | {{ end }} 10 | {{ template "_internal/pagination.html" . }} 11 |
12 |
13 | {{ end }} -------------------------------------------------------------------------------- /layouts/blog/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |
6 |

{{ .Title }}

7 | {{ partial "main/blog-meta.html" . }} 8 |
9 |

{{ .Params.lead | safeHTML }}

10 | {{ .Content }} 11 |
12 |
13 |
14 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/head/script-header.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.options.darkMode -}} 2 | {{ $darkModeInit := resources.Get "js/darkmode-init.js" | js.Build | minify -}} 3 | 4 | {{ end -}} 5 | {{- if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}} 6 | {{ $alertInit := resources.Get "js/alert-init.js" | js.Build | minify -}} 7 | 8 | {{- end -}} -------------------------------------------------------------------------------- /layouts/partials/head/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/js/mermaid.js: -------------------------------------------------------------------------------- 1 | import mermaid from 'mermaid'; 2 | 3 | var config = { 4 | theme: 'default', 5 | fontFamily: '"Jost", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";', 6 | }; 7 | 8 | document.addEventListener('DOMContentLoaded', () => { 9 | mermaid.initialize(config); 10 | mermaid.init(undefined, '.language-mermaid'); 11 | }); 12 | -------------------------------------------------------------------------------- /layouts/shortcodes/video.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{ with .Get "webm-src" -}} 4 | 5 | {{ end -}} 6 | {{ with .Get "mp4-src" -}} 7 | 8 | {{ end -}} 9 | Sorry, your browser doesn't support embedded videos. 10 | 11 |
12 | -------------------------------------------------------------------------------- /assets/js/scroll-lock.js: -------------------------------------------------------------------------------- 1 | // Adds scroll position lock for default docs sidebar 2 | 3 | if (document.querySelector('#sidebar-default') !== null) { 4 | let sidebar = document.getElementById('sidebar-default'); 5 | 6 | let pos = sessionStorage.getItem('sidebar-scroll'); 7 | if (pos !== null) { 8 | sidebar.scrollTop = parseInt(pos, 10); 9 | } 10 | 11 | window.addEventListener('beforeunload', () => { 12 | sessionStorage.setItem('sidebar-scroll', sidebar.scrollTop); 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /layouts/partials/main/blog-meta.html: -------------------------------------------------------------------------------- 1 | {{ $last := sub (len .Params.contributors) 1 }} 2 |

Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read

3 | -------------------------------------------------------------------------------- /layouts/shortcodes/alert.html: -------------------------------------------------------------------------------- 1 |

13 | -------------------------------------------------------------------------------- /layouts/partials/header/alert.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.alertDismissable -}} 2 | 6 | {{ else -}} 7 | 10 | {{ end -}} -------------------------------------------------------------------------------- /assets/js/alert.js: -------------------------------------------------------------------------------- 1 | var announcement = document.getElementById('announcement'); 2 | 3 | if (announcement !== null) { 4 | 5 | var id = announcement.dataset.id; 6 | 7 | Object.keys(localStorage).forEach(function(key) { 8 | if (/^global-alert-/.test(key)) { 9 | if (key !== id ) { 10 | localStorage.removeItem(key); 11 | document.documentElement.removeAttribute('data-global-alert'); 12 | } 13 | } 14 | }); 15 | 16 | announcement.addEventListener('closed.bs.alert', () => { 17 | localStorage.setItem(id, 'closed'); 18 | }); 19 | 20 | } -------------------------------------------------------------------------------- /layouts/index.redirects: -------------------------------------------------------------------------------- 1 | {{- range $p := .Site.Pages -}} 2 | {{- range .Aliases }} 3 | {{ . }} {{ $p.RelPermalink -}} 4 | {{- end }} 5 | {{- end -}} 6 | 7 | # /docs/1.0/prologue/ /docs/1.0/prologue/introduction/ 8 | # /docs/1.0/help/ /docs/1.0/help/how-to-update/ 9 | # /docs/1.0/ /docs/1.0/prologue/introduction/ 10 | # /docs/ /docs/1.0/prologue/introduction/ 11 | # 12 | # /docs/0.1/* https://v0-1-0--doks-versioning-poc.netlify.app/docs/0.1/:splat 200 13 | # /docs/0.2/* https://v0-2-0--doks-versioning-poc.netlify.app/docs/0.2/:splat 200 14 | -------------------------------------------------------------------------------- /assets/scss/layouts/_posts.scss: -------------------------------------------------------------------------------- 1 | .home .card, 2 | .contributors.list .card, 3 | .blog.list .card { 4 | margin-top: 2rem; 5 | margin-bottom: 2rem; 6 | transition: transform 0.3s; 7 | } 8 | 9 | .home .card:hover, 10 | .contributors.list .card:hover, 11 | .blog.list .card:hover { 12 | transform: scale(1.025); 13 | } 14 | 15 | .home .card-body, 16 | .contributors.list .card-body, 17 | .blog.list .card-body { 18 | padding: 0 2rem 1rem; 19 | } 20 | 21 | .blog-header { 22 | text-align: center; 23 | margin-bottom: 2rem; 24 | } 25 | 26 | .blog-footer { 27 | text-align: center; 28 | } 29 | -------------------------------------------------------------------------------- /assets/js/darkmode-init.js: -------------------------------------------------------------------------------- 1 | const globalDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; 2 | const localMode = localStorage.getItem('theme'); 3 | 4 | if (globalDark && (localMode === null)) { 5 | 6 | localStorage.setItem('theme', 'dark'); 7 | document.documentElement.setAttribute('data-dark-mode', ''); 8 | 9 | } 10 | 11 | if (globalDark && (localMode === 'dark')) { 12 | 13 | document.documentElement.setAttribute('data-dark-mode', ''); 14 | 15 | } 16 | 17 | if (localMode === 'dark') { 18 | 19 | document.documentElement.setAttribute('data-dark-mode', ''); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /layouts/partials/head/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ block "head/resource-hints" . }}{{ partial "head/resource-hints.html" . }}{{ end }} 6 | {{ block "head/script-header" . }}{{ partial "head/script-header.html" . }}{{ end }} 7 | {{ block "head/stylesheet" . }}{{ partial "head/stylesheet.html" . }}{{ end }} 8 | {{ block "head/seo" . }}{{ partial "head/seo.html" . }}{{ end }} 9 | {{ block "head/favicons" . }}{{ partial "head/favicons.html" . }}{{ end }} 10 | -------------------------------------------------------------------------------- /assets/scss/components/_comments.scss: -------------------------------------------------------------------------------- 1 | .comment-list { 2 | @extend .list-unstyled; 3 | } 4 | 5 | .comment-list ol { 6 | list-style: none; 7 | } 8 | 9 | .comment-form p { 10 | @extend .form-group !optional; 11 | } 12 | 13 | .comment-form input[type="text"], 14 | .comment-form input[type="email"], 15 | .comment-form input[type="url"], 16 | .comment-form textarea { 17 | @extend .form-control; 18 | } 19 | 20 | .comment-form input[type="submit"] { 21 | @extend .btn; 22 | @extend .btn-secondary; 23 | } 24 | 25 | blockquote { 26 | margin-bottom: 1rem; 27 | font-size: 1.25rem; 28 | border-left: 3px solid $gray-300; 29 | padding-left: 1rem; 30 | } 31 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/docs-menu.html: -------------------------------------------------------------------------------- 1 | {{ if and .Site.Params.menu.section.auto .Site.Params.menu.section.collapsibleSidebar -}} 2 | {{ partial "sidebar/auto-collapsible-menu.html" . -}} 3 | {{ else if and .Site.Params.menu.section.auto (not .Site.Params.menu.section.collapsibleSidebar) -}} 4 | {{ partial "sidebar/auto-default-menu.html" . -}} 5 | {{ else if and (not .Site.Params.menu.section.auto) .Site.Params.menu.section.collapsibleSidebar -}} 6 | {{ partial "sidebar/manual-collapsible-menu.html" . -}} 7 | {{ else if and (not .Site.Params.menu.section.auto) (not .Site.Params.menu.section.collapsibleSidebar) -}} 8 | {{ partial "sidebar/manual-default-menu.html" . -}} 9 | {{ end -}} -------------------------------------------------------------------------------- /config/_default/markup.toml: -------------------------------------------------------------------------------- 1 | defaultMarkdownHandler = "goldmark" 2 | 3 | [goldmark] 4 | [goldmark.extensions] 5 | linkify = false 6 | [goldmark.parser] 7 | autoHeadingID = true 8 | autoHeadingIDType = "github" 9 | [goldmark.parser.attribute] 10 | block = true 11 | title = true 12 | [goldmark.renderer] 13 | unsafe = true 14 | 15 | [highlight] 16 | codeFences = false 17 | guessSyntax = false 18 | hl_Lines = "" 19 | lineNoStart = 1 20 | lineNos = false 21 | lineNumbersInTable = true 22 | noClasses = false 23 | style = "dracula" 24 | tabWidth = 4 25 | 26 | [tableOfContents] 27 | endLevel = 3 28 | ordered = false 29 | startLevel = 2 30 | -------------------------------------------------------------------------------- /layouts/partials/head/resource-hints.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ if .Site.Params.options.kaTex -}} 5 | 6 | 7 | {{ end -}} -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "Doks" 2 | license = "MIT" 3 | licenselink = "https://github.com/h-enk/doks/blob/master/LICENSE" 4 | description = "Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default." 5 | 6 | homepage = "https://github.com/h-enk/doks" 7 | demosite = "https://doks.netlify.app" 8 | 9 | tags = ["landing page", "documentation", "blog", "minimal", "modern", "customizable", "search", "dark mode", "bootstrap"] 10 | features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "dark mode"] 11 | 12 | [author] 13 | name = "Henk Verlinde" 14 | homepage = "https://henkverlinde.com" 15 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "commonjs": true, 5 | "es6": true, 6 | "node": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "globals": { 10 | "Atomics": "readonly", 11 | "SharedArrayBuffer": "readonly" 12 | }, 13 | "parserOptions": { 14 | "ecmaVersion": 2018, 15 | "sourceType": "module" 16 | }, 17 | "rules": { 18 | "no-console": 0, 19 | "quotes": ["error", "single"], 20 | "comma-dangle": [ 21 | "error", 22 | { 23 | "arrays": "always-multiline", 24 | "objects": "always-multiline", 25 | "imports": "always-multiline", 26 | "exports": "always-multiline", 27 | "functions": "ignore" 28 | } 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /layouts/partials/footer/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/main/docs-navigation.html: -------------------------------------------------------------------------------- 1 | {{ if or .Prev .Next -}} 2 |
3 | 4 | {{ $pages := where site.RegularPages "Section" .Section -}} 5 | {{ with $pages.Next . -}} 6 | 7 |
8 |
9 | ← {{ .Title }} 10 |
11 |
12 |
13 | {{ end -}} 14 | {{ with $pages.Prev . -}} 15 | 16 |
17 |
18 | {{ .Title }} → 19 |
20 |
21 |
22 | {{ end -}} 23 |
24 | {{ end -}} -------------------------------------------------------------------------------- /layouts/contributors/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

{{ .Title }}

6 |
{{ .Content }}
7 |
8 | {{ range .Data.Pages -}} 9 |
10 |
11 |

{{ .Params.title }}

12 | {{ if eq .Section "blog" -}} 13 |

{{ .Params.lead | safeHTML }}

14 | {{ partial "main/blog-meta.html" . -}} 15 | {{ end -}} 16 |
17 |
18 | {{ end -}} 19 |
20 |
21 |
22 |
23 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/head/stylesheet.html: -------------------------------------------------------------------------------- 1 | {{ if eq (hugo.Environment) "development" -}} 2 | {{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} 3 | {{ $css := resources.Get "scss/app.scss" | toCSS $options -}} 4 | 5 | {{ else -}} 6 | {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}} 7 | {{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}} 8 | {{ $secureCSS := $css | resources.Fingerprint "sha512" -}} 9 | 10 | {{ end -}} 11 | -------------------------------------------------------------------------------- /layouts/blog/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

{{ .Title }}

6 |
{{ .Content }}
7 |
8 | {{ $paginator := .Paginate (.Data.Pages) -}} 9 | {{ range $paginator.Pages -}} 10 |
11 |
12 |

{{ .Params.title }}

13 |

{{ .Params.lead | safeHTML }}

14 | {{ partial "main/blog-meta.html" . -}} 15 |
16 |
17 | {{ end -}} 18 | {{ $.Scratch.Set "paginator" true }} 19 | {{ template "_internal/pagination.html" . }} 20 |
21 |
22 |
23 |
24 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/main/last-modified.html: -------------------------------------------------------------------------------- 1 | {{ if and .GitInfo .Site.Params.docsRepo -}} 2 | {{- $date := partial "main/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} 3 | {{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} 4 |
5 | 6 | 7 | Last modified on {{ $date }} 8 | 9 |
10 | {{ end -}} -------------------------------------------------------------------------------- /layouts/book/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}

6 |
{{ .Content }}
7 |
8 | {{ $currentSection := .CurrentSection }} 9 | {{ range where .Site.RegularPages.ByTitle "Section" .Section }} 10 | {{ if in (.RelPermalink | string) $currentSection.RelPermalink }} 11 |
12 | 15 |
16 | {{ end }} 17 | {{ end }} 18 |
19 |
20 |
21 |
22 | {{ end }} -------------------------------------------------------------------------------- /layouts/docs/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 |

{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}

6 |
{{ .Content }}
7 |
8 | {{ $currentSection := .CurrentSection }} 9 | {{ range where .Site.RegularPages.ByTitle "Section" .Section }} 10 | {{ if in (.RelPermalink | string) $currentSection.RelPermalink }} 11 |
12 | 15 |
16 | {{ end }} 17 | {{ end }} 18 |
19 |
20 |
21 |
22 | {{ end }} -------------------------------------------------------------------------------- /assets/scss/components/_images.scss: -------------------------------------------------------------------------------- 1 | figure { 2 | margin: 2rem 0; 3 | } 4 | 5 | .figure-caption { 6 | margin: 0.25rem 0 0.75rem; 7 | } 8 | 9 | figure.wide { 10 | margin: 2rem -1.5rem; 11 | } 12 | 13 | figure.wide .figure-caption { 14 | margin: 0.25rem 1.5rem 0.75rem; 15 | } 16 | 17 | @include media-breakpoint-up(md) { 18 | figure.wide { 19 | margin: 2rem -2.5rem; 20 | } 21 | 22 | figure.wide .figure-caption { 23 | margin: 0.25rem 2.5rem 0.75rem; 24 | } 25 | } 26 | 27 | @include media-breakpoint-up(lg) { 28 | figure.wide { 29 | margin: 2rem -5rem; 30 | } 31 | 32 | figure.wide .figure-caption { 33 | margin: 0.25rem 5rem 0.75rem; 34 | } 35 | } 36 | 37 | .blur-up { 38 | filter: blur(5px); 39 | } 40 | 41 | .blur-up.lazyloaded { 42 | filter: unset; 43 | } 44 | 45 | .img-simple { 46 | margin-top: 0.375rem; 47 | margin-bottom: 1.25rem; 48 | } 49 | -------------------------------------------------------------------------------- /layouts/index.headers: -------------------------------------------------------------------------------- 1 | /* 2 | Strict-Transport-Security: max-age=31536000; includeSubDomains; preload 3 | X-Content-Type-Options: nosniff 4 | X-XSS-Protection: 1; mode=block 5 | Content-Security-Policy: default-src 'self'; frame-ancestors https://jamstackthemes.dev; manifest-src 'self' https://*.netlify.app; connect-src 'self' https://*.netlify.app; font-src 'self' https://*.netlify.app; img-src 'self' https://*.netlify.app data:; script-src 'self' https://*.netlify.app 'sha512-RBYr6Ld4w1yVqaACrgrBLQfPgGhj/1jyacA74WxJ1KM6KVcSWymwrdDwb3HDcdpwiNJ5yssot1He0U9vXoQVlg==' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk=' 'sha256-vOgyKS2vkH4n5TxBJpeh9SgzrE6LVGsAeOAvEST6oCc='; style-src 'self' https://*.netlify.app 'unsafe-inline' 6 | X-Frame-Options: SAMEORIGIN 7 | Referrer-Policy: strict-origin 8 | Feature-Policy: geolocation 'self' 9 | Cache-Control: public, max-age=31536000 10 | Access-Control-Allow-Origin: * -------------------------------------------------------------------------------- /static/doks.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/logo-doks.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/js/clipboard.js: -------------------------------------------------------------------------------- 1 | import Clipboard from 'clipboard'; 2 | 3 | var pre = document.getElementsByTagName('pre'); 4 | 5 | for (var i = 0; i < pre.length; ++ i) 6 | { 7 | var element = pre[i]; 8 | var mermaid = element.getElementsByClassName('language-mermaid')[0]; 9 | 10 | if (mermaid == null) { 11 | element.insertAdjacentHTML('afterbegin', ''); 12 | } 13 | } 14 | 15 | var clipboard = new Clipboard('.btn-copy', { 16 | 17 | target: function(trigger) { 18 | return trigger.nextElementSibling; 19 | }, 20 | 21 | }); 22 | 23 | clipboard.on('success', function(e) { 24 | 25 | /* 26 | console.info('Action:', e.action); 27 | console.info('Text:', e.text); 28 | console.info('Trigger:', e.trigger); 29 | */ 30 | 31 | e.clearSelection(); 32 | }); 33 | 34 | clipboard.on('error', function(e) { 35 | console.error('Action:', e.action); 36 | console.error('Trigger:', e.trigger); 37 | }); 38 | -------------------------------------------------------------------------------- /assets/js/highlight.js: -------------------------------------------------------------------------------- 1 | import hljs from 'highlight.js/lib/core'; 2 | 3 | import javascript from 'highlight.js/lib/languages/javascript'; 4 | import json from 'highlight.js/lib/languages/json'; 5 | import bash from 'highlight.js/lib/languages/bash'; 6 | import xml from 'highlight.js/lib/languages/xml'; 7 | import ini from 'highlight.js/lib/languages/ini'; 8 | import yaml from 'highlight.js/lib/languages/yaml'; 9 | import markdown from 'highlight.js/lib/languages/markdown'; 10 | 11 | hljs.registerLanguage('javascript', javascript); 12 | hljs.registerLanguage('json', json); 13 | hljs.registerLanguage('bash', bash); 14 | hljs.registerLanguage('html', xml); 15 | hljs.registerLanguage('ini', ini); 16 | hljs.registerLanguage('toml', ini); 17 | hljs.registerLanguage('yaml', yaml); 18 | hljs.registerLanguage('md', markdown); 19 | 20 | document.addEventListener('DOMContentLoaded', () => { 21 | document.querySelectorAll('pre code:not(.language-mermaid)').forEach((block) => { 22 | hljs.highlightElement(block); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /assets/scss/app.scss: -------------------------------------------------------------------------------- 1 | /** Import Bootstrap functions */ 2 | @import "bootstrap/scss/functions"; 3 | 4 | /** Import theme variables */ 5 | @import "common/variables"; 6 | 7 | /** Import Bootstrap */ 8 | @import "bootstrap/scss/bootstrap"; 9 | 10 | /** Import highlight.js */ 11 | // @import "highlight.js/scss/github-dark-dimmed"; 12 | 13 | /** Import KaTeX */ 14 | @import "katex/dist/katex"; 15 | 16 | /** Import theme styles */ 17 | @import "common/fonts"; 18 | @import "common/global"; 19 | @import "common/dark"; 20 | @import "components/alerts"; 21 | @import "components/buttons"; 22 | @import "components/code"; 23 | @import "components/details"; 24 | @import "components/syntax"; 25 | @import "components/comments"; 26 | @import "components/forms"; 27 | @import "components/images"; 28 | @import "components/mermaid"; 29 | @import "components/search"; 30 | @import "components/tables"; 31 | @import "layouts/footer"; 32 | @import "layouts/header"; 33 | @import "layouts/pages"; 34 | @import "layouts/posts"; 35 | @import "layouts/sidebar"; 36 | -------------------------------------------------------------------------------- /assets/js/darkmode.js: -------------------------------------------------------------------------------- 1 | const mode = document.getElementById('mode'); 2 | 3 | if (mode !== null) { 4 | 5 | window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { 6 | 7 | if (event.matches) { 8 | 9 | localStorage.setItem('theme', 'dark'); 10 | document.documentElement.setAttribute('data-dark-mode', ''); 11 | 12 | } else { 13 | 14 | localStorage.setItem('theme', 'light'); 15 | document.documentElement.removeAttribute('data-dark-mode'); 16 | 17 | } 18 | 19 | }) 20 | 21 | mode.addEventListener('click', () => { 22 | 23 | document.documentElement.toggleAttribute('data-dark-mode'); 24 | localStorage.setItem('theme', document.documentElement.hasAttribute('data-dark-mode') ? 'dark' : 'light'); 25 | 26 | }); 27 | 28 | if (localStorage.getItem('theme') === 'dark') { 29 | 30 | document.documentElement.setAttribute('data-dark-mode', ''); 31 | 32 | } else { 33 | 34 | document.documentElement.removeAttribute('data-dark-mode'); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /config/_default/languages.toml: -------------------------------------------------------------------------------- 1 | [en] 2 | languageName = "English" 3 | contentDir = "content/en" 4 | weight = 10 5 | [en.params] 6 | languageISO = "EN" 7 | 8 | [de] 9 | languageName = "German" 10 | contentDir = "content/de" 11 | weight = 15 12 | [de.params] 13 | languageISO = "DE" 14 | 15 | [nl] 16 | languageName = "Nederlands" 17 | contentDir = "content/nl" 18 | weight = 20 19 | [nl.params] 20 | languageISO = "NL" 21 | titleAddition = "Modern documentatie-thema" 22 | description = "Doks is een Hugo-thema waarmee je moderne documentatie-websites kunt bouwen die veilig, snel en klaar voor SEO zijn — standaard." 23 | titleHome = "Doks thema" 24 | footer = "Mogelijk gemaakt door Netlify, Hugo, en Doks" 25 | alertText = "Introductie van het Doks-kinderthema, verschillende DX + UX-updates en meer! Bekijk Doks v0.2" 26 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ partial "head/head.html" . }} 4 | {{ if eq .Kind "home" -}} 5 | {{ .Scratch.Set "class" "home" -}} 6 | {{ else if eq .Kind "404" -}} 7 | {{ .Scratch.Set "class" "error404" -}} 8 | {{ else if eq .Kind "page" -}} 9 | {{ .Scratch.Set "class" .Type -}} 10 | {{ .Scratch.Add "class" " single" -}} 11 | {{ else -}} 12 | {{ .Scratch.Set "class" .Type -}} 13 | {{ .Scratch.Add "class" " list" -}} 14 | {{ end -}} 15 | 16 | {{ partial "header/header.html" . }} 17 |
18 |
19 | {{ block "main" . }}{{ end }} 20 |
21 |
22 | {{ block "sidebar-prefooter" . }}{{ end }} 23 | {{ block "sidebar-footer" . }}{{ end }} 24 | {{ partial "footer/footer.html" . }} 25 | {{ partial "footer/script-footer.html" . }} 26 | 27 | -------------------------------------------------------------------------------- /layouts/sitemap.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 4 | {{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }} 5 | 6 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 7 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 8 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 9 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 10 | {{ end }} 15 | {{ end }} 20 | 21 | {{ end }}{{ end }} 22 | 23 | -------------------------------------------------------------------------------- /layouts/partials/head/twitter_cards.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ with $.Params.images -}} 7 | 8 | {{ else -}} 9 | {{ $images := $.Resources.ByType "image" -}} 10 | {{ $featured := $images.GetMatch "*feature*" -}} 11 | {{ if not $featured -}} 12 | {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" -}} 13 | {{ end -}} 14 | {{ with $featured -}} 15 | 16 | {{ else -}} 17 | {{ with $.Site.Params.images -}} 18 | 19 | {{ else -}} 20 | 21 | {{ end -}} 22 | {{ end -}} 23 | {{ end -}} 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-present, Gridsome 4 | Copyright (c) 2020-present, Henk Verlinde 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /content/en/book/introduction/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "关于本书" 3 | description: "" 4 | lead: "" 5 | date: 2022-06-17T12:39:47+08:00 6 | lastmod: 2022-06-17T12:39:47+08:00 7 | draft: false 8 | images: [] 9 | menu: 10 | book: 11 | parent: "" 12 | weight: 10 13 | toc: true 14 | --- 15 | 16 | > You don't learn, then start. You start, then learn. -- Sahil Lavingia 17 | 18 | 本书的目标读者是具有一定编程经验的 Web 2 开发人员,对于一些需要用到的 Web 2 技术(例如前后端开发、Git 等),本书不会做过多的涉及。 19 | 20 | 以下是本书的草拟大纲,核心的思想是通过 Learning by Doing 的方式来进行学习,从 Day 2 开始就会上手实际写一些代码。 21 | 22 | **Day 1**: 23 | - 目标:学习密码学和区块链的基础知识 24 | - 密码学基础 25 | - 区块链基础 26 | - 比特币协议 27 | 28 | **Day 2**: 29 | - 目标:学习以太坊(Ethereum)与智能合约(Smart Contract)开发 30 | - 以太坊介绍 31 | - Solidity 32 | - 开发环境 33 | 34 | **Day 3**: 35 | - 目标:学习 NFT 生态与开发 36 | - ERC721 37 | - ERC1155 38 | - 项目实战:实现一个 NFT 合约 39 | 40 | **Day 4**: 41 | - 目标:学习 DeFi 生态与开发 42 | - DeFi 生态介绍 43 | - Uniswap 架构与设计分析 44 | - 项目实战:实现一个 DEX(去中心化交易所,Decentralized Exchange) 45 | 46 | **Day 5**: 47 | - 目标:了解多链生态与跨链开发 48 | - 常见公链介绍 49 | - 常见跨链桥介绍 50 | - 项目实战:实现一个 ERC20 跨链桥 51 | 52 | **Day 6**: 53 | - 目标:学习 Web 3 开发中的一些具体最佳实践 54 | - 合约安全 55 | - DAPP 架构设计 56 | - Tokenomics 设计 57 | 58 | **Day 7**: 59 | - 目标:从零实现一个 Social to Earn 项目 60 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - master # Set a branch to deploy 7 | pull_request: 8 | 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-20.04 12 | concurrency: 13 | group: ${{ github.workflow }}-${{ github.ref }} 14 | steps: 15 | - uses: actions/checkout@v3 16 | with: 17 | submodules: true # Fetch Hugo themes (true OR recursive) 18 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 19 | 20 | - name: Setup Hugo 21 | uses: peaceiris/actions-hugo@v2 22 | with: 23 | hugo-version: "latest" 24 | extended: true 25 | 26 | - name: Setup Node 27 | uses: actions/setup-node@v3 28 | with: 29 | node-version: 18 30 | 31 | - name: Install Dependicies 32 | run: npm install 33 | 34 | - name: Build 35 | run: npm run build 36 | 37 | - name: Deploy 38 | uses: peaceiris/actions-gh-pages@v3 39 | if: ${{ github.ref == 'refs/heads/master' }} 40 | with: 41 | github_token: ${{ secrets.GITHUB_TOKEN }} 42 | publish_dir: ./public 43 | cname: readbuidl.xyz 44 | -------------------------------------------------------------------------------- /assets/scss/components/_code.scss: -------------------------------------------------------------------------------- 1 | pre, 2 | code, 3 | kbd, 4 | samp { 5 | font-family: $font-family-monospace; 6 | font-size: $font-size-sm; 7 | border-radius: $border-radius; 8 | } 9 | 10 | code { 11 | background: $beige; 12 | color: $black; 13 | padding: 0.25rem 0.5rem; 14 | } 15 | 16 | pre { 17 | margin: 2rem 0; 18 | } 19 | 20 | pre code { 21 | display: block; 22 | overflow-x: auto; 23 | line-height: $line-height-base; 24 | padding: 1.25rem 1.5rem; 25 | tab-size: 4; 26 | scrollbar-width: thin; 27 | scrollbar-color: transparent transparent; 28 | } 29 | 30 | .hljs { 31 | padding: 1.5rem !important; 32 | } 33 | 34 | @include media-breakpoint-down(sm) { 35 | pre, 36 | code, 37 | kbd, 38 | samp { 39 | border-radius: 0; 40 | } 41 | 42 | pre { 43 | margin: 2rem -1.5rem; 44 | } 45 | } 46 | 47 | pre code::-webkit-scrollbar { 48 | height: 5px; 49 | } 50 | 51 | pre code::-webkit-scrollbar-thumb { 52 | background: $gray-400; 53 | } 54 | 55 | pre code:hover { 56 | scrollbar-width: thin; 57 | scrollbar-color: $gray-500 transparent; 58 | } 59 | 60 | pre code::-webkit-scrollbar-thumb:hover { 61 | background: $gray-500; 62 | } 63 | 64 | code.language-mermaid { 65 | background: none; 66 | } 67 | -------------------------------------------------------------------------------- /assets/scss/layouts/_pages.scss: -------------------------------------------------------------------------------- 1 | .docs-content > h2[id]::before, 2 | .docs-content > h3[id]::before, 3 | .docs-content > h4[id]::before { 4 | display: block; 5 | height: 6rem; 6 | margin-top: -6rem; 7 | content: ""; 8 | } 9 | 10 | .anchor { 11 | visibility: hidden; 12 | } 13 | 14 | h1:hover a, 15 | h2:hover a, 16 | h3:hover a, 17 | h4:hover a { 18 | visibility: visible; 19 | text-decoration: none; 20 | } 21 | 22 | .card-list { 23 | margin-top: 2.25rem; 24 | } 25 | 26 | .page-footer-meta { 27 | margin-top: 3rem; 28 | } 29 | 30 | .edit-page, 31 | .last-modified { 32 | font-size: $font-size-sm; 33 | margin-top: 0.25rem; 34 | margin-bottom: 0.25rem; 35 | } 36 | 37 | @include media-breakpoint-up(md) { 38 | .edit-page, 39 | .last-modified { 40 | font-size: $font-size-base; 41 | margin-top: 0.75rem; 42 | margin-bottom: 0.25rem; 43 | } 44 | } 45 | 46 | .edit-page svg, 47 | .last-modified svg { 48 | margin-right: 0.25rem; 49 | margin-bottom: 0.25rem; 50 | } 51 | 52 | p.meta { 53 | margin-top: 0.5rem; 54 | font-size: $font-size-base; 55 | } 56 | 57 | .breadcrumb { 58 | margin-top: 2.25rem; 59 | font-size: $font-size-base; 60 | } 61 | 62 | .page-link:hover { 63 | text-decoration: none; 64 | } 65 | -------------------------------------------------------------------------------- /config/_default/menus/menus.en.toml: -------------------------------------------------------------------------------- 1 | [[social]] 2 | name = "GitHub" 3 | pre = "" 4 | url = "https://github.com/forrestchang/readbuidl" 5 | post = "v0.1.0" 6 | weight = 10 7 | 8 | [[social]] 9 | name = "Twitter" 10 | pre = "" 11 | url = "https://twitter.com/tisoga" 12 | weight = 20 13 | -------------------------------------------------------------------------------- /layouts/_default/versions.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |

{{ .Title }}

4 |

{{ .Params.lead | safeHTML }}

5 | {{ .Content }} 6 |
7 | {{ range $release := sort (index $.Site.Data "docs-versions") "group" "desc" -}} 8 |
9 |

{{ $release.group }}

10 |

{{ $release.description }}

11 | {{ $versions := sort $release.versions "v" "desc" -}} 12 | {{ range $i, $version := $versions -}} 13 | {{ $len := len $versions -}} 14 | {{ if (eq $i 0) }}{{ end }} 22 | {{ end -}} 23 |
24 | {{ end -}} 25 |
26 |
27 | {{ end }} 28 | -------------------------------------------------------------------------------- /assets/scss/components/_syntax.scss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Based on Ascetic by (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 1.25rem 1.5rem; 11 | background: $beige; 12 | color: $body-color; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: $pink-500; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #888; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | 47 | [data-dark-mode] body .hljs { 48 | background: $body-overlay-dark; 49 | color: $body-color-dark; 50 | } 51 | 52 | [data-dark-mode] body .hljs-string, 53 | [data-dark-mode] body .hljs-variable, 54 | [data-dark-mode] body .hljs-template-variable, 55 | [data-dark-mode] body .hljs-symbol, 56 | [data-dark-mode] body .hljs-bullet, 57 | [data-dark-mode] body .hljs-section, 58 | [data-dark-mode] body .hljs-addition, 59 | [data-dark-mode] body .hljs-attribute, 60 | [data-dark-mode] body .hljs-link { 61 | color: $blue-300; 62 | } 63 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard-scss", 3 | "rules": { 4 | "no-empty-source": null, 5 | "string-quotes": "double", 6 | "scss/comment-no-empty": null, 7 | "max-line-length": null, 8 | "scss/at-extend-no-missing-placeholder": null, 9 | "scss/dollar-variable-colon-space-after": null, 10 | "scss/dollar-variable-empty-line-before": null, 11 | "color-function-notation": null, 12 | "alpha-value-notation": null, 13 | "selector-id-pattern": null, 14 | "selector-class-pattern": null, 15 | "scss/no-global-function-names": null, 16 | "number-max-precision": null, 17 | "hue-degree-notation": null, 18 | "value-no-vendor-prefix": null, 19 | "property-no-vendor-prefix": null, 20 | "at-rule-no-unknown": [ 21 | true, 22 | { 23 | "ignoreAtRules": [ 24 | "extend", 25 | "at-root", 26 | "debug", 27 | "warn", 28 | "error", 29 | "if", 30 | "else", 31 | "for", 32 | "each", 33 | "while", 34 | "mixin", 35 | "include", 36 | "content", 37 | "return", 38 | "function", 39 | "tailwind", 40 | "apply", 41 | "responsive", 42 | "variants", 43 | "screen" 44 | ] 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /config/postcss.config.js: -------------------------------------------------------------------------------- 1 | const autoprefixer = require('autoprefixer'); 2 | const purgecss = require('@fullhuman/postcss-purgecss'); 3 | const whitelister = require('purgecss-whitelister'); 4 | 5 | module.exports = { 6 | plugins: [ 7 | autoprefixer(), 8 | purgecss({ 9 | content: [ 10 | './node_modules/@hyas/doks/layouts/**/*.html', 11 | './node_modules/@hyas/doks/content/**/*.md', 12 | './layouts/**/*.html', 13 | './content/**/*.md', 14 | ], 15 | safelist: [ 16 | 'lazyloaded', 17 | 'table', 18 | 'thead', 19 | 'tbody', 20 | 'tr', 21 | 'th', 22 | 'td', 23 | 'h5', 24 | 'alert-link', 25 | 'container-xxl', 26 | 'container-fluid', 27 | ...whitelister([ 28 | './node_modules/@hyas/doks/assets/scss/common/_variables.scss', 29 | './node_modules/@hyas/doks/assets/scss/components/_alerts.scss', 30 | './node_modules/@hyas/doks/assets/scss/components/_buttons.scss', 31 | './node_modules/@hyas/doks/assets/scss/components/_code.scss', 32 | './node_modules/@hyas/doks/assets/scss/components/_syntax.scss', 33 | './node_modules/@hyas/doks/assets/scss/components/_search.scss', 34 | './node_modules/@hyas/doks/assets/scss/common/_dark.scss', 35 | './node_modules/katex/dist/katex.css', 36 | ]), 37 | ], 38 | }), 39 | ], 40 | } 41 | -------------------------------------------------------------------------------- /layouts/partials/main/edit-page.html: -------------------------------------------------------------------------------- 1 | {{ $parts := slice .Site.Params.docsRepo }} 2 | 3 | {{ if (eq .Site.Params.repoHost "GitHub") }} 4 | {{ $parts = $parts | append "blob" .Site.Params.docsRepoBranch }} 5 | {{ else if (eq .Site.Params.repoHost "Gitea") }} 6 | {{ $parts = $parts | append "_edit" .Site.Params.docsRepoBranch }} 7 | {{ else if (eq .Site.Params.repoHost "GitLab") }} 8 | {{ $parts = $parts | append "-/blob" .Site.Params.docsRepoBranch }} 9 | {{ else if (eq .Site.Params.repoHost "Bitbucket") }} 10 | {{ $parts = $parts | append "src" .Site.Params.docsRepoBranch }} 11 | {{ else if (eq .Site.Params.repoHost "BitbucketServer") }} 12 | {{ $parts = $parts | append "browse" .Site.Params.docsRepoBranch }} 13 | {{ end }} 14 | 15 | {{ if isset .Site.Params "docsreposubpath" }} 16 | {{ if not (eq .Site.Params.docsRepoSubPath "") }} 17 | {{ $parts = $parts | append .Site.Params.docsRepoSubPath }} 18 | {{ end }} 19 | {{ end }} 20 | 21 | {{ $filePath := replace .File.Path "\\" "/" }} 22 | 23 | {{ $parts = $parts | append "content" .Lang $filePath }} 24 | 25 | {{ $url := delimit $parts "/" }} 26 | 27 | 35 | -------------------------------------------------------------------------------- /assets/scss/components/_search.scss: -------------------------------------------------------------------------------- 1 | .navbar-form { 2 | position: relative; 3 | } 4 | 5 | #suggestions { 6 | position: absolute; 7 | left: 0; 8 | margin-top: 0.5rem; 9 | width: calc(100vw - 3rem); 10 | z-index: $zindex-dropdown; 11 | } 12 | 13 | #suggestions a, 14 | .suggestion__no-results { 15 | padding: 0.75rem; 16 | margin: 0 0.5rem; 17 | } 18 | 19 | #suggestions a { 20 | display: block; 21 | text-decoration: none; 22 | } 23 | 24 | #suggestions a:focus { 25 | background: $gray-100; 26 | outline: 0; 27 | } 28 | 29 | #suggestions div:not(:first-child) { 30 | border-top: 1px dashed $gray-200; 31 | } 32 | 33 | #suggestions div:first-child { 34 | margin-top: 0.5rem; 35 | } 36 | 37 | #suggestions div:last-child { 38 | margin-bottom: 0.5rem; 39 | } 40 | 41 | #suggestions a:hover { 42 | background: $gray-100; 43 | } 44 | 45 | #suggestions span { 46 | display: flex; 47 | font-size: $font-size-base; 48 | } 49 | 50 | .suggestion__title { 51 | font-weight: $headings-font-weight; 52 | color: $black; 53 | } 54 | 55 | .suggestion__description, 56 | .suggestion__no-results { 57 | color: $gray-700; 58 | } 59 | 60 | @include media-breakpoint-up(sm) { 61 | #suggestions { 62 | width: 31.125rem; 63 | } 64 | 65 | #suggestions a { 66 | display: flex; 67 | } 68 | 69 | .suggestion__title { 70 | width: 9rem; 71 | padding-right: 1rem; 72 | border-right: 1px solid $gray-200; 73 | display: inline-block; 74 | text-align: right; 75 | } 76 | 77 | .suggestion__description { 78 | width: 19rem; 79 | padding-left: 1rem; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /assets/scss/components/_details.scss: -------------------------------------------------------------------------------- 1 | details { 2 | display: block; 3 | border: 1px solid $gray-200; 4 | border-radius: 0.25rem; 5 | padding: 0.5rem 1rem 0; 6 | margin: 0.5rem 0; 7 | } 8 | 9 | /* 10 | details summary { 11 | &::marker { 12 | content: ""; 13 | } 14 | } 15 | */ 16 | 17 | summary { 18 | list-style: none; 19 | display: inline-block; 20 | width: calc(100% + 2rem); 21 | margin: -0.5rem -1rem 0; 22 | padding: 0.5rem 0.75rem; 23 | } 24 | 25 | summary::-webkit-details-marker { 26 | display: none; 27 | } 28 | 29 | summary:hover { 30 | background: $gray-100; 31 | } 32 | 33 | details summary::before { 34 | display: inline-block; 35 | content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%2829, 45, 53, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); 36 | transition: transform 0.35s ease; 37 | transform-origin: center center; 38 | margin-right: 0.375rem; 39 | } 40 | 41 | details[open] > summary::before { 42 | transform: rotate(90deg); 43 | } 44 | 45 | /* 46 | details summary > * { 47 | display: inline-block; 48 | } 49 | */ 50 | 51 | details[open] { 52 | padding: 0.5rem 1rem; 53 | } 54 | 55 | details[open] > summary { 56 | border-bottom: 1px solid $gray-300; 57 | margin-bottom: 0.5rem; 58 | } 59 | 60 | details h2, 61 | details h3, 62 | details h4 { 63 | margin: 1rem 0 0.5rem; 64 | } 65 | 66 | details p:last-child { 67 | margin-bottom: 0; 68 | } 69 | 70 | details ul, 71 | details ol { 72 | margin-bottom: 0; 73 | } 74 | 75 | details pre { 76 | margin: 0 0 1rem; 77 | } 78 | -------------------------------------------------------------------------------- /data/docs-versions.yml: -------------------------------------------------------------------------------- 1 | # - group: v1.x 2 | # baseurl: "https://getbootstrap.com" 3 | # description: "Every minor and patch release from v1 is listed below." 4 | # versions: 5 | # - v: "1.0.0" 6 | # - v: "1.1.0" 7 | # - v: "1.1.1" 8 | # - v: "1.2.0" 9 | # - v: "1.3.0" 10 | # - v: "1.4.0" 11 | # 12 | # - group: v2.x 13 | # baseurl: "https://getbootstrap.com" 14 | # description: "Every minor and patch release from v2 is listed below." 15 | # versions: 16 | # - v: "2.0.0" 17 | # - v: "2.0.1" 18 | # - v: "2.0.2" 19 | # - v: "2.0.3" 20 | # - v: "2.0.4" 21 | # - v: "2.1.0" 22 | # - v: "2.1.1" 23 | # - v: "2.2.0" 24 | # - v: "2.2.1" 25 | # - v: "2.2.2" 26 | # - v: "2.3.0" 27 | # - v: "2.3.1" 28 | # - v: "2.3.2" 29 | # 30 | # - group: v3.x 31 | # baseurl: "https://getbootstrap.com/docs" 32 | # description: "Every minor and patch release from v3 is listed below. Last update was v3.4.1." 33 | # versions: 34 | # - v: "3.3" 35 | # - v: "3.4" 36 | # 37 | # - group: v4.x 38 | # baseurl: "https://getbootstrap.com/docs" 39 | # description: "Our previous major release with its minor releases. Last update was v4.6.0." 40 | # versions: 41 | # - v: "4.0" 42 | # - v: "4.1" 43 | # - v: "4.2" 44 | # - v: "4.3" 45 | # - v: "4.4" 46 | # - v: "4.5" 47 | # - v: "4.6" 48 | 49 | - group: v0.x 50 | baseurl: "/docs" 51 | description: "Current major release. Last update was v0.2.0." 52 | versions: 53 | - v: "0.1" 54 | - v: "0.2" 55 | 56 | - group: v1.x 57 | baseurl: "/docs" 58 | description: "Every minor and patch release from v1 is listed below. Last update was v1.0.0." 59 | versions: 60 | - v: "1.0" 61 | -------------------------------------------------------------------------------- /layouts/rss.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 3 | 4 | {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} 5 | {{ .Permalink }} 6 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} 7 | Hugo -- gohugo.io{{ with .Site.LanguageCode }} 8 | {{.}}{{end}}{{ with .Site.Author.email }} 9 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} 10 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.copyRight }} 11 | {{ . | safeHTML }}{{end}}{{ if not .Date.IsZero }} 12 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 13 | {{ with .OutputFormats.Get "RSS" }} 14 | {{ printf "" .Permalink .MediaType | safeHTML }} 15 | {{ end }} 16 | {{ range .Pages }}{{ if ne .Params.feed_exclude true }} 17 | 18 | {{ .Title }} 19 | {{ .Permalink }} 20 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 21 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} 22 | {{ .Permalink }} 23 | {{ .Summary | html }} 24 | 25 | {{ end }}{{ end }} 26 | 27 | 28 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ $image := "" -}} 2 | {{ if (urls.Parse .Destination).IsAbs }} 3 | {{ $image = resources.GetRemote .Destination -}} 4 | {{ else -}} 5 | {{ $image = .Page.Resources.GetMatch .Destination -}} 6 | {{ end -}} 7 | {{ with $image -}} 8 | {{ $lqip := $image.Resize site.Params.lqipWidth -}} 9 | 10 | {{ $imgSrc := "" -}} 11 | {{ $imgSrcSet := slice -}} 12 | 13 | {{ $widths := site.Params.landscapePhotoWidths -}} 14 | {{ if gt $image.Height $image.Width -}} 15 | {{ $widths = site.Params.portraitPhotoWidths -}} 16 | {{ end -}} 17 | 18 | {{ range $widths -}} 19 | {{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}} 20 | {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}} 21 | {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}} 22 | {{ end -}} 23 | {{ $imgSrcSet = (delimit $imgSrcSet ",") -}} 24 | 25 | {{ if gt $image.Width site.Params.smallLimit -}} 26 |
27 | {{ $.Text }} 28 | 29 | {{ with $.Title }}
{{ . | safeHTML }}
{{ end -}} 30 |
31 | {{ else -}} 32 | {{ $.Text }} 33 | {{ end -}} 34 | {{ else -}} 35 | {{ erroridf "image-not-found" "Image not found" -}} 36 | {{ end -}} -------------------------------------------------------------------------------- /layouts/partials/head/seo.html: -------------------------------------------------------------------------------- 1 | {{ if eq .Kind "404" -}} 2 | 3 | {{ else -}} 4 | {{ with .Params.robots -}} 5 | 6 | {{ else -}} 7 | 8 | 9 | 10 | {{ end -}} 11 | {{ end -}} 12 | 13 | {{ if .IsHome -}} 14 | {{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }} 15 | {{ else -}} 16 | {{ .Title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.title }} 17 | {{ end -}} 18 | 19 | {{ with .Description -}} 20 | 21 | {{ else -}} 22 | {{ with .Summary | plainify -}} 23 | 24 | {{ else -}} 25 | 26 | {{ end -}} 27 | {{ end -}} 28 | 29 | {{ if $.Scratch.Get "paginator" }} 30 | 31 | {{ if .Paginator.HasPrev -}} 32 | 33 | {{ end -}} 34 | {{ if .Paginator.HasNext -}} 35 | 36 | {{ end -}} 37 | {{ else -}} 38 | 39 | {{ end -}} 40 | 41 | {{ partial "head/opengraph.html" . }} 42 | {{ partial "head/twitter_cards.html" . }} 43 | 44 | {{ range .AlternativeOutputFormats -}} 45 | 46 | {{ end -}} 47 | 48 | {{ partial "head/structured-data.html" . }} 49 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/auto-default-menu.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $currentPage := . -}} 3 | {{ $section := $currentPage.Section -}} 4 | {{ range (where .Site.Sections "Section" "in" $section) }} 5 | {{ range .Sections.ByWeight.Reverse }} 6 | {{ $active := in $currentPage.RelPermalink .RelPermalink }} 7 |

{{ .Title }}

8 | 36 | {{ end }} 37 | {{ end }} 38 | -------------------------------------------------------------------------------- /layouts/book/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | 7 |
8 | {{ if ne .Params.toc false -}} 9 | 12 | {{ end -}} 13 | {{ if .Params.toc -}} 14 |
15 | {{ else -}} 16 |
17 | {{ end -}} 18 | {{ if .Site.Params.options.breadCrumb -}} 19 | 20 | 26 | {{ end }} 27 |

{{ .Title }}

28 |

{{ .Params.lead | safeHTML }}

29 | {{ if ne .Params.toc false -}} 30 | 33 | {{ end -}} 34 | {{ .Content }} 35 | 43 | {{ partial "main/docs-navigation.html" . }} 44 | 51 |
52 |
53 | {{ end }} 54 | -------------------------------------------------------------------------------- /layouts/docs/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | 7 |
8 | {{ if ne .Params.toc false -}} 9 | 12 | {{ end -}} 13 | {{ if .Params.toc -}} 14 |
15 | {{ else -}} 16 |
17 | {{ end -}} 18 | {{ if .Site.Params.options.breadCrumb -}} 19 | 20 | 26 | {{ end }} 27 |

{{ .Title }}

28 |

{{ .Params.lead | safeHTML }}

29 | {{ if ne .Params.toc false -}} 30 | 33 | {{ end -}} 34 | {{ .Content }} 35 | 43 | {{ partial "main/docs-navigation.html" . }} 44 | 51 |
52 |
53 | {{ end }} 54 | -------------------------------------------------------------------------------- /layouts/_default/section.sitemap.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML -}} 2 | 4 | {{ range $i, $e := .Data.Pages -}} 5 | {{ if ne .Params.sitemap_exclude true }} 6 | 7 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 8 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 9 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 10 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 11 | {{ end }} 16 | {{ end }} 21 | 22 | {{ end -}} 23 | {{ end -}} 24 | {{ range .Sections -}} 25 | {{ range $i, $e := .Data.Pages -}} 26 | {{ if ne .Params.sitemap_exclude true -}} 27 | 28 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 29 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 30 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 31 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 32 | {{ end }} 37 | {{ end }} 42 | 43 | {{ end -}} 44 | {{ end -}} 45 | {{ end -}} 46 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/manual-default-menu.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $currentPage := . -}} 3 | {{ $section := $currentPage.Section -}} 4 | {{ range (index .Site.Menus $section) -}} 5 |

{{ .Name }}

6 | {{ if .HasChildren -}} 7 | 40 | {{ end -}} 41 | {{ end -}} 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@hyas/doks", 3 | "description": "Doks theme", 4 | "version": "0.4.3", 5 | "engines": { 6 | "node": ">=16.15.0" 7 | }, 8 | "browserslist": [ 9 | "defaults" 10 | ], 11 | "repository": "https://github.com/h-enk/doks", 12 | "license": "MIT", 13 | "publishConfig": { 14 | "access": "public" 15 | }, 16 | "scripts": { 17 | "init": "shx rm -rf .git && git init -b main", 18 | "create": "exec-bin node_modules/.bin/hugo/hugo new", 19 | "prestart": "npm run clean", 20 | "start": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender", 21 | "prebuild": "npm run clean", 22 | "build": "exec-bin node_modules/.bin/hugo/hugo --gc --minify", 23 | "build:preview": "npm run build -D -F", 24 | "clean": "shx rm -rf public resources", 25 | "clean:install": "shx rm -rf package-lock.json node_modules ", 26 | "lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown", 27 | "lint:scripts": "eslint assets/js config functions", 28 | "lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"", 29 | "lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"", 30 | "lint:markdown-fix": "markdownlint-cli2-fix \"*.md\" \"content/**/*.md\"", 31 | "server": "exec-bin node_modules/.bin/hugo/hugo server", 32 | "test": "npm run -s lint", 33 | "env": "env", 34 | "precheck": "npm version", 35 | "check": "exec-bin node_modules/.bin/hugo/hugo version", 36 | "copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/", 37 | "postinstall": "hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo", 38 | "version": "auto-changelog -p && git add CHANGELOG.md" 39 | }, 40 | "devDependencies": { 41 | "@babel/cli": "^7.17", 42 | "@babel/core": "^7.17", 43 | "@babel/preset-env": "^7.17", 44 | "@fullhuman/postcss-purgecss": "^4.1", 45 | "auto-changelog": "^2.4", 46 | "autoprefixer": "^10.4", 47 | "bootstrap": "^5.1", 48 | "clipboard": "^2.0", 49 | "eslint": "^8.15", 50 | "exec-bin": "^1.0.0", 51 | "flexsearch": "^0.7.21", 52 | "highlight.js": "^11.5", 53 | "hugo-installer": "^3.1", 54 | "instant.page": "^5.1", 55 | "katex": "^0.15", 56 | "lazysizes": "^5.3", 57 | "markdownlint-cli2": "^0.4.0", 58 | "netlify-plugin-submit-sitemap": "^0.3.0", 59 | "node-fetch": "^3.2", 60 | "postcss": "^8.4", 61 | "postcss-cli": "^9.1", 62 | "purgecss-whitelister": "^2.4", 63 | "shx": "^0.3.4", 64 | "stylelint": "^14.8", 65 | "stylelint-config-standard-scss": "^3.0" 66 | }, 67 | "otherDependencies": { 68 | "hugo": "0.99.0" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /assets/scss/layouts/_sidebar.scss: -------------------------------------------------------------------------------- 1 | .docs-links, 2 | .docs-toc { 3 | scrollbar-width: thin; 4 | scrollbar-color: $white $white; 5 | } 6 | 7 | .docs-links::-webkit-scrollbar, 8 | .docs-toc::-webkit-scrollbar { 9 | width: 5px; 10 | } 11 | 12 | .docs-links::-webkit-scrollbar-track, 13 | .docs-toc::-webkit-scrollbar-track { 14 | background: $white; 15 | } 16 | 17 | .docs-links::-webkit-scrollbar-thumb, 18 | .docs-toc::-webkit-scrollbar-thumb { 19 | background: $white; 20 | } 21 | 22 | .docs-links:hover, 23 | .docs-toc:hover { 24 | scrollbar-width: thin; 25 | scrollbar-color: $gray-200 $white; 26 | } 27 | 28 | .docs-links:hover::-webkit-scrollbar-thumb, 29 | .docs-toc:hover::-webkit-scrollbar-thumb { 30 | background: $gray-200; 31 | } 32 | 33 | .docs-links::-webkit-scrollbar-thumb:hover, 34 | .docs-toc::-webkit-scrollbar-thumb:hover { 35 | background: $gray-200; 36 | } 37 | 38 | .docs-links h3, 39 | .page-links h3 { 40 | text-transform: uppercase; 41 | font-size: $font-size-base; 42 | margin: 1.25rem 0 0.5rem; 43 | padding: 1.5rem 0 0; 44 | } 45 | 46 | @include media-breakpoint-up(lg) { 47 | .docs-links h3, 48 | .page-links h3 { 49 | margin: 1.125rem 1.5rem 0.75rem 0; 50 | padding: 1.375rem 0 0; 51 | } 52 | } 53 | 54 | .docs-links h3:not(:first-child) { 55 | border-top: 1px solid $gray-200; 56 | } 57 | 58 | a.docs-link { 59 | color: $body-color; 60 | display: block; 61 | padding: 0.125rem 0; 62 | font-size: $font-size-base; 63 | } 64 | 65 | .page-links li { 66 | margin-top: 0.375rem; 67 | padding-top: 0.375rem; 68 | } 69 | 70 | .page-links li ul li { 71 | border-top: none; 72 | padding-left: 1rem; 73 | margin-top: 0.125rem; 74 | padding-top: 0.125rem; 75 | } 76 | 77 | .page-links li:not(:first-child) { 78 | border-top: 1px dashed $gray-200; 79 | } 80 | 81 | .page-links a { 82 | color: $body-color; 83 | display: block; 84 | padding: 0.125rem 0; 85 | font-size: $font-size-base * 0.9375; 86 | } 87 | 88 | .docs-link:hover, 89 | .docs-link.active, 90 | .page-links a:hover { 91 | text-decoration: none; 92 | color: $link-color; 93 | } 94 | 95 | .nav-link.active, 96 | .dropdown-menu-main .dropdown-item.active, 97 | .docs-link.active { 98 | font-weight: 500; 99 | } 100 | 101 | .docs-links h3.sidebar-link, 102 | .page-links h3.sidebar-link { 103 | text-transform: none; 104 | font-size: $font-size-md; 105 | font-weight: normal; 106 | } 107 | 108 | .docs-links h3.sidebar-link a, 109 | .page-links h3.sidebar-link a { 110 | color: $body-color; 111 | } 112 | 113 | .docs-links h3.sidebar-link a:hover, 114 | .page-links h3.sidebar-link a:hover { 115 | text-decoration: underline; 116 | } 117 | -------------------------------------------------------------------------------- /config/_default/params.toml: -------------------------------------------------------------------------------- 1 | # Meta Data for SEO 2 | 3 | ## Homepage 4 | title = "BUIDL" 5 | titleSeparator = "-" 6 | titleAddition = "一周学会 Web 3 开发" 7 | description = "写给 Web 2 从业者的 Web 3 开发指南" 8 | 9 | ## Documentation 10 | # docsVersion = "0.3" 11 | 12 | ## Open Graph 13 | images = ["doks.png"] 14 | ogLocale = "en_US" 15 | domainTLD = "readbuidl.xyz" 16 | titleHome = "BUIDL" 17 | 18 | ## Twitter Cards 19 | twitterSite = "@tisoga" 20 | twitterCreator = "@tisoga" 21 | 22 | ## JSON-LD 23 | # schemaType = "Person" 24 | schemaType = "Organization" 25 | schemaName = "BUIDL" 26 | schemaAuthor = "Jiayuan" 27 | schemaAuthorTwitter = "https://twitter.com/tisoga" 28 | schemaAuthorLinkedIn = "" 29 | schemaAuthorGitHub = "" 30 | schemaLocale = "en-US" 31 | schemaLogo = "logo-doks.png" 32 | schemaLogoWidth = 512 33 | schemaLogoHeight = 512 34 | schemaImage = "doks.png" 35 | schemaImageWidth = 1280 36 | schemaImageHeight = 640 37 | schemaTwitter = "https://twitter.com/tisoga" 38 | schemaLinkedIn = "" 39 | schemaGitHub = "" 40 | schemaSection = "blog" 41 | 42 | ## Sitelinks Search Box 43 | siteLinksSearchBox = false 44 | 45 | ## Chrome Browser 46 | themeColor = "#fff" 47 | 48 | # Images 49 | quality = 85 50 | bgColor = "#fff" 51 | landscapePhotoWidths = [900, 800, 700, 600, 500] 52 | portraitPhotoWidths = [800, 700, 600, 500] 53 | lqipWidth = "20x" 54 | smallLimit = "300" 55 | 56 | # Footer 57 | footer = "Powered by Hugo, and Doks" 58 | 59 | # Feed 60 | copyRight = "Copyright (c) 2020-2021 Read BUIDL by Jiayuan" 61 | 62 | # Alert 63 | alert = false 64 | alertDismissable = true 65 | # alertText = "Introducing the Doks child theme, several DX + UX updates, and more! Check out Doks v0.2" 66 | alertText = "Introducing the Doks child theme, several DX + UX updates, and more! Check out Doks v0.2" 67 | 68 | # Edit Page 69 | # repoHost [Github | Gitea | GitLab | Bitbucket | BitbucketServer ] is used for building the edit link based on git hoster 70 | repoHost = "GitHub" 71 | #repoHost = "Gitea" 72 | docsRepo = "" # TODO(jiayuan): add this repo 73 | docsRepoBranch = "master" 74 | docsRepoSubPath = "" 75 | editPage = false 76 | lastMod = false 77 | 78 | [options] 79 | lazySizes = true 80 | clipBoard = true 81 | instantPage = true 82 | flexSearch = true 83 | darkMode = true 84 | bootStrapJs = true 85 | breadCrumb = false 86 | highLight = true 87 | kaTex = true 88 | multilingualMode = false 89 | docsVersioning = false 90 | fullWidth = false 91 | 92 | [menu] 93 | [menu.section] 94 | auto = true 95 | collapsibleSidebar = false 96 | -------------------------------------------------------------------------------- /layouts/partials/head/opengraph.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ if $.Scratch.Get "paginator" -}} 6 | {{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}} 7 | 8 | {{ else -}} 9 | 10 | {{ end -}} 11 | {{ with .Site.Params.title -}} 12 | 13 | {{ end -}} 14 | 15 | {{ $iso8601 := "2006-01-02T15:04:05-07:00" -}} 16 | {{ if .IsPage -}} 17 | {{ if not .PublishDate.IsZero -}} 18 | 19 | {{ else if not .Date.IsZero -}} 20 | 21 | {{ end -}} 22 | {{ if not .Lastmod.IsZero -}} 23 | 24 | {{ end -}} 25 | {{ else -}} 26 | {{ if not .Date.IsZero -}} 27 | 28 | {{ end -}} 29 | {{ end -}} 30 | 31 | {{ if eq .Kind "home" -}} 32 | {{ .Scratch.Set "title" .Site.Params.titleHome -}} 33 | {{ else -}} 34 | {{ .Scratch.Set "title" .Title -}} 35 | {{ end -}} 36 | 37 | {{ with $.Params.images -}} 38 | {{ range first 6 . -}} 39 | 40 | {{ end -}} 41 | {{ else -}} 42 | {{ $images := $.Resources.ByType "image" -}} 43 | {{ $featured := $images.GetMatch "*feature*" -}} 44 | {{ if not $featured -}} 45 | {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} 46 | {{ end -}} 47 | {{ with $featured -}} 48 | 49 | {{ else -}} 50 | {{ with $.Site.Params.images -}} 51 | 52 | 53 | {{ end -}} 54 | {{ end -}} 55 | {{ end -}} 56 | 57 | {{ with $.Site.Params.images -}} 58 | {{ $.Scratch.Set "primaryImage" (index . 0 | absURL) -}} 59 | {{ end -}} 60 | 61 | {{ with .Params.audio -}} 62 | 63 | {{ end -}} 64 | 65 | {{ with .Params.videos -}} 66 | {{ range . -}} 67 | 68 | {{ end -}} 69 | {{ end -}} 70 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 9 | 10 |
11 |
12 |
13 |

{{ .Title }}

14 |
15 |
16 |

{{ .Params.lead | safeHTML }}

17 | 阅读 (WIP) 23 | 反馈 30 |
31 |
32 |
33 | {{ end }} {{ define "sidebar-prefooter" }} 34 |
35 |
36 |
37 |
38 |

密码学基础 🔐

39 |

40 | 介绍构成区块链底层的密码学基础知识,哈希算法、对称加密与非对称加密、数字签名等。 41 |

42 |
43 |
44 |

️区块链基础 🧩

45 |

46 | 介绍区块链相关的基础知识,区块链特点、区块链存储结构、点对点网络、钱包原理、共识算法等。 47 |

48 |
49 |
50 |

51 | 以太坊与 Solidity ⚡️ 52 |

53 |

54 | 介绍以 Ethereum 为基础的智能合约开发,Remix、Truffle、Ganache 55 | 等开发工具,Solidity 编程语言,智能合约 的相关概念、部署与发布。 56 |

57 |
58 |
59 |
60 |
61 |

NFT & DeFi 💰

62 |

63 | 介绍基于智能合约的两个最热门的方向,NFT 和 DeFi,解读 ERC721 和 64 | ERC1155 等协议, 分析 DEX Uniswap 65 | 的实现方式,并从零构建一个去中心化的交易所。 66 |

67 |
68 |
69 |

70 | 多链生态 🚀 71 |

72 |

73 | 介绍除 Ethereum 之外的其他几个热门公链,如 Cosmos、BSC 74 | 等,以及涉及到的跨链 技术,各种跨链桥的实现,解读 LayerZero、CCIP 75 | 等跨链协议,并从零构建一个 ERC20 的跨链桥。 76 |

77 |
78 |
79 |

最佳实践 🛠

80 |

81 | 介绍 Web 3 开发中的相关最佳实践,基础设施 Infura、Alchemy、The Graph 等的使用, 82 | DAPP 项目的整体架构等。 83 |

84 |
85 |
86 |
87 |
88 | {{ end }} {{ define "sidebar-footer" }} 89 |
90 |
91 |
{{- .Content -}}
92 |
93 |
94 | {{ end }} 95 | -------------------------------------------------------------------------------- /config/_default/config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "https://readbuidl.xyz/" 2 | canonifyURLs = false 3 | disableAliases = true 4 | disableHugoGeneratorInject = true 5 | enableEmoji = true 6 | enableGitInfo = false 7 | enableRobotsTXT = true 8 | languageCode = "en-US" 9 | paginate = 7 10 | rssLimit = 50 11 | 12 | [author] 13 | name = "Jiayuan" 14 | email = "forrestchang.7@gmail.com" 15 | 16 | # Multilingual 17 | defaultContentLanguage = "en" 18 | disableLanguages = ["de", "nl"] 19 | # defaultContentLanguageInSubdir = true 20 | 21 | # add redirects/headers 22 | [outputs] 23 | home = ["HTML", "RSS", "REDIRECTS", "HEADERS"] 24 | section = ["HTML", "RSS", "SITEMAP"] 25 | 26 | # remove .{ext} from text/netlify 27 | [mediaTypes."text/netlify"] 28 | suffixes = [""] 29 | delimiter = "" 30 | 31 | # add output format for netlify _redirects 32 | [outputFormats.REDIRECTS] 33 | mediaType = "text/netlify" 34 | baseName = "_redirects" 35 | isPlainText = true 36 | notAlternative = true 37 | 38 | # add output format for netlify _headers 39 | [outputFormats.HEADERS] 40 | mediaType = "text/netlify" 41 | baseName = "_headers" 42 | isPlainText = true 43 | notAlternative = true 44 | 45 | # add output format for section sitemap.xml 46 | [outputFormats.SITEMAP] 47 | mediaType = "application/xml" 48 | baseName = "sitemap" 49 | isHTML = false 50 | isPlainText = true 51 | noUgly = true 52 | rel = "sitemap" 53 | 54 | [caches] 55 | [caches.getjson] 56 | dir = ":cacheDir/:project" 57 | maxAge = "10s" 58 | 59 | [sitemap] 60 | changefreq = "weekly" 61 | filename = "sitemap.xml" 62 | priority = 0.5 63 | 64 | [taxonomies] 65 | contributor = "contributors" 66 | 67 | [permalinks] 68 | blog = "/blog/:title/" 69 | # docs = "/docs/1.0/:sections[1:]/:title/" 70 | 71 | [minify.tdewolff.html] 72 | keepWhitespace = false 73 | 74 | [module] 75 | [module.hugoVersion] 76 | extended = true 77 | min = "0.80.0" 78 | max = "" 79 | [[module.mounts]] 80 | source = "node_modules/@hyas/doks/archetypes" 81 | target = "archetypes" 82 | [[module.mounts]] 83 | source = "node_modules/@hyas/doks/assets" 84 | target = "assets" 85 | # [[module.mounts]] 86 | # source = "node_modules/@hyas/doks/content" 87 | # target = "content" 88 | [[module.mounts]] 89 | source = "node_modules/@hyas/doks/data" 90 | target = "data" 91 | [[module.mounts]] 92 | source = "node_modules/@hyas/doks/layouts" 93 | target = "layouts" 94 | [[module.mounts]] 95 | source = "node_modules/@hyas/doks/static" 96 | target = "static" 97 | [[module.mounts]] 98 | source = "node_modules/flexsearch" 99 | target = "assets/js/vendor/flexsearch" 100 | [[module.mounts]] 101 | source = "node_modules/katex" 102 | target = "assets/js/vendor/katex" 103 | [[module.mounts]] 104 | source = "node_modules/mermaid" 105 | target = "assets/js/vendor/mermaid" 106 | [[module.mounts]] 107 | source = "assets" 108 | target = "assets" 109 | [[module.mounts]] 110 | source = "static" 111 | target = "static" 112 | # [[module.mounts]] 113 | # source = "content" 114 | # target = "content" 115 | [[module.mounts]] 116 | source = "layouts" 117 | target = "layouts" 118 | [[module.mounts]] 119 | source = "archetypes" 120 | target = "archetypes" 121 | [[module.mounts]] 122 | source = "data" 123 | target = "data" 124 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/auto-collapsible-menu.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/scss/common/_fonts.scss: -------------------------------------------------------------------------------- 1 | /* jost-regular - latin */ 2 | @font-face { 3 | font-family: Jost; 4 | font-style: normal; 5 | font-weight: 400; 6 | font-display: swap; 7 | src: 8 | // Google Fonts Jost 9 | local("Jost Regular Regular"), // Full Name 10 | local("Jost-Regular"), // PostScript name 11 | // indestructible Jost* 12 | local("Jost* Book"), 13 | local("Jost-Book"), 14 | url("fonts/vendor/jost/jost-v4-latin-regular.woff2") format("woff2"), 15 | url("fonts/vendor/jost/jost-v4-latin-regular.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 16 | } 17 | 18 | /* jost-500 - latin */ 19 | @font-face { 20 | font-family: Jost; 21 | font-style: normal; 22 | font-weight: 500; 23 | font-display: swap; 24 | src: 25 | // Google Fonts Jost 26 | local("Jost Regular Medium"), 27 | local("JostRoman-Medium"), 28 | // indestructible Jost* 29 | local("Jost* Medium"), 30 | local("Jost-Medium"), 31 | url("fonts/vendor/jost/jost-v4-latin-500.woff2") format("woff2"), 32 | url("fonts/vendor/jost/jost-v4-latin-500.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 33 | } 34 | 35 | /* jost-700 - latin */ 36 | @font-face { 37 | font-family: Jost; 38 | font-style: normal; 39 | font-weight: 700; 40 | font-display: swap; 41 | src: 42 | // Google Fonts Jost 43 | local("Jost Regular Bold"), 44 | local("JostRoman-Bold"), 45 | // indestructible Jost* 46 | local("Jost* Bold"), 47 | local("Jost-Bold"), 48 | url("fonts/vendor/jost/jost-v4-latin-700.woff2") format("woff2"), 49 | url("fonts/vendor/jost/jost-v4-latin-700.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 50 | } 51 | 52 | /* jost-italic - latin */ 53 | @font-face { 54 | font-family: Jost; 55 | font-style: italic; 56 | font-weight: 400; 57 | font-display: swap; 58 | src: 59 | // Google Fonts Jost 60 | local("Jost Italic Italic"), 61 | local("Jost-Italic"), 62 | // indestructible Jost* 63 | local("Jost* BookItalic"), 64 | local("Jost-BookItalic"), 65 | url("fonts/vendor/jost/jost-v4-latin-italic.woff2") format("woff2"), 66 | url("fonts/vendor/jost/jost-v4-latin-italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 67 | } 68 | 69 | /* jost-500italic - latin */ 70 | @font-face { 71 | font-family: Jost; 72 | font-style: italic; 73 | font-weight: 500; 74 | font-display: swap; 75 | src: 76 | // Google Fonts Jost 77 | local("Jost Italic Medium Italic"), 78 | local("JostItalic-Medium"), 79 | // indestructible Jost* 80 | local("Jost* Medium Italic"), 81 | local("Jost-MediumItalic"), 82 | url("fonts/vendor/jost/jost-v4-latin-500italic.woff2") format("woff2"), 83 | url("fonts/vendor/jost/jost-v4-latin-500italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 84 | } 85 | 86 | /* jost-700italic - latin */ 87 | @font-face { 88 | font-family: Jost; 89 | font-style: italic; 90 | font-weight: 700; 91 | font-display: swap; 92 | src: 93 | // Google Fonts Jost 94 | local("Jost Italic Bold Italic"), 95 | local("JostItalic-Bold"), 96 | // indestructible Jost* 97 | local("Jost* Bold Italic"), 98 | local("Jost-BoldItalic"), 99 | url("fonts/vendor/jost/jost-v4-latin-700italic.woff2") format("woff2"), 100 | url("fonts/vendor/jost/jost-v4-latin-700italic.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 101 | } 102 | -------------------------------------------------------------------------------- /assets/scss/components/_alerts.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | font-family: $font-family-monospace; 3 | font-size: $font-size-sm; 4 | } 5 | 6 | .alert-icon { 7 | margin-right: 0.75rem; 8 | } 9 | 10 | .docs main .alert { 11 | margin: 2rem -1.5rem; 12 | } 13 | 14 | .alert .alert-link { 15 | text-decoration: underline; 16 | } 17 | 18 | .alert-doks { 19 | background: $beige; 20 | color: $black; 21 | } 22 | 23 | /* 24 | .alert-light { 25 | color: #215888; 26 | background: linear-gradient(-45deg, rgb(212, 245, 255), rgb(234, 250, 255), rgb(234, 250, 255), #d3f6ef); 27 | } 28 | 29 | .alert-light .alert-link { 30 | color: #215888; 31 | } 32 | */ 33 | 34 | .alert-white { 35 | background-color: rgba(255, 255, 255, 0.95); 36 | } 37 | 38 | .alert-primary { 39 | color: $white; 40 | background-color: $primary; 41 | } 42 | 43 | .alert a { 44 | text-decoration: underline; 45 | } 46 | 47 | .alert-primary .alert-link { 48 | color: $white; 49 | } 50 | 51 | /* 52 | .alert-primary { 53 | color: #084298; 54 | background-color: #cfe2ff; 55 | border-color: #b6d4fe; 56 | } 57 | 58 | .alert-primary .alert-link { 59 | color: #06357a; 60 | } 61 | */ 62 | 63 | .alert-secondary { 64 | color: #41464b; 65 | background-color: #e2e3e5; 66 | border-color: #d3d6d8; 67 | } 68 | 69 | .alert-secondary .alert-link { 70 | color: #34383c; 71 | } 72 | 73 | .alert-success { 74 | color: #0f5132; 75 | background-color: #d1e7dd; 76 | border-color: #badbcc; 77 | } 78 | 79 | .alert-success .alert-link { 80 | color: #0c4128; 81 | } 82 | 83 | .alert-info { 84 | color: #055160; 85 | background-color: #cff4fc; 86 | border-color: #b6effb; 87 | } 88 | 89 | .alert-info .alert-link { 90 | color: #04414d; 91 | } 92 | 93 | .alert-warning { 94 | color: #664d03; 95 | background-color: #fff3cd; 96 | border-color: #ffecb5; 97 | } 98 | 99 | .alert-warning .alert-link { 100 | color: #523e02; 101 | } 102 | 103 | .alert-danger { 104 | color: #842029; 105 | background-color: #f8d7da; 106 | border-color: #f5c2c7; 107 | } 108 | 109 | .alert-danger .alert-link { 110 | color: #6a1a21; 111 | } 112 | 113 | .alert-light { 114 | color: #636464; 115 | background-color: #fefefe; 116 | border-color: #fdfdfe; 117 | } 118 | 119 | .alert-light .alert-link { 120 | color: #4f5050; 121 | } 122 | 123 | .alert-dark { 124 | color: #141619; 125 | background-color: #d3d3d4; 126 | border-color: #bcbebf; 127 | } 128 | 129 | .alert-dark .alert-link { 130 | color: #101214; 131 | } 132 | 133 | .alert .alert-link:hover, 134 | .alert .alert-link:focus { 135 | text-decoration: none; 136 | } 137 | 138 | .alert-dismissible .btn-close { 139 | position: absolute; 140 | top: 50%; 141 | transform: translateY(-50%); 142 | right: 1rem; 143 | z-index: 2; 144 | padding: 0.5rem; 145 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E"); 146 | background-size: 1.5rem; 147 | filter: invert(1) grayscale(100%) brightness(200%); 148 | } 149 | 150 | @include media-breakpoint-up(md) { 151 | .alert-dismissible .btn-close { 152 | background-size: 1.25rem; 153 | } 154 | } 155 | 156 | [data-global-alert="closed"] #announcement { 157 | display: none; 158 | } 159 | 160 | .alert code { 161 | background: darken($beige, 5%); 162 | color: $black; 163 | padding: 0.25rem 0.5rem; 164 | } 165 | -------------------------------------------------------------------------------- /layouts/partials/sidebar/manual-collapsible-menu.html: -------------------------------------------------------------------------------- 1 | 2 | 64 | -------------------------------------------------------------------------------- /layouts/partials/footer/script-footer.html: -------------------------------------------------------------------------------- 1 | {{ $indexTemplate := resources.Get "js/index.js" -}} 2 | {{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}} 3 | 4 | {{ $bs := resources.Get "js/bootstrap.js" -}} 5 | {{ $bs := $bs | js.Build -}} 6 | 7 | {{ $highlight := resources.Get "js/highlight.js" -}} 8 | {{ $highlight := $highlight | js.Build -}} 9 | 10 | {{ $katex := resources.Get "js/vendor/katex/dist/katex.js" -}} 11 | {{ $katexAutoRender := resources.Get "js/vendor/katex/dist/contrib/auto-render.js" -}} 12 | 13 | {{ $mermaid := resources.Get "js/mermaid.js" | js.Build -}} 14 | 15 | {{ $app := resources.Get "js/app.js" -}} 16 | 17 | {{ $slice := slice $app -}} 18 | 19 | {{ if .Site.Params.options.lazySizes -}} 20 | {{ $lazySizes := resources.Get "js/lazysizes.js" -}} 21 | {{ $lazySizes := $lazySizes | js.Build -}} 22 | {{ $slice = $slice | append $lazySizes -}} 23 | {{ end -}} 24 | 25 | {{ if .Site.Params.options.clipBoard -}} 26 | {{ $clipBoard := resources.Get "js/clipboard.js" -}} 27 | {{ $clipBoard := $clipBoard | js.Build -}} 28 | {{ $slice = $slice | append $clipBoard -}} 29 | {{ end -}} 30 | 31 | {{ if .Site.Params.options.instantPage -}} 32 | {{ $instantPage := resources.Get "js/instant.page.js" -}} 33 | {{ $instantPage := $instantPage | js.Build -}} 34 | {{ $slice = $slice | append $instantPage -}} 35 | {{ end -}} 36 | 37 | {{ if .Site.Params.options.flexSearch -}} 38 | {{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}} 39 | {{ $slice = $slice | append $flexSearch -}} 40 | {{ end -}} 41 | 42 | {{ if .Site.Params.options.darkMode -}} 43 | {{ $darkMode := resources.Get "js/darkmode.js" -}} 44 | {{ $darkMode := $darkMode | js.Build -}} 45 | {{ $slice = $slice | append $darkMode -}} 46 | {{ end -}} 47 | 48 | {{ if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}} 49 | {{ $alert := resources.Get "js/alert.js" -}} 50 | {{ $alert := $alert | js.Build -}} 51 | {{ $slice = $slice | append $alert -}} 52 | {{ end -}} 53 | 54 | {{ if .Site.Params.options.kaTex -}} 55 | {{ $katexConfig := resources.Get "js/katex.js" -}} 56 | {{ $katexConfig := $katexConfig | js.Build -}} 57 | {{ $slice = $slice | append $katexConfig -}} 58 | {{ end -}} 59 | 60 | {{ $scrollLock := resources.Get "js/scroll-lock.js" | js.Build -}} 61 | {{ $slice = $slice | append $scrollLock -}} 62 | 63 | {{ $js := $slice | resources.Concat "main.js" -}} 64 | 65 | {{ if eq (hugo.Environment) "development" -}} 66 | {{ if .Site.Params.options.bootStrapJs -}} 67 | 68 | {{ end -}} 69 | {{ if .Site.Params.options.highLight -}} 70 | 71 | {{ end -}} 72 | {{ if .Site.Params.options.kaTex -}} 73 | 74 | 75 | {{ end -}} 76 | 77 | {{ with .Params.mermaid -}} 78 | 79 | {{ end -}} 80 | {{ if and (.Site.Params.options.flexSearch) (eq .Section "docs") -}} 81 | 82 | {{ end -}} 83 | {{ else -}} 84 | {{ $js := $js | minify | fingerprint "sha512" -}} 85 | {{ $index := $index | minify | fingerprint "sha512" -}} 86 | {{ $bs := $bs | minify | fingerprint "sha512" -}} 87 | {{ $highlight := $highlight | minify | fingerprint "sha512" -}} 88 | {{ $katex := $katex | minify | fingerprint "sha512" -}} 89 | {{ $katexAutoRender := $katexAutoRender | minify | fingerprint "sha512" -}} 90 | {{ $mermaid := $mermaid | minify | fingerprint "sha512" -}} 91 | {{ if .Site.Params.options.bootStrapJs -}} 92 | 93 | {{ end -}} 94 | {{ if .Site.Params.options.highLight -}} 95 | 96 | {{ end -}} 97 | {{ if .Site.Params.options.kaTex -}} 98 | 99 | 100 | {{ end -}} 101 | 102 | {{ with .Params.mermaid -}} 103 | 104 | {{ end -}} 105 | {{ if and (.Site.Params.options.flexSearch) (eq .Section "docs") -}} 106 | 107 | {{ end -}} 108 | {{ end -}} -------------------------------------------------------------------------------- /assets/js/index.js: -------------------------------------------------------------------------------- 1 | var suggestions = document.getElementById('suggestions'); 2 | var search = document.getElementById('search'); 3 | 4 | if (search !== null) { 5 | document.addEventListener('keydown', inputFocus); 6 | } 7 | 8 | function inputFocus(e) { 9 | if (e.ctrlKey && e.key === '/' ) { 10 | e.preventDefault(); 11 | search.focus(); 12 | } 13 | if (e.key === 'Escape' ) { 14 | search.blur(); 15 | suggestions.classList.add('d-none'); 16 | } 17 | } 18 | 19 | document.addEventListener('click', function(event) { 20 | 21 | var isClickInsideElement = suggestions.contains(event.target); 22 | 23 | if (!isClickInsideElement) { 24 | suggestions.classList.add('d-none'); 25 | } 26 | 27 | }); 28 | 29 | /* 30 | Source: 31 | - https://dev.to/shubhamprakash/trap-focus-using-javascript-6a3 32 | */ 33 | 34 | document.addEventListener('keydown',suggestionFocus); 35 | 36 | function suggestionFocus(e) { 37 | const suggestionsHidden = suggestions.classList.contains('d-none'); 38 | if (suggestionsHidden) return; 39 | 40 | const focusableSuggestions= [...suggestions.querySelectorAll('a')]; 41 | if (focusableSuggestions.length === 0) return; 42 | 43 | const index = focusableSuggestions.indexOf(document.activeElement); 44 | 45 | if (e.key === "ArrowUp") { 46 | e.preventDefault(); 47 | const nextIndex = index > 0 ? index - 1 : 0; 48 | focusableSuggestions[nextIndex].focus(); 49 | } 50 | else if (e.key === "ArrowDown") { 51 | e.preventDefault(); 52 | const nextIndex= index + 1 < focusableSuggestions.length ? index + 1 : index; 53 | focusableSuggestions[nextIndex].focus(); 54 | } 55 | 56 | } 57 | 58 | /* 59 | Source: 60 | - https://github.com/nextapps-de/flexsearch#index-documents-field-search 61 | - https://raw.githack.com/nextapps-de/flexsearch/master/demo/autocomplete.html 62 | */ 63 | 64 | (function(){ 65 | 66 | var index = new FlexSearch.Document({ 67 | tokenize: "forward", 68 | cache: 100, 69 | document: { 70 | id: 'id', 71 | store: [ 72 | "href", "title", "description" 73 | ], 74 | index: ["title", "description", "content"] 75 | } 76 | }); 77 | 78 | 79 | // Not yet supported: https://github.com/nextapps-de/flexsearch#complex-documents 80 | 81 | /* 82 | var docs = [ 83 | {{ range $index, $page := (where .Site.Pages "Section" "docs") -}} 84 | { 85 | id: {{ $index }}, 86 | href: "{{ .Permalink }}", 87 | title: {{ .Title | jsonify }}, 88 | description: {{ .Params.description | jsonify }}, 89 | content: {{ .Content | jsonify }} 90 | }, 91 | {{ end -}} 92 | ]; 93 | */ 94 | 95 | // https://discourse.gohugo.io/t/range-length-or-last-element/3803/2 96 | 97 | {{ $list := (where .Site.Pages "Section" "docs") -}} 98 | {{ $len := (len $list) -}} 99 | 100 | {{ range $index, $element := $list -}} 101 | index.add( 102 | { 103 | id: {{ $index }}, 104 | href: "{{ .RelPermalink }}", 105 | title: {{ .Title | jsonify }}, 106 | {{ with .Description -}} 107 | description: {{ . | jsonify }}, 108 | {{ else -}} 109 | description: {{ .Summary | plainify | jsonify }}, 110 | {{ end -}} 111 | content: {{ .Plain | jsonify }} 112 | } 113 | ); 114 | {{ end -}} 115 | 116 | search.addEventListener('input', show_results, true); 117 | 118 | function show_results(){ 119 | const maxResult = 5; 120 | var searchQuery = this.value; 121 | var results = index.search(searchQuery, {limit: maxResult, enrich: true}); 122 | 123 | // flatten results since index.search() returns results for each indexed field 124 | const flatResults = new Map(); // keyed by href to dedupe results 125 | for (const result of results.flatMap(r => r.result)) { 126 | if (flatResults.has(result.doc.href)) continue; 127 | flatResults.set(result.doc.href, result.doc); 128 | } 129 | 130 | suggestions.innerHTML = ""; 131 | suggestions.classList.remove('d-none'); 132 | 133 | // inform user that no results were found 134 | if (flatResults.size === 0 && searchQuery) { 135 | const noResultsMessage = document.createElement('div') 136 | noResultsMessage.innerHTML = `No results for "${searchQuery}"` 137 | noResultsMessage.classList.add("suggestion__no-results"); 138 | suggestions.appendChild(noResultsMessage); 139 | return; 140 | } 141 | 142 | // construct a list of suggestions 143 | for(const [href, doc] of flatResults) { 144 | const entry = document.createElement('div'); 145 | suggestions.appendChild(entry); 146 | 147 | const a = document.createElement('a'); 148 | a.href = href; 149 | entry.appendChild(a); 150 | 151 | const title = document.createElement('span'); 152 | title.textContent = doc.title; 153 | title.classList.add("suggestion__title"); 154 | a.appendChild(title); 155 | 156 | const description = document.createElement('span'); 157 | description.textContent = doc.description; 158 | description.classList.add("suggestion__description"); 159 | a.appendChild(description); 160 | 161 | suggestions.appendChild(entry); 162 | 163 | if(suggestions.childElementCount == maxResult) break; 164 | } 165 | } 166 | }()); 167 | -------------------------------------------------------------------------------- /assets/scss/common/_global.scss: -------------------------------------------------------------------------------- 1 | .contributors .content, 2 | .blog .content, 3 | .page .content, 4 | .error404 .content, 5 | .docs.list .content, 6 | .tutorial.list .content, 7 | .showcase.list .content { 8 | padding-top: 1rem; 9 | padding-bottom: 3rem; 10 | } 11 | 12 | .content img { 13 | max-width: 100%; 14 | } 15 | 16 | h1, 17 | h2, 18 | h3, 19 | h4, 20 | h5, 21 | h6, 22 | .h1, 23 | .h2, 24 | .h3, 25 | .h4, 26 | .h5, 27 | .h6 { 28 | margin: 2rem 0 1rem; 29 | } 30 | 31 | .offcanvas-header { 32 | border-bottom: 1px solid $gray-300; 33 | padding-top: 1.0625rem; 34 | padding-bottom: 0.8125rem; 35 | } 36 | 37 | h5.offcanvas-title { 38 | margin: 0; 39 | } 40 | 41 | body.docs { 42 | padding-top: 0 !important; 43 | } 44 | 45 | @include media-breakpoint-up(md) { 46 | body { 47 | font-size: $font-size-md; 48 | 49 | /* 50 | padding-top: 4rem !important; 51 | */ 52 | } 53 | 54 | h1, 55 | h2, 56 | h3, 57 | h4, 58 | h5, 59 | h6, 60 | .h1, 61 | .h2, 62 | .h3, 63 | .h4, 64 | .h5, 65 | .h6 { 66 | margin-bottom: 1.125rem; 67 | } 68 | } 69 | 70 | .home h1 { 71 | /* font-size: calc(1.375rem + 1.5vw); */ 72 | font-size: calc(1.875rem + 1.5vw); 73 | } 74 | 75 | a:hover, 76 | a:focus { 77 | text-decoration: underline; 78 | } 79 | 80 | a.btn:hover, 81 | a.btn:focus { 82 | text-decoration: none; 83 | } 84 | 85 | .section { 86 | padding-top: 5rem; 87 | padding-bottom: 5rem; 88 | } 89 | 90 | .section-md { 91 | padding-top: 3rem; 92 | padding-bottom: 3rem; 93 | } 94 | 95 | .section-sm { 96 | padding-top: 1rem; 97 | padding-bottom: 1rem; 98 | } 99 | 100 | /* 101 | .section svg { 102 | display: inline-block; 103 | width: 2rem; 104 | height: 2rem; 105 | vertical-align: text-top; 106 | } 107 | */ 108 | 109 | /* 110 | body { 111 | padding-top: 3.5625rem; 112 | } 113 | */ 114 | 115 | .docs-sidebar { 116 | order: 2; 117 | } 118 | 119 | @include media-breakpoint-up(lg) { 120 | .docs-sidebar { 121 | order: 0; 122 | border-right: 1px solid $gray-200; 123 | } 124 | 125 | @supports ((position:-webkit-sticky) or (position:sticky)) { 126 | .docs-sidebar { 127 | position: -webkit-sticky; 128 | position: sticky; 129 | top: 4rem; 130 | z-index: 1000; 131 | height: calc(100vh - 4rem); 132 | } 133 | } 134 | } 135 | 136 | @include media-breakpoint-up(xl) { 137 | .docs-sidebar { 138 | flex: 0 1 320px; 139 | } 140 | } 141 | 142 | .docs-links { 143 | padding-bottom: 5rem; 144 | } 145 | 146 | @include media-breakpoint-up(lg) { 147 | @supports ((position: -webkit-sticky) or (position: sticky)) { 148 | .docs-links { 149 | max-height: calc(100vh - 4rem); 150 | overflow-y: scroll; 151 | } 152 | } 153 | } 154 | 155 | @include media-breakpoint-up(lg) { 156 | .docs-links { 157 | display: block; 158 | width: auto; 159 | margin-right: -1.5rem; 160 | padding-bottom: 4rem; 161 | } 162 | } 163 | 164 | .docs-toc { 165 | order: 2; 166 | } 167 | 168 | @supports ((position:-webkit-sticky) or (position:sticky)) { 169 | .docs-toc { 170 | position: -webkit-sticky; 171 | position: sticky; 172 | top: 4rem; 173 | height: calc(100vh - 4rem); 174 | overflow-y: auto; 175 | } 176 | } 177 | 178 | .docs-content { 179 | padding-bottom: 3rem; 180 | order: 1; 181 | } 182 | 183 | .docs-navigation { 184 | border-top: 1px solid $gray-200; 185 | margin-top: 2rem; 186 | margin-bottom: 0; 187 | padding-top: 2rem; 188 | } 189 | 190 | .docs-navigation a { 191 | font-size: $font-size-base * 0.9; 192 | } 193 | 194 | @include media-breakpoint-up(lg) { 195 | .docs-navigation { 196 | margin-bottom: -1rem; 197 | } 198 | 199 | .docs-navigation a { 200 | font-size: $font-size-base; 201 | } 202 | } 203 | 204 | .navbar a:hover, 205 | .navbar a:focus { 206 | text-decoration: none; 207 | } 208 | 209 | #TableOfContents ul { 210 | padding-left: 0; 211 | list-style: none; 212 | } 213 | 214 | ::selection { 215 | background: rgba(212, 53, 159, 0.2); 216 | } 217 | 218 | .bg-dots { 219 | background-image: radial-gradient($gray-300 15%, transparent 15%); 220 | background-position: 0 0; 221 | background-size: 1rem 1rem; 222 | -webkit-mask: linear-gradient(to top, #fff, transparent); 223 | mask: linear-gradient(to top, #fff, transparent); 224 | width: 100%; 225 | height: 9rem; 226 | margin-top: -10rem; 227 | z-index: -1; 228 | } 229 | 230 | .bg-dots-md { 231 | margin-top: -11rem; 232 | } 233 | 234 | .bg-dots-lg { 235 | margin-top: -12rem; 236 | } 237 | 238 | // https://fossheim.io/writing/posts/css-text-gradient/ 239 | .gradient-text { 240 | background-color: $primary; 241 | background-image: linear-gradient(90deg, $primary, $blue-300 50%, $pink-500); 242 | background-size: 100%; 243 | background-repeat: repeat; 244 | -webkit-background-clip: text; 245 | -moz-background-clip: text; 246 | -webkit-text-fill-color: transparent; 247 | -moz-text-fill-color: transparent; 248 | } 249 | 250 | .katex { 251 | font-size: $font-size-md; 252 | } 253 | 254 | .card-bar { 255 | border-top: 4px solid; 256 | border-image-source: linear-gradient(90deg, $primary, #8ed6fb 50%, #d32e9d); 257 | border-image-slice: 1; 258 | } 259 | 260 | .modal-backdrop { 261 | background-color: #fff; 262 | } 263 | 264 | .modal-backdrop.show { 265 | opacity: 0.7; 266 | } 267 | 268 | @include media-breakpoint-up(md) { 269 | .modal-backdrop.show { 270 | opacity: 0; 271 | } 272 | } 273 | -------------------------------------------------------------------------------- /assets/scss/common/_variables.scss: -------------------------------------------------------------------------------- 1 | // Color system 2 | 3 | $white: #fff; 4 | $gray-100: #f8f9fa; 5 | $gray-200: #e9ecef; 6 | $gray-300: #dee2e6; 7 | $gray-400: #ced4da; 8 | $gray-500: #adb5bd; 9 | $gray-600: #6c757d; 10 | $gray-700: #495057; 11 | $gray-800: #343a40; 12 | $gray-900: #212529; 13 | $black: #000; 14 | 15 | $yellow: #ffe000; 16 | $black: #1d2d35; 17 | $beige: #fbf7f0; 18 | 19 | // $red: #e55235; 20 | $purple: #5d2f86; 21 | $brown: #aa9c84; 22 | 23 | $blue-300: #8ed6fb; 24 | $pink-100: #fcfaff; 25 | $pink-500: #d32e9d; 26 | 27 | $primary: $purple; 28 | 29 | $color-btn-bg: $pink-500; 30 | $color-btn-border: darken($pink-500, 5%); 31 | $color-btn-text: $white; 32 | 33 | // Options 34 | // 35 | // Quickly modify global styling by enabling or disabling optional features. 36 | 37 | $enable-caret: true; 38 | $enable-rounded: true; 39 | $enable-shadows: false; 40 | $enable-gradients: false; 41 | $enable-transitions: true; 42 | $enable-reduced-motion: true; 43 | $enable-smooth-scroll: true; 44 | $enable-grid-classes: true; 45 | $enable-button-pointers: true; 46 | $enable-rfs: true; 47 | $enable-validation-icons: true; 48 | $enable-negative-margins: true; 49 | $enable-deprecation-messages: true; 50 | $enable-important-utilities: true; 51 | 52 | /** Bootstrap navbar fix (https://git.io/fADqW) */ 53 | $navbar-dark-toggler-icon-bg: none; 54 | $navbar-light-toggler-icon-bg: none; 55 | 56 | // Options 57 | // 58 | // Quickly modify global styling by enabling or disabling optional features. 59 | 60 | // $enable-responsive-font-sizes: true; 61 | 62 | // Body 63 | // 64 | // Settings for the `` element. 65 | 66 | $body-bg: $white; 67 | $body-color: $black; 68 | 69 | // Links 70 | // 71 | // Style anchor elements. 72 | 73 | $link-color: $primary; 74 | $link-decoration: none; 75 | 76 | // Grid containers 77 | // 78 | // Define the maximum width of `.container` for different screen sizes. 79 | 80 | $container-max-widths: ( 81 | sm: 540px, 82 | md: 720px, 83 | lg: 960px, 84 | xl: 1240px, 85 | xxl: 1320px 86 | ); 87 | 88 | @include _assert-ascending($container-max-widths, "$container-max-widths"); 89 | 90 | // Grid columns 91 | // 92 | // Set the number of columns and specify the width of the gutters. 93 | 94 | $grid-columns: 16; 95 | $grid-gutter-width: 48px; 96 | $grid-row-columns: 6; 97 | 98 | // Components 99 | // 100 | // Define common padding and border radius sizes and more. 101 | 102 | $border-color: $gray-200; 103 | 104 | // Typography 105 | // 106 | // Font, line-height, and color for body text, headings, and more. 107 | 108 | // stylelint-disable value-keyword-case 109 | $font-family-sans-serif: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 110 | $font-family-monospace: sfmono-regular, menlo, monaco, consolas, "Liberation Mono", "Courier New", monospace; 111 | $font-family-base: $font-family-sans-serif; 112 | // stylelint-enable value-keyword-case 113 | 114 | $font-size-base: 1rem; // Assumes the browser default, typically `16px` 115 | $font-size-xl: $font-size-base * 1.375; 116 | $font-size-lg: $font-size-base * 1.25; 117 | $font-size-md: $font-size-base * 1.125; 118 | $font-size-sm: $font-size-base * 0.875; 119 | 120 | // $line-height-base: 1.5; 121 | 122 | $headings-font-family: null; 123 | $headings-font-weight: 700; 124 | 125 | $lead-font-weight: 400; 126 | 127 | // Spacing 128 | // 129 | // Control the default styling of most Bootstrap elements by modifying these 130 | // variables. Mostly focused on spacing. 131 | // You can add more entries to the $spacers map, should you need more variation. 132 | 133 | $spacer: 1rem; 134 | 135 | // Navbar 136 | 137 | $navbar-padding-y: $spacer / 2; 138 | $navbar-padding-x: null; 139 | 140 | $navbar-nav-link-padding-x: 0.5rem; 141 | 142 | $navbar-light-color: $black; 143 | $navbar-light-hover-color: $primary; 144 | $navbar-light-active-color: $primary; 145 | 146 | // Cards 147 | 148 | $card-border-color: $gray-200; 149 | 150 | // Alerts 151 | // 152 | // Define alert colors, border radius, and padding. 153 | 154 | $alert-padding-y: $spacer; 155 | $alert-padding-x: $spacer * 1.5; 156 | $alert-margin-bottom: 0; 157 | $alert-border-radius: 0; 158 | $alert-link-font-weight: $headings-font-weight; 159 | $alert-border-width: 0; 160 | 161 | $alert-bg-scale: 0; 162 | $alert-border-scale: 0; 163 | $alert-color-scale: 0; 164 | 165 | // docsearch 166 | $dropdown-config: ( 167 | main-color: $purple, 168 | layout-type: normal, 169 | layout-width: normal, 170 | layout-alignment: align, 171 | background-color: $white, 172 | border-radius: 4, 173 | border-width: 1, 174 | border-color: $gray-200, 175 | box-shadow: none, 176 | branding-position: bottom, 177 | spacing: normal, 178 | include-desc: yes, 179 | background-category-header: $white, 180 | font-size: normal, 181 | header-color: $black, 182 | title-color: $black, 183 | subtitle-color: $black, 184 | text-color: $black, 185 | highlight-color: $purple, 186 | highlight-opacity: 0.1, 187 | highlight-type: underline 188 | ); 189 | 190 | $input-btn-focus-width: 0; 191 | -------------------------------------------------------------------------------- /assets/scss/components/_buttons.scss: -------------------------------------------------------------------------------- 1 | .navbar .btn-link { 2 | color: $navbar-light-color; 3 | padding: 0.4375rem 0; 4 | } 5 | 6 | #mode { 7 | padding-right: 0.25rem; 8 | padding-left: 0.25rem; 9 | margin-right: -0.25rem; 10 | } 11 | 12 | .btn-link:focus { 13 | outline: 0; 14 | box-shadow: none; 15 | } 16 | 17 | #navigation { 18 | margin-left: 1.25rem; 19 | } 20 | 21 | @include media-breakpoint-up(md) { 22 | #mode { 23 | margin-left: 1.125rem; 24 | margin-right: -0.375rem; 25 | } 26 | 27 | .navbar .btn-link { 28 | padding: 0.5625em 0.25rem 0.5rem 0.125rem; 29 | } 30 | } 31 | 32 | .navbar .btn-link:hover { 33 | color: $navbar-light-hover-color; 34 | } 35 | 36 | .navbar .btn-link:active { 37 | color: $navbar-light-active-color; 38 | } 39 | 40 | body .toggle-dark { 41 | display: block; 42 | } 43 | 44 | body .toggle-light { 45 | display: none; 46 | } 47 | 48 | [data-dark-mode] body .toggle-light { 49 | display: block; 50 | } 51 | 52 | [data-dark-mode] body .toggle-dark { 53 | display: none; 54 | } 55 | 56 | pre { 57 | position: relative; 58 | } 59 | 60 | @include media-breakpoint-down(md) { 61 | .btn-copy { 62 | display: none; 63 | } 64 | } 65 | 66 | .btn-copy { 67 | transition: opacity 0.3s ease-in-out; 68 | visibility: hidden !important; 69 | position: absolute; 70 | right: 0.25rem; 71 | top: 0.25rem; 72 | z-index: 10; 73 | font-family: $font-family-sans-serif; 74 | font-size: $font-size-sm; 75 | padding: 0.25rem 0.5rem; 76 | color: $color-btn-text; 77 | background-color: $color-btn-bg; 78 | border-color: $color-btn-border; 79 | } 80 | 81 | .btn-copy:hover { 82 | color: $color-btn-text; 83 | background-color: lighten($color-btn-bg, 5%); 84 | border-color: lighten($color-btn-border, 15%); 85 | } 86 | 87 | .btn-copy:focus { 88 | color: $color-btn-text; 89 | background-color: $color-btn-bg; 90 | border-color: lighten($color-btn-border, 15%); 91 | box-shadow: none; 92 | } 93 | 94 | .btn-copy:active, 95 | .btn-copy.active { 96 | color: $color-btn-text; 97 | background-color: $color-btn-bg; 98 | border-color: lighten($color-btn-border, 15%); 99 | } 100 | 101 | .btn-copy:active:focus, 102 | .btn-copy.active:focus { 103 | box-shadow: none; 104 | } 105 | 106 | @include media-breakpoint-up(md) { 107 | pre:hover .btn-copy { 108 | visibility: visible !important; 109 | } 110 | } 111 | 112 | .btn-copy::after { 113 | content: "Copy"; 114 | display: block; 115 | color: $color-btn-text; 116 | } 117 | 118 | .btn-copy:hover::after { 119 | content: "Copy"; 120 | display: block; 121 | color: $color-btn-text; 122 | } 123 | 124 | .btn-copy:focus::after, 125 | .btn-copy:active::after { 126 | content: "Copied"; 127 | display: block; 128 | color: $color-btn-text; 129 | } 130 | 131 | .collapsible-sidebar { 132 | margin: 2.125rem 0; 133 | } 134 | 135 | .btn-toggle { 136 | display: inline-flex; 137 | align-items: center; 138 | padding: 0.25rem 0.5rem 0.25rem 0; 139 | font-weight: $headings-font-weight; 140 | font-size: $font-size-base; 141 | text-transform: uppercase; 142 | color: $body-color; 143 | background-color: transparent; 144 | border: 0; 145 | } 146 | 147 | .btn-toggle:hover, 148 | .btn-toggle:focus { 149 | color: $body-color; 150 | background-color: transparent; 151 | outline: 0; 152 | box-shadow: none; 153 | } 154 | 155 | .btn-toggle::before { 156 | width: 1.25em; 157 | line-height: 0; 158 | content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%2829, 45, 53, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); 159 | transition: transform 0.35s ease; 160 | transform-origin: 0.5em 50%; 161 | margin-bottom: 0.125rem; 162 | } 163 | 164 | .btn-toggle[aria-expanded="true"] { 165 | color: $body-color; 166 | } 167 | 168 | .btn-toggle[aria-expanded="true"]::before { 169 | transform: rotate(90deg); 170 | } 171 | 172 | .btn-toggle-nav a { 173 | display: inline-flex; 174 | padding: 0.1875rem 0.5rem; 175 | margin-top: 0.125rem; 176 | margin-left: 1.25rem; 177 | text-decoration: none; 178 | } 179 | 180 | .btn-toggle-nav a:hover, 181 | .btn-toggle-nav a:focus { 182 | background-color: transparent; 183 | color: $link-color; 184 | } 185 | 186 | .btn-toggle-nav a.active { 187 | color: $link-color; 188 | } 189 | 190 | .doks-navbar .dropdown-menu, 191 | .doks-subnavbar .dropdown-menu { 192 | font-size: 0.875rem; 193 | } 194 | 195 | .doks-navbar .dropdown-item.current, 196 | .doks-subnavbar .dropdown-item.current { 197 | font-weight: 600; 198 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); 199 | background-repeat: no-repeat; 200 | background-position: right 1rem top 0.6rem; 201 | background-size: 0.75rem 0.75rem; 202 | } 203 | 204 | .btn-close { 205 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-x'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E"); 206 | background-size: 1.5rem; 207 | } 208 | 209 | .offcanvas-header .btn-close { 210 | margin-right: 0 !important; 211 | } 212 | 213 | .dropdown-toggle::after { 214 | display: none; 215 | } 216 | 217 | .dropdown-caret { 218 | margin-left: -0.1875rem; 219 | margin-right: -0.3125rem; 220 | } 221 | 222 | .dropdown-menu.dropdown-menu-main { 223 | width: 100%; 224 | } 225 | 226 | @include media-breakpoint-up(md) { 227 | .dropdown-menu.dropdown-menu-main { 228 | width: auto; 229 | } 230 | } 231 | 232 | .dropdown-menu-main .dropdown-item { 233 | color: inherit; 234 | font-size: $font-size-base; 235 | font-weight: 400; 236 | text-decoration: none; 237 | } 238 | 239 | .dropdown-menu-main .dropdown-item:hover { 240 | background-color: transparent; 241 | color: $primary; 242 | } 243 | 244 | .dropdown-menu-main .dropdown-item.active { 245 | color: $primary; 246 | font-weight: 400; 247 | text-decoration: none; 248 | background-color: inherit; 249 | } 250 | 251 | .dropdown-menu-main .dropdown-item.active:hover { 252 | background-color: transparent; 253 | } 254 | -------------------------------------------------------------------------------- /layouts/partials/head/structured-data.html: -------------------------------------------------------------------------------- 1 | {{ $baseURL := "/" | absURL -}} 2 | 3 | {{ $dot := . -}} 4 | {{ $dot.Scratch.Set "path" "" -}} 5 | {{ $dot.Scratch.Set "breadcrumb" slice -}} 6 | 7 | {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}} 8 | {{ $.Scratch.Add "path" .Site.BaseURL -}} 9 | 10 | {{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}} 11 | {{ range $index, $element := split $url "/" -}} 12 | {{ $dot.Scratch.Add "path" $element -}} 13 | {{ $.Scratch.Add "path" "/" -}} 14 | {{ if ne $element "" -}} 15 | {{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) -}} 16 | {{ end -}} 17 | {{ end -}} 18 | 19 | -------------------------------------------------------------------------------- /assets/scss/layouts/_header.scss: -------------------------------------------------------------------------------- 1 | .banner .nav li { 2 | @extend .nav-item; 3 | } 4 | 5 | .banner .nav a { 6 | @extend .nav-link; 7 | } 8 | 9 | .navbar-text { 10 | margin-left: 1rem; 11 | } 12 | 13 | .navbar-brand { 14 | font-weight: $headings-font-weight; 15 | } 16 | 17 | /* 18 | .navbar-light .navbar-brand, 19 | .navbar-light .navbar-brand:hover, 20 | .navbar-light .navbar-brand:active { 21 | color: $body-color; 22 | } 23 | 24 | .navbar-light .navbar-nav .active .nav-link { 25 | color: $primary; 26 | } 27 | */ 28 | 29 | .navbar { 30 | z-index: 1000; 31 | background-color: rgba(255, 255, 255, 0.95); 32 | border-bottom: 1px solid $gray-200; 33 | 34 | /* 35 | margin-top: 4px; 36 | */ 37 | } 38 | 39 | @include media-breakpoint-up(lg) { 40 | .navbar { 41 | z-index: 1025; 42 | } 43 | } 44 | 45 | @include media-breakpoint-up(md) { 46 | .navbar-brand { 47 | font-size: $font-size-xl; 48 | } 49 | 50 | .navbar-text { 51 | margin-left: 1.25rem; 52 | } 53 | } 54 | 55 | .navbar-nav { 56 | flex-direction: row; 57 | } 58 | 59 | .nav-item { 60 | margin-left: 0; 61 | } 62 | 63 | @include media-breakpoint-up(md) { 64 | .nav-item { 65 | margin-left: 0.5rem; 66 | } 67 | } 68 | 69 | /* 70 | @include media-breakpoint-down(sm) { 71 | .nav-item:first-child { 72 | margin-left: 0; 73 | } 74 | } 75 | */ 76 | 77 | @include media-breakpoint-down(md) { 78 | .navbar .container { 79 | padding-left: 1.5rem; 80 | padding-right: 1.5rem; 81 | } 82 | } 83 | 84 | .break { 85 | flex-basis: 100%; 86 | height: 0; 87 | } 88 | 89 | button#doks-languages { 90 | margin-right: -0.5625rem; 91 | margin-left: 0.75rem; 92 | } 93 | 94 | button#doks-versions { 95 | margin-right: -0.5625rem; 96 | margin-left: 0; 97 | } 98 | 99 | .offcanvas .nav-link { 100 | color: $body-color; 101 | } 102 | 103 | .doks-subnavbar { 104 | background-color: rgba(255, 255, 255, 0.95); 105 | border-bottom: 1px solid $gray-200; 106 | } 107 | 108 | .doks-subnavbar .nav-link { 109 | padding: 0.5rem 1.5rem 0.5rem 0; 110 | } 111 | 112 | .doks-subnavbar .nav-link:first-child { 113 | padding: 0.5rem 1.5rem 0.5rem 0; 114 | } 115 | 116 | .offcanvas .nav-link:hover, 117 | .offcanvas .nav-link:focus { 118 | color: $link-color; 119 | } 120 | 121 | .offcanvas .nav-link.active { 122 | color: $link-color; 123 | } 124 | 125 | /* 126 | .navbar { 127 | background-color: rgba(255, 255, 255, 0.95); 128 | border-bottom: 1px solid $gray-200; 129 | margin-top: 4px; 130 | } 131 | */ 132 | 133 | .header-bar { 134 | border-top: 4px solid; 135 | border-image-source: linear-gradient(90deg, $primary, #8ed6fb 50%, #d32e9d); 136 | border-image-slice: 1; 137 | } 138 | 139 | .offcanvas .header-bar { 140 | margin-bottom: -4px; 141 | } 142 | 143 | .home .navbar { 144 | border-bottom: 0; 145 | } 146 | 147 | /* 148 | .navbar-form { 149 | position: relative; 150 | margin-top: 0.25rem; 151 | } 152 | */ 153 | 154 | @include media-breakpoint-up(md) { 155 | .navbar-brand { 156 | margin-right: 0.75rem !important; 157 | } 158 | 159 | .main-nav .nav-item:first-child .nav-link, 160 | .social-nav .nav-item:first-child .nav-link { 161 | padding-left: 0; 162 | } 163 | 164 | .main-nav .nav-item:last-child .nav-link, 165 | .social-nav .nav-item:last-child .nav-link { 166 | padding-right: 0; 167 | } 168 | 169 | .doks-search { 170 | max-width: 20rem; 171 | margin-top: 0.125rem; 172 | margin-bottom: 0.125rem; 173 | } 174 | 175 | /* 176 | .navbar-form { 177 | margin-top: 0; 178 | margin-left: 6rem; 179 | margin-right: 1.5rem; 180 | } 181 | */ 182 | } 183 | 184 | .form-control.is-search { 185 | padding-right: 4rem; 186 | border: 1px solid transparent; 187 | background: $gray-100; 188 | } 189 | 190 | .form-control.is-search:focus { 191 | border: 1px solid $primary; 192 | } 193 | 194 | .doks-search::after { 195 | position: absolute; 196 | top: 0.4625rem; 197 | right: 0.5375rem; 198 | display: flex; 199 | align-items: center; 200 | justify-content: center; 201 | height: 1.5rem; 202 | padding-right: 0.3125rem; 203 | padding-left: 0.3125rem; 204 | font-size: $font-size-base * 0.75; 205 | color: $gray-700; 206 | content: "Ctrl + /"; 207 | border: 1px solid $gray-300; 208 | border-radius: 0.25rem; 209 | } 210 | 211 | /* 212 | @include media-breakpoint-up(lg) { 213 | .navbar-form { 214 | margin-left: 15rem; 215 | } 216 | } 217 | 218 | @include media-breakpoint-up(xl) { 219 | .navbar-form { 220 | margin-left: 30rem; 221 | } 222 | } 223 | */ 224 | 225 | /* 226 | .form-control.is-search { 227 | */ 228 | 229 | /* 230 | padding-right: calc(1.5em + 0.75rem); 231 | */ 232 | 233 | /* 234 | padding-right: 2.5rem; 235 | background: $gray-100; 236 | border: 0; 237 | */ 238 | 239 | /* 240 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); 241 | background-repeat: no-repeat; 242 | background-position: right calc(0.375em + 0.1875rem) center; 243 | background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); 244 | */ 245 | 246 | /* 247 | } 248 | */ 249 | 250 | /* 251 | .navbar-form::after { 252 | position: absolute; 253 | top: 0.4625rem; 254 | right: 0.5375rem; 255 | display: flex; 256 | align-items: center; 257 | justify-content: center; 258 | height: 1.5rem; 259 | padding-right: 0.4375rem; 260 | padding-left: 0.4375rem; 261 | font-size: $font-size-base * 0.75; 262 | color: $gray-700; 263 | content: "/"; 264 | border: 1px solid $gray-300; 265 | border-radius: 0.25rem; 266 | } 267 | */ 268 | 269 | /*! purgecss start ignore */ 270 | .algolia-autocomplete { 271 | display: flex !important; 272 | } 273 | 274 | .algolia-autocomplete .ds-dropdown-menu { 275 | box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; 276 | } 277 | 278 | @include media-breakpoint-down(sm) { 279 | .algolia-autocomplete .ds-dropdown-menu { 280 | max-width: 512px !important; 281 | min-width: 312px !important; 282 | width: auto !important; 283 | } 284 | 285 | .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column { 286 | font-weight: normal; 287 | } 288 | 289 | .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column::after { 290 | content: "/"; 291 | margin-right: 0.25rem; 292 | } 293 | } 294 | 295 | .algolia-autocomplete .algolia-docsearch-suggestion--category-header { 296 | color: $black; 297 | } 298 | 299 | .algolia-autocomplete .algolia-docsearch-suggestion--title { 300 | margin-bottom: 0; 301 | } 302 | 303 | .algolia-autocomplete .algolia-docsearch-suggestion--highlight { 304 | padding: 0 0.05em; 305 | } 306 | 307 | .algolia-autocomplete .algolia-docsearch-footer { 308 | margin-top: 1rem; 309 | margin-right: 0.5rem; 310 | margin-bottom: 0.5rem; 311 | } 312 | 313 | /*! purgecss end ignore */ 314 | 315 | /* 316 | * Source: https://medium.com/creative-technology-concepts-code/responsive-mobile-dropdown-navigation-using-css-only-7218e4498a99 317 | */ 318 | 319 | /* Style the menu icon for the dropdown */ 320 | 321 | .navbar .menu-icon { 322 | cursor: pointer; 323 | 324 | /* display: inline-block; */ 325 | 326 | /* float: right; */ 327 | padding: 1.125rem 0.625rem; 328 | margin: 0 0 0 -0.625rem; 329 | 330 | /* position: relative; */ 331 | user-select: none; 332 | } 333 | 334 | .navbar .menu-icon .navicon { 335 | background: $navbar-light-color; 336 | display: block; 337 | height: 2px; 338 | position: relative; 339 | transition: background 0.2s ease-out; 340 | width: 18px; 341 | } 342 | 343 | .navbar .menu-icon .navicon::before, 344 | .navbar .menu-icon .navicon::after { 345 | background: $navbar-light-color; 346 | content: ""; 347 | display: block; 348 | height: 100%; 349 | position: absolute; 350 | transition: all 0.2s ease-out; 351 | width: 100%; 352 | } 353 | 354 | .navbar .menu-icon .navicon::before { 355 | top: 5px; 356 | } 357 | 358 | .navbar .menu-icon .navicon::after { 359 | top: -5px; 360 | } 361 | 362 | /* Add the icon and menu animations when the checkbox is clicked */ 363 | 364 | .navbar .menu-btn { 365 | display: none; 366 | } 367 | 368 | .navbar .menu-btn:checked ~ .navbar-collapse { 369 | display: block; 370 | max-height: 100vh; 371 | } 372 | 373 | .navbar .menu-btn:checked ~ .menu-icon .navicon { 374 | background: transparent; 375 | } 376 | 377 | .navbar .menu-btn:checked ~ .menu-icon .navicon::before { 378 | transform: rotate(-45deg); 379 | } 380 | 381 | .navbar .menu-btn:checked ~ .menu-icon .navicon::after { 382 | transform: rotate(45deg); 383 | } 384 | 385 | .navbar .menu-btn:checked ~ .menu-icon:not(.steps) .navicon::before, 386 | .navbar .menu-btn:checked ~ .menu-icon:not(.steps) .navicon::after { 387 | top: 0; 388 | } 389 | 390 | .btn-menu { 391 | margin-left: 1rem; 392 | } 393 | 394 | .btn-menu, 395 | .doks-sidebar-toggle { 396 | padding-right: 0.25rem; 397 | padding-left: 0.25rem; 398 | margin-right: -0.5rem; 399 | } 400 | 401 | .btn-menu:hover, 402 | .btn-doks-light:hover, 403 | .doks-sidebar-toggle:hover { 404 | background: $pink-100; 405 | } 406 | 407 | .btn-menu:focus, 408 | .doks-sidebar-toggle:focus, 409 | .doks-mode-toggle:focus { 410 | outline: 0; 411 | } 412 | 413 | .doks-sidebar-toggle .doks-collapse { 414 | display: none; 415 | } 416 | 417 | .doks-sidebar-toggle:not(.collapsed) .doks-expand { 418 | display: none; 419 | } 420 | 421 | .doks-sidebar-toggle:not(.collapsed) .doks-collapse { 422 | display: inline-block; 423 | } 424 | 425 | .navbar-light .navbar-brand, 426 | .navbar-light .navbar-brand:hover, 427 | .navbar-light .navbar-brand:active { 428 | color: $body-color; 429 | } 430 | 431 | .navbar-light .navbar-nav .active .nav-link { 432 | color: $primary; 433 | } 434 | 435 | .dropdown-divider { 436 | border-top: 1px dashed $gray-200; 437 | } 438 | 439 | .dropdown-item:hover { 440 | background: $gray-100; 441 | } 442 | 443 | .dropdown-item:active { 444 | color: inherit; 445 | } 446 | -------------------------------------------------------------------------------- /layouts/partials/header/header.html: -------------------------------------------------------------------------------- 1 | {{ if .Site.Params.alert -}} 2 | {{ partial "header/alert.html" . }} 3 | {{ end -}} 4 | 5 | {{ if eq .Site.Params.options.flexSearch false -}} 6 |
7 | {{ end -}} 8 | 9 |
10 | 11 | 109 | 110 | {{ if eq .Site.Params.options.flexSearch false }} 111 |
112 | {{ end -}} 113 | 114 | {{ if eq .Section "docs" -}} 115 | 148 | 149 |
150 | 155 |
156 | 157 | {{ else if ne .CurrentSection .FirstSection -}} 158 | 167 | 168 |
169 | 174 |
175 | {{ end -}} 176 | -------------------------------------------------------------------------------- /assets/scss/common/_dark.scss: -------------------------------------------------------------------------------- 1 | /** Theme variables */ 2 | 3 | // Source: https://material.io/design/color/dark-theme.html 4 | 5 | $body-bg-dark: $gray-900; 6 | $body-overlay-dark: darken($body-bg-dark, 2.5%); 7 | 8 | /* 9 | $border-dark: darken($body-bg-dark, 2.5%); 10 | */ 11 | $border-dark: $gray-800; 12 | $body-color-dark: $gray-300; 13 | $dots-dark: darken($body-color-dark, 50%); 14 | 15 | $link-color-dark: $blue-300; 16 | $button-color-dark: $link-color-dark; 17 | $focus-color-dark: lighten($link-color-dark, 2.5%); 18 | 19 | $navbar-dark-color: $body-color-dark; 20 | $navbar-dark-hover-color: $link-color-dark; 21 | $navbar-dark-active-color: $link-color-dark; 22 | 23 | /** Theme styles */ 24 | 25 | [data-dark-mode] body { 26 | background: $body-bg-dark; 27 | color: $body-color-dark; 28 | } 29 | 30 | [data-dark-mode] body a { 31 | color: $link-color-dark; 32 | } 33 | 34 | [data-dark-mode] body a.text-body { 35 | color: $body-color-dark !important; 36 | } 37 | 38 | [data-dark-mode] body .btn-primary { 39 | @include button-variant($button-color-dark, $button-color-dark); 40 | 41 | color: $body-bg-dark !important; 42 | } 43 | 44 | [data-dark-mode] body .btn-outline-primary { 45 | @include button-outline-variant($button-color-dark, $button-color-dark); 46 | 47 | color: $link-color-dark; 48 | } 49 | 50 | [data-dark-mode] body .btn-outline-primary:hover { 51 | color: $body-bg-dark; 52 | } 53 | 54 | [data-dark-mode] body .btn-doks-light { 55 | color: $navbar-dark-color; 56 | } 57 | 58 | [data-dark-mode] body .show > .btn-doks-light, 59 | [data-dark-mode] body .btn-doks-light:hover, 60 | [data-dark-mode] body .btn-doks-light:active { 61 | color: $link-color-dark; 62 | } 63 | 64 | [data-dark-mode] body .btn-menu svg { 65 | color: $body-color-dark; 66 | } 67 | 68 | [data-dark-mode] body .doks-sidebar-toggle { 69 | color: $navbar-dark-color; 70 | } 71 | 72 | [data-dark-mode] body .btn-menu:hover, 73 | [data-dark-mode] body .btn-doks-light:hover, 74 | [data-dark-mode] body .doks-sidebar-toggle:hover { 75 | background: $body-overlay-dark; 76 | } 77 | 78 | /* 79 | [data-dark-mode] body .dropdown-menu { 80 | @extend .dropdown-menu-dark; 81 | } 82 | */ 83 | 84 | [data-dark-mode] body .navbar, 85 | [data-dark-mode] body .doks-subnavbar { 86 | background-color: rgba(33, 37, 41, 0.95); 87 | border-bottom: 1px solid $border-dark; 88 | } 89 | 90 | [data-dark-mode] body.home .navbar { 91 | border-bottom: 0; 92 | } 93 | 94 | [data-dark-mode] body .offcanvas-header { 95 | border-bottom: 1px solid $gray-800; 96 | } 97 | 98 | [data-dark-mode] body .offcanvas .nav-link { 99 | color: $body-color-dark; 100 | } 101 | 102 | [data-dark-mode] body .offcanvas .nav-link:hover, 103 | [data-dark-mode] body .offcanvas .nav-link:focus { 104 | color: $link-color-dark; 105 | } 106 | 107 | [data-dark-mode] body .offcanvas .nav-link.active { 108 | color: $link-color-dark; 109 | } 110 | 111 | [data-dark-mode] body .navbar-light .navbar-brand { 112 | color: $navbar-dark-color !important; 113 | } 114 | 115 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link { 116 | color: $navbar-dark-color; 117 | } 118 | 119 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link:hover, 120 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link:focus { 121 | color: $navbar-dark-hover-color; 122 | } 123 | 124 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link.disabled { 125 | color: $navbar-dark-disabled-color; 126 | } 127 | 128 | [data-dark-mode] body .navbar-light .navbar-nav .show > .nav-link, 129 | [data-dark-mode] body .navbar-light .navbar-nav .active > .nav-link, 130 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link.show, 131 | [data-dark-mode] body .navbar-light .navbar-nav .nav-link.active { 132 | color: $navbar-dark-active-color; 133 | } 134 | 135 | [data-dark-mode] body .navbar-light .navbar-text { 136 | color: $navbar-dark-color; 137 | } 138 | 139 | [data-dark-mode] body .alert-primary a { 140 | color: $body-bg-dark; 141 | } 142 | 143 | [data-dark-mode] body .alert-doks { 144 | background: $body-overlay-dark; 145 | color: $body-color-dark; 146 | } 147 | 148 | [data-dark-mode] body .alert-doks a { 149 | color: $link-color-dark; 150 | } 151 | 152 | [data-dark-mode] body .page-links a { 153 | color: $body-color-dark; 154 | } 155 | 156 | [data-dark-mode] body .btn-toggle-nav a { 157 | color: $body-color-dark; 158 | } 159 | 160 | [data-dark-mode] body .showcase-meta a { 161 | color: $body-color-dark; 162 | } 163 | 164 | [data-dark-mode] body .showcase-meta a:hover, 165 | [data-dark-mode] body .showcase-meta a:focus { 166 | color: $link-color-dark; 167 | } 168 | 169 | [data-dark-mode] body .docs-link:hover, 170 | [data-dark-mode] body .docs-link.active, 171 | [data-dark-mode] body .page-links a:hover { 172 | text-decoration: none; 173 | color: $link-color-dark; 174 | } 175 | 176 | [data-dark-mode] body .btn-toggle { 177 | color: $body-color-dark; 178 | background-color: transparent; 179 | border: 0; 180 | } 181 | 182 | [data-dark-mode] body .btn-toggle:hover, 183 | [data-dark-mode] body .btn-toggle:focus { 184 | color: $body-color-dark; 185 | } 186 | 187 | [data-dark-mode] body .btn-toggle::before { 188 | width: 1.25em; 189 | line-height: 0; 190 | content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28222, 226, 230, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); 191 | transition: transform 0.35s ease; 192 | transform-origin: 0.5em 50%; 193 | margin-bottom: 0.125rem; 194 | } 195 | 196 | [data-dark-mode] body .btn-toggle[aria-expanded="true"] { 197 | color: $body-color-dark; 198 | } 199 | 200 | [data-dark-mode] body .btn-toggle[aria-expanded="true"]::before { 201 | transform: rotate(90deg); 202 | } 203 | 204 | [data-dark-mode] body .btn-toggle-nav a:hover, 205 | [data-dark-mode] body .btn-toggle-nav a:focus { 206 | color: $link-color-dark; 207 | } 208 | 209 | [data-dark-mode] body .btn-toggle-nav a.active { 210 | color: $link-color-dark; 211 | } 212 | 213 | [data-dark-mode] body .navbar-light .navbar-text a { 214 | color: $navbar-dark-active-color; 215 | } 216 | 217 | [data-dark-mode] body .docs-links h3.sidebar-link a, 218 | [data-dark-mode] body .page-links h3.sidebar-link a { 219 | color: $body-color-dark; 220 | } 221 | 222 | [data-dark-mode] body .navbar-light .navbar-text a:hover, 223 | [data-dark-mode] body .navbar-light .navbar-text a:focus { 224 | color: $navbar-dark-active-color; 225 | } 226 | 227 | [data-dark-mode] body .navbar .btn-link { 228 | color: $navbar-dark-color; 229 | } 230 | 231 | [data-dark-mode] body .content .btn-link { 232 | color: $link-color-dark; 233 | } 234 | 235 | [data-dark-mode] body .content .btn-link:hover { 236 | color: $link-color-dark; 237 | } 238 | 239 | [data-dark-mode] body .content img[src^="https://latex.codecogs.com/svg.latex"] { 240 | filter: invert(1); 241 | } 242 | 243 | [data-dark-mode] body .navbar .btn-link:hover { 244 | color: $navbar-dark-hover-color; 245 | } 246 | 247 | [data-dark-mode] body .navbar .btn-link:active { 248 | color: $navbar-dark-active-color; 249 | } 250 | 251 | [data-dark-mode] body .form-control.is-search { 252 | background: $body-overlay-dark; 253 | border: 1px solid transparent; 254 | color: $gray-300; 255 | 256 | /* 257 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); 258 | background-repeat: no-repeat; 259 | background-position: right calc(0.375em + 0.1875rem) center; 260 | background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); 261 | */ 262 | } 263 | 264 | [data-dark-mode] body .form-control.is-search:focus { 265 | border: 1px solid $link-color-dark; 266 | } 267 | 268 | [data-dark-mode] body .doks-search::after { 269 | color: $gray-300; 270 | border: 1px solid $gray-700; 271 | } 272 | 273 | [data-dark-mode] body .text-dark { 274 | color: $body-color-dark !important; 275 | } 276 | 277 | /* 278 | [data-dark-mode] body .navbar-form::after { 279 | color: $gray-600; 280 | border: 1px solid $gray-800; 281 | } 282 | */ 283 | 284 | [data-dark-mode] body .form-control { 285 | color: $gray-300; 286 | } 287 | 288 | [data-dark-mode] body .form-control::placeholder { 289 | color: $gray-400; 290 | opacity: 1; 291 | } 292 | 293 | [data-dark-mode] body .border-top { 294 | border-top: 1px solid $border-dark !important; 295 | } 296 | 297 | @include media-breakpoint-up(lg) { 298 | [data-dark-mode] body .docs-sidebar { 299 | order: 0; 300 | border-right: 1px solid $border-dark; 301 | } 302 | } 303 | 304 | [data-dark-mode] body .docs-navigation { 305 | border-top: 1px solid $border-dark; 306 | } 307 | 308 | [data-dark-mode] body pre code::-webkit-scrollbar-thumb { 309 | background: $gray-400; 310 | } 311 | 312 | [data-dark-mode] body code:not(.hljs) { 313 | background: $body-overlay-dark; 314 | color: $body-color-dark; 315 | } 316 | 317 | [data-dark-mode] body pre code:hover { 318 | scrollbar-width: thin; 319 | scrollbar-color: $border-dark transparent; 320 | } 321 | 322 | [data-dark-mode] body pre code::-webkit-scrollbar-thumb:hover { 323 | background: $gray-500; 324 | } 325 | 326 | [data-dark-mode] body blockquote { 327 | border-left: 3px solid $border-dark; 328 | } 329 | 330 | [data-dark-mode] body .footer { 331 | border-top: 1px solid $border-dark; 332 | } 333 | 334 | [data-dark-mode] body .docs-links, 335 | [data-dark-mode] body .docs-toc { 336 | scrollbar-width: thin; 337 | scrollbar-color: $body-bg-dark $body-bg-dark; 338 | } 339 | 340 | [data-dark-mode] body .docs-links::-webkit-scrollbar, 341 | [data-dark-mode] body .docs-toc::-webkit-scrollbar { 342 | width: 5px; 343 | } 344 | 345 | [data-dark-mode] body .docs-links::-webkit-scrollbar-track, 346 | [data-dark-mode] body .docs-toc::-webkit-scrollbar-track { 347 | background: $body-bg-dark; 348 | } 349 | 350 | [data-dark-mode] body .docs-links::-webkit-scrollbar-thumb, 351 | [data-dark-mode] body .docs-toc::-webkit-scrollbar-thumb { 352 | background: $body-bg-dark; 353 | } 354 | 355 | [data-dark-mode] body .docs-links:hover, 356 | [data-dark-mode] body .docs-toc:hover { 357 | scrollbar-width: thin; 358 | scrollbar-color: $border-dark $body-bg-dark; 359 | } 360 | 361 | [data-dark-mode] body .docs-links:hover::-webkit-scrollbar-thumb, 362 | [data-dark-mode] body .docs-toc:hover::-webkit-scrollbar-thumb { 363 | background: $border-dark; 364 | } 365 | 366 | [data-dark-mode] body .docs-links::-webkit-scrollbar-thumb:hover, 367 | [data-dark-mode] body .docs-toc::-webkit-scrollbar-thumb:hover { 368 | background: $border-dark; 369 | } 370 | 371 | [data-dark-mode] body .docs-links h3:not(:first-child) { 372 | border-top: 1px solid $border-dark; 373 | } 374 | 375 | [data-dark-mode] body a.docs-link { 376 | color: $body-color-dark; 377 | } 378 | 379 | [data-dark-mode] body .page-links li:not(:first-child) { 380 | border-top: 1px dashed $border-dark; 381 | } 382 | 383 | [data-dark-mode] body .card { 384 | background: $body-bg-dark; 385 | border: 1px solid $border-dark; 386 | } 387 | 388 | [data-dark-mode] body .card.bg-light { 389 | background: $body-overlay-dark !important; 390 | } 391 | 392 | [data-dark-mode] body .navbar .menu-icon .navicon { 393 | background: $navbar-dark-color; 394 | } 395 | 396 | [data-dark-mode] body .navbar .menu-icon .navicon::before, 397 | [data-dark-mode] body .navbar .menu-icon .navicon::after { 398 | background: $navbar-dark-color; 399 | } 400 | 401 | [data-dark-mode] body .logo-light { 402 | display: none !important; 403 | } 404 | 405 | [data-dark-mode] body .logo-dark { 406 | display: inline-block !important; 407 | } 408 | 409 | [data-dark-mode] body .bg-light { 410 | background: darken($body-bg-dark, 1.5%) !important; 411 | } 412 | 413 | [data-dark-mode] body .bg-dots { 414 | background-image: radial-gradient($dots-dark 15%, transparent 15%); 415 | } 416 | 417 | [data-dark-mode] body .text-muted { 418 | color: darken($body-color-dark, 7.5%) !important; 419 | } 420 | 421 | [data-dark-mode] body .alert-primary { 422 | background: $link-color-dark; 423 | color: $body-bg-dark; 424 | } 425 | 426 | [data-dark-mode] body .figure-caption { 427 | color: $body-color-dark; 428 | } 429 | 430 | [data-dark-mode] body table { 431 | @extend .table-dark; 432 | } 433 | 434 | [data-dark-mode] body .copy-status::after { 435 | content: "Copy"; 436 | display: block; 437 | color: $body-color-dark; 438 | } 439 | 440 | [data-dark-mode] body .copy-status:hover::after { 441 | content: "Copy"; 442 | display: block; 443 | color: $link-color-dark; 444 | } 445 | 446 | [data-dark-mode] body .copy-status:focus::after, 447 | [data-dark-mode] body .copy-status:active::after { 448 | content: "Copied"; 449 | display: block; 450 | color: $link-color-dark; 451 | } 452 | 453 | /* 454 | [data-dark-mode] body .dropdown-toggle:focus, 455 | [data-dark-mode] body .doks-sidebar-toggle:focus { 456 | box-shadow: 0 0 0 0.2rem $focus-color-dark; 457 | } 458 | */ 459 | 460 | [data-dark-mode] body .offcanvas { 461 | background-color: $body-bg-dark; 462 | } 463 | 464 | [data-dark-mode] body .btn-close { 465 | background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNkZWUyZTYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLXgiPjxsaW5lIHgxPSIxOCIgeTE9IjYiIHgyPSI2IiB5Mj0iMTgiPjwvbGluZT48bGluZSB4MT0iNiIgeTE9IjYiIHgyPSIxOCIgeTI9IjE4Ij48L2xpbmU+PC9zdmc+"); 466 | background-size: 1.5rem; 467 | } 468 | 469 | @include media-breakpoint-up(md) { 470 | [data-dark-mode] body .alert-dismissible .btn-close { 471 | background-size: 1.25rem; 472 | } 473 | } 474 | 475 | /* 476 | [data-dark-mode] body .btn-close:focus { 477 | box-shadow: 0 0 0 0.2rem $focus-color-dark; 478 | } 479 | */ 480 | 481 | [data-dark-mode] .dropdown-item { 482 | color: $body-bg-dark; 483 | } 484 | 485 | [data-dark-mode] body hr.text-black-50 { 486 | color: $gray-600 !important; 487 | } 488 | 489 | [data-dark-mode] body .email-form .form-control { 490 | background: $body-overlay-dark; 491 | border: 1px solid transparent; 492 | } 493 | 494 | [data-dark-mode] body .email-form .form-control:focus { 495 | border: 1px solid $link-color-dark; 496 | } 497 | 498 | [data-dark-mode] .page-link { 499 | color: $link-color-dark; 500 | background-color: transparent; 501 | border: $pagination-border-width solid $border-dark; 502 | 503 | &:hover { 504 | color: $body-bg-dark; 505 | background-color: $body-color-dark; 506 | border-color: $body-color-dark; 507 | } 508 | 509 | &:focus { 510 | color: $body-bg-dark; 511 | background-color: $body-color-dark; 512 | } 513 | } 514 | 515 | [data-dark-mode] .page-item { 516 | &.active .page-link { 517 | color: $body-bg-dark; 518 | 519 | @include gradient-bg($link-color-dark); 520 | 521 | border-color: $link-color-dark; 522 | } 523 | 524 | &.disabled .page-link { 525 | color: $pagination-disabled-color; 526 | background-color: $body-overlay-dark; 527 | border-color: $border-dark; 528 | } 529 | } 530 | 531 | [data-dark-mode] .dropdown-menu { 532 | background: $body-overlay-dark; 533 | } 534 | 535 | [data-dark-mode] .dropdown-menu .dropdown-item { 536 | color: $body-color-dark; 537 | } 538 | 539 | [data-dark-mode] .dropdown-menu .dropdown-item:hover { 540 | color: $link-color-dark; 541 | background: $body-bg-dark; 542 | } 543 | 544 | [data-dark-mode] .dropdown-menu .dropdown-item.active, 545 | [data-dark-mode] .dropdown-menu .dropdown-item:focus { 546 | color: $link-color-dark; 547 | background: $body-bg-dark; 548 | } 549 | 550 | [data-dark-mode] .doks-navbar .dropdown-item.current, 551 | [data-dark-mode] .doks-subnavbar .dropdown-item.current { 552 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23dee2e6' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); 553 | background-repeat: no-repeat; 554 | background-position: right 1rem top 0.6rem; 555 | background-size: 0.75rem 0.75rem; 556 | } 557 | 558 | [data-dark-mode] details { 559 | border: 1px solid $border-dark; 560 | } 561 | 562 | [data-dark-mode] summary:hover { 563 | background: $body-overlay-dark; 564 | } 565 | 566 | [data-dark-mode] details[open] > summary { 567 | border-bottom: 1px solid $border-dark; 568 | } 569 | 570 | [data-dark-mode] details summary::before { 571 | content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28222, 226, 230, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); 572 | } 573 | --------------------------------------------------------------------------------