diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d88b750f..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: '' - ---- - - - -**Describe the bug** - - - - Device/Os: [e.g. Android 10] - - Type: [e.g. Desktop/Mobile] - - Browser and version [e.g. Chrome 86.0]: - - Hugo Version [ >=0.112.4 expected]: - - Theme Version [e.g. v4.0, master, or commit-id ]: - -**Steps to reproduce the behavior:** - - -**Expected behavior**: - - -**Repo/Source where this issue can be reproduced**: - - -**Screenshots** - - -**Additional context** - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 1a4dd9b2..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: PaperMod Discussions - url: https://github.com/adityatelange/hugo-PaperMod/discussions - about: Please ask and answer questions/doubts here, do not open an issue for questions. diff --git a/.github/ISSUE_TEMPLATE/new-blank-issue.md b/.github/ISSUE_TEMPLATE/new-blank-issue.md deleted file mode 100644 index dbc48f18..00000000 --- a/.github/ISSUE_TEMPLATE/new-blank-issue.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: New Blank Issue -about: Anything other than bug report -title: "" -labels: "" -assignees: "" ---- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 00b856cb..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -**What does this PR change? What problem does it solve?** - - - - -**Was the change discussed in an issue or in the Discussions before?** - - - - -## PR Checklist - -- [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-). -- [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork). -- [ ] I have verified that the code works as described/as intended. -- [ ] This change adds a Social Icon which has a permissive license to use it. -- [ ] This change **does not** include any CDN resources/links. -- [ ] This change **does not** include any unrelated scripts such as bash and python scripts. -- [ ] This change updates the overridden internal templates from HUGO's repository. diff --git a/.github/assets/web-capture.jpeg b/.github/assets/web-capture.jpeg deleted file mode 100644 index dfd4d73e..00000000 Binary files a/.github/assets/web-capture.jpeg and /dev/null differ diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 4d35f1de..31ad7330 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,80 +1,42 @@ -name: Deploy Hugo PaperMod Demo to Pages +name: Build GH-Pages on: push: paths-ignore: - - "images/**" - - "LICENSE" - - "README.md" + - 'images/**' + - 'LICENSE' + - 'README.md' branches: - master - exampleSite workflow_dispatch: # manual run - inputs: - hugoVersion: - description: "Hugo Version" - required: false - default: "0.112.4" - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -# Default to bash -defaults: - run: - shell: bash - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write jobs: - # Build job - build: + deploy: runs-on: ubuntu-latest - env: - HUGO_VERSION: "0.112.4" steps: - - name: Check version - if: ${{ github.event.inputs.hugoVersion }} - run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}" - - name: Install Hugo CLI - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - name: Checkout - uses: actions/checkout@v3 + - name: Git checkout + uses: actions/checkout@v2 with: ref: exampleSite - - name: Setup Pages - id: pages - uses: actions/configure-pages@v3 + - name: Get Theme run: git submodule update --init --recursive + - name: Update theme to Latest commit run: git submodule update --remote --merge - - name: Build with Hugo - run: | - hugo \ - --buildDrafts --gc --verbose \ - --baseURL ${{ steps.pages.outputs.base_url }} - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + + - name: Setup hugo + uses: peaceiris/actions-hugo@v2 with: - path: ./public - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + hugo-version: 'latest' + + - name: Build + run: hugo --buildDrafts --gc --verbose --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.TOKEN }} + publish_dir: ./public diff --git a/LICENSE b/LICENSE index 34f08856..0dc94d5e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,6 @@ MIT License -Copyright (c) 2020 nanxiaobei and adityatelange -Copyright (c) 2021-2023 adityatelange +Copyright (c) 2020 nanxiaobei, adityatelange Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile deleted file mode 100644 index 1cb8381d..00000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -run-example: - cd exampleSite && hugo server -D --gc -p 13131 - -chroma-css: - hugo gen chromastyles --style=dracula > assets/css/common/chroma.css diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 8f8790e2..7a6f1cd6 --- a/README.md +++ b/README.md @@ -1,41 +1,88 @@ -## WonderMod (PaperMod fork - theme for Hugo) +![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg) +![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod) +[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod) +![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) + +# hugo-PaperMod | [Demo](https://adityatelange.github.io/hugo-PaperMod/) + +☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive + +Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper). + +The goal of this project is add more Features and customization to the og theme. + +The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ... + +ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with exampleSite as source. + +---

- WonderMod image + HomeInfo + HomeInfo

-### What is this? -WonderMod is a fork of a theme for [Hugo](https://gohugo.io/) called [PaperMod](https://github.com/adityatelange/hugo-PaperMod) (made by adityatelange), which is based on [Paper](https://github.com/nanxiaobei/hugo-paper/). Since PaperMod isn't interested in a few changes such as **removing inline JavaScript**, which I personally require to harden my websites, I decided to maintain my own fork (I didn't want to keep overwriting a bunch of files as a fork workflow is much cleaner). Don't expect a ton of changes, and unless you know me, you probably don't want to use WonderMod. +--- -When implementing new features, I try to do as much as I can with pure CSS code instead of adding new JavaScript code. I'd like to keep the JavaScript part minimal and that's why WonderMod should be totally usable when disabling JavaScript. WonderMod is also designed with strong CSP headers in mind: no inline JavaScript or style, no calls to third-parties. +## Install -**This fork is regularly synced with upstream changes from [PaperMod](https://github.com/adityatelange/hugo-PaperMod).** A merging workflow was chosen since rebasing WonderMod's changes every time could be less efficient. As such, commit history is a bit messy, but upstream changes will be merged on a best effort basis. +Read this post For More Details => [hugo-PaperMod - Installation](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/) -### Main changes -Current "main" changes are as follows: -- Remove inline JavaScript -- Improved YouTube shortcode -- Built-in Chroma instead of client-side syntax highlighting with HLJS -- Responsive Table of Contents with side display support -- Responsive "hamburger" menu for mobile -- Simple reading progress bar -- Refactored RSS template (proper Atom feed) -- Bunch of CSS and other changes +--- -### Credits -Additional credits: -- [PaperModX](https://github.com/reorx/hugo-PaperModX/) by reorx +## Features/Mods -### Configure -Most of the installation process and settings are shared with the original PaperMod, so check out [their documentation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation). One noticeable difference though is that in order to enable syntax highlighting, you have to add this to your `config.yml` : +- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. +- 3 Modes: + - Regular Mode. + - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) + - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) +- Table of Content Generation (newer implementation). +- Archive of posts. +- Social-Media Share buttons on post. +- Menu location indicator. +- Multilingual support. +- Cover image for each post (with Responsive image support). +- Light/Dark theme ( automatic theme switch a/c to browser theme). +- SEO Friendly. +- Muliple Author support. +- No webpack, nodejs and other depedencies required to edit the theme :) -``` -markup: - highlight: - style: dracula - noClasses: false - guessSyntax: true -``` +Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) -See [Hugo documentation](https://gohugo.io/getting-started/configuration-markup#highlight) for more options. -*Note: for some reason, the `guessSyntax` doesn't actually work but is required. Please make your code fences explicit for the time being.* +Release ChangeLog has info about stuff added: [Releases](https://github.com/adityatelange/hugo-PaperMod/releases) + +--- + +## Social-Icons + +Read this post For More Details => [Social-Icons](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-icons/) + +--- + +## LightHouse Report + +LightHouse + +--- + +### Sponsoring + +If you like my work and if you think this project is worth to support it, you can + + +Buy Me A Coffee + + +--- + +## Found a bug? + +If you spot any bugs, please use [Issue Tracker](https://github.com/adityatelange/hugo-PaperMod/issues) and/or +create a new [Pull Request](https://github.com/adityatelange/hugo-PaperMod/pulls) to fix the issue. + +[![GitHub issues](https://img.shields.io/github/issues-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aopen) +[![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aissue+is%3Aclosed) +[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Aopen+is%3Apr) +[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Apr+is%3Aclosed) diff --git a/assets/css/common/404.css b/assets/css/404.css similarity index 76% rename from assets/css/common/404.css rename to assets/css/404.css index 8a23430e..7954768c 100644 --- a/assets/css/common/404.css +++ b/assets/css/404.css @@ -1,3 +1,5 @@ +/* 404 +-------------------------------------------------- */ .not-found { position: absolute; left: 0; @@ -8,4 +10,4 @@ height: 80%; font-size: 160px; font-weight: 700; -} +} \ No newline at end of file diff --git a/assets/css/an-old-hope.min.css b/assets/css/an-old-hope.min.css new file mode 100644 index 00000000..acf58249 --- /dev/null +++ b/assets/css/an-old-hope.min.css @@ -0,0 +1,63 @@ +.hljs-comment, +.hljs-quote { + color: #b6b18b +} + +.hljs-deletion, +.hljs-name, +.hljs-regexp, +.hljs-selector-class, +.hljs-selector-id, +.hljs-tag, +.hljs-template-variable, +.hljs-variable { + color: #eb3c54 +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-link, +.hljs-literal, +.hljs-meta, +.hljs-number, +.hljs-params, +.hljs-type { + color: #e7ce56 +} + +.hljs-attribute { + color: #ee7c2b +} + +.hljs-addition, +.hljs-bullet, +.hljs-string, +.hljs-symbol { + color: #4fb4d7 +} + +.hljs-section, +.hljs-title { + color: #78bb65 +} + +.hljs-keyword, +.hljs-selector-tag { + color: #b45ea4 +} + +.hljs { + display: block; + overflow-x: auto; + background: #1c1d21; + color: #c0c5ce; + padding: .5em +} + +.hljs-emphasis { + font-style: italic +} + +.hljs-strong { + font-weight: 700 +} \ No newline at end of file diff --git a/assets/css/common/archive.css b/assets/css/archive.css similarity index 69% rename from assets/css/common/archive.css rename to assets/css/archive.css index 7e7e2453..ff711057 100644 --- a/assets/css/common/archive.css +++ b/assets/css/archive.css @@ -1,3 +1,5 @@ +/* Archive +-------------------------------------------------- */ .archive-posts { width: 100%; font-size: 16px; @@ -37,8 +39,22 @@ font-weight: 400; } -.archive-count, .archive-meta { color: var(--secondary); font-size: 14px; } + +.archive-count { + color: var(--secondary); + font-size: 14px; +} + +@media (max-width: 800px) { + .archive-month { + flex-direction: column; + } + + .archive-year { + margin-top: 20px; + } +} \ No newline at end of file diff --git a/assets/css/common/chroma.css b/assets/css/common/chroma.css deleted file mode 100644 index d6b0657b..00000000 --- a/assets/css/common/chroma.css +++ /dev/null @@ -1,82 +0,0 @@ -/* Background */ .chroma { color: #f8f8f2; background-color: #282a36 } -/* Other */ .chroma .x { } -/* Error */ .chroma .err { } -/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } -/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 20px; border: 0; width: auto; overflow: auto; display: block; } -/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* Keyword */ .chroma .k { color: #ff79c6 } -/* KeywordConstant */ .chroma .kc { color: #ff79c6 } -/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } -/* KeywordNamespace */ .chroma .kn { color: #ff79c6 } -/* KeywordPseudo */ .chroma .kp { color: #ff79c6 } -/* KeywordReserved */ .chroma .kr { color: #ff79c6 } -/* KeywordType */ .chroma .kt { color: #8be9fd } -/* Name */ .chroma .n { } -/* NameAttribute */ .chroma .na { color: #50fa7b } -/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } -/* NameBuiltinPseudo */ .chroma .bp { } -/* NameClass */ .chroma .nc { color: #50fa7b } -/* NameConstant */ .chroma .no { } -/* NameDecorator */ .chroma .nd { } -/* NameEntity */ .chroma .ni { } -/* NameException */ .chroma .ne { } -/* NameFunction */ .chroma .nf { color: #50fa7b } -/* NameFunctionMagic */ .chroma .fm { } -/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } -/* NameNamespace */ .chroma .nn { } -/* NameOther */ .chroma .nx { } -/* NameProperty */ .chroma .py { } -/* NameTag */ .chroma .nt { color: #ff79c6 } -/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } -/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } -/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } -/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } -/* NameVariableMagic */ .chroma .vm { } -/* Literal */ .chroma .l { } -/* LiteralDate */ .chroma .ld { } -/* LiteralString */ .chroma .s { color: #f1fa8c } -/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } -/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } -/* LiteralStringChar */ .chroma .sc { color: #f1fa8c } -/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } -/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } -/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } -/* LiteralStringEscape */ .chroma .se { color: #f1fa8c } -/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } -/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } -/* LiteralStringOther */ .chroma .sx { color: #f1fa8c } -/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } -/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } -/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } -/* LiteralNumber */ .chroma .m { color: #bd93f9 } -/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } -/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } -/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } -/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } -/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } -/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } -/* Operator */ .chroma .o { color: #ff79c6 } -/* OperatorWord */ .chroma .ow { color: #ff79c6 } -/* Punctuation */ .chroma .p { } -/* Comment */ .chroma .c { color: #6272a4 } -/* CommentHashbang */ .chroma .ch { color: #6272a4 } -/* CommentMultiline */ .chroma .cm { color: #6272a4 } -/* CommentSingle */ .chroma .c1 { color: #6272a4 } -/* CommentSpecial */ .chroma .cs { color: #6272a4 } -/* CommentPreproc */ .chroma .cp { color: #ff79c6 } -/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } -/* Generic */ .chroma .g { } -/* GenericDeleted */ .chroma .gd { color: #ff5555 } -/* GenericEmph */ .chroma .ge { text-decoration: underline } -/* GenericError */ .chroma .gr { } -/* GenericHeading */ .chroma .gh { font-weight: bold } -/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold } -/* GenericOutput */ .chroma .go { color: #44475a } -/* GenericPrompt */ .chroma .gp { } -/* GenericStrong */ .chroma .gs { } -/* GenericSubheading */ .chroma .gu { font-weight: bold } -/* GenericTraceback */ .chroma .gt { } -/* GenericUnderline */ .chroma .gl { text-decoration: underline } -/* TextWhitespace */ .chroma .w { } diff --git a/assets/css/common/header.css b/assets/css/common/header.css deleted file mode 100644 index 6387055a..00000000 --- a/assets/css/common/header.css +++ /dev/null @@ -1,182 +0,0 @@ -.nav { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - max-width: calc(var(--nav-width) + var(--gap) * 2); - margin-inline-start: auto; - margin-inline-end: auto; - line-height: var(--header-height); -} - -.nav a { - display: block; -} - -.logo, -#menu { - display: flex; - margin: auto var(--gap); -} - -.logo { - flex-wrap: inherit; -} - -.logo a { - font-size: 24px; - font-weight: 700; -} - -.logo a img, .logo a svg { - display: inline; - vertical-align: middle; - pointer-events: none; - transform: translate(0, -10%); - border-radius: 6px; - margin-inline-end: 8px; -} - -button#theme-toggle { - font-size: 26px; - margin: auto 4px; -} - -body.dark #moon { - vertical-align: middle; - display: none; -} - -body:not(.dark) #sun { - display: none; -} - -#menu { - list-style: none; - word-break: keep-all; - overflow-x: auto; - white-space: nowrap; -} - -#menu li + li { - margin-inline-start: var(--gap); -} - -#hamburger-input { - display: none; -} - -#hamburger-menu { - display: none; - width: 18px; - height: 18px; - margin: auto; - margin-right: 13px; - margin-left: 13px; - background: linear-gradient( - var(--primary), var(--primary) 20%, - #ffffff00 20%, #ffffff00 40%, - var(--primary) 40%, var(--primary) 60%, - #ffffff00 60%, #ffffff00 80%, - var(--primary) 80%, var(--primary) 100% - ); - z-index: 10001; - cursor: pointer; -} - -@media screen and (max-width: 900px) { - #menu { - display: none; - } - - #hamburger-menu { - display: inline; - } - - #hamburger-input:checked ~ #hamburger-menu { - background: none; - } - - #hamburger-input:checked ~ #hamburger-menu:after { - content: "\00d7"; - position: fixed; - font-size: 28px; - line-height: 0; - top: 28px; - } - - #hamburger-input:checked ~ .overlay { - visibility: visible; - } - - #hamburger-input:checked ~ #menu { - display: block; - width: 80%; - margin: auto; - position: fixed; - top: 50%; - left: 50%; - margin-right: -50%; - transform: translate(-50%, -50%); - z-index: 10002; - } - - #menu li { - text-align: center; - } - - #menu li + li { - margin-inline-start: 0; - } -} - -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - visibility: hidden; - overflow: hidden; - background: var(--theme); - z-index: 10000; -} - -#menu a { - font-size: 16px; -} - -#menu .active { - font-weight: 500; - border-bottom: 2px solid currentColor; -} - -.lang-switch li, -.lang-switch ul, -.logo-switches { - display: inline-flex; - margin: auto 4px; -} - -.lang-switch { - display: flex; - flex-wrap: inherit; -} - -.lang-switch a { - margin: auto 3px; - font-size: 16px; - font-weight: 500; -} - -.logo-switches { - flex-wrap: inherit; -} - -#progressBar { - --scrollAmount: 0%; - width: var(--scrollAmount); - height: 3px; - background-color: #1e8cdb; - position: fixed; - z-index: 9999; -} \ No newline at end of file diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css deleted file mode 100644 index 0e14f18a..00000000 --- a/assets/css/common/post-single.css +++ /dev/null @@ -1,423 +0,0 @@ -.page-header, -.post-header { - margin: 24px auto var(--content-gap) auto; -} - -.post-title { - margin-bottom: 2px; - font-size: 40px; -} - -.post-description { - margin-top: 10px; - margin-bottom: 5px; -} - -.post-meta, -.breadcrumbs { - color: var(--secondary); - font-size: 14px; - display: flex; - flex-wrap: wrap; -} - -.post-meta .i18n_list li { - display: inline-flex; - list-style: none; - margin: auto 3px; - box-shadow: 0 1px 0 var(--secondary); -} - -.breadcrumbs a { - font-size: 16px; -} - -.post-content { - color: var(--content); -} - -.post-content h3, -.post-content h4, -.post-content h5, -.post-content h6 { - margin: 24px 0 16px; -} - -.post-content h1 { - margin: 40px auto 32px; - font-size: 40px; -} - -.post-content h2 { - margin: 32px auto 24px; - font-size: 32px; -} - -.post-content h3 { - font-size: 24px; -} - -.post-content h4 { - font-size: 16px; -} - -.post-content h5 { - font-size: 14px; -} - -.post-content h6 { - font-size: 12px; -} - -.post-content a, -.toc a:hover { - border-bottom: 1px solid var(--primary); -} - -.post-content a code { - margin: auto 0; - border-radius: 0; - box-shadow: 0 -1px 0 var(--primary) inset; -} - -.post-content del { - text-decoration: line-through; -} - -.post-content dl, -.post-content ol, -.post-content p, -.post-content figure, -.post-content ul { - margin-bottom: var(--content-gap); -} - -.post-content ol, -.post-content ul { - padding-inline-start: 20px; -} - -.post-content li { - margin-top: 5px; -} - -.post-content li p { - margin-bottom: 0; -} - -.post-content dl { - display: flex; - flex-wrap: wrap; - margin: 0; -} - -.post-content dt { - width: 25%; - font-weight: 700; -} - -.post-content dd { - width: 75%; - margin-inline-start: 0; - padding-inline-start: 10px; -} - -.post-content dd ~ dd, -.post-content dt ~ dt { - margin-top: 10px; -} - -.post-content table { - margin-bottom: var(--content-gap); -} - -.post-content table th, -.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td { - min-width: 80px; - padding: 8px 5px; - line-height: 1.5; - border-bottom: 1px solid var(--border); -} - -.post-content table th { - text-align: start; -} - -.post-content table:not(.highlighttable) td code:only-child { - margin: auto 0; -} - -.post-content .highlight table { - border-radius: var(--radius); -} - -.post-content .highlight:not(table) { - margin: 10px auto; - border-radius: var(--radius); - direction: ltr; -} - -.post-content li > .highlight { - margin-inline-end: 0; -} - -.post-content ul pre { - margin-inline-start: calc(var(--gap) * -2); -} - -.post-content .highlight pre { - margin: 0; -} - -.post-content .highlighttable { - table-layout: fixed; -} - -.post-content .highlighttable td:first-child { - width: 40px; -} - -.post-content .highlighttable td .linenodiv { - padding-inline-end: 0 !important; -} - -.post-content .highlighttable td .highlight, -.post-content .highlighttable td .linenodiv pre { - margin-bottom: 0; -} - -.post-content .highlighttable td .highlight pre code::-webkit-scrollbar { - display: none; -} - -/* code block */ -.post-content .chroma { - border-radius: var(--radius); -} - -.post-content code { - /* inline code */ - background-color: var(--tertiary); - margin: auto 4px; - padding: 4px 6px; - font-size: 0.78em; - line-height: 1.5; - border-radius: 4px; -} - -.post-content pre code { - /* reset inline code */ - background-color: unset; - display: block; - margin: 20px; - padding: 10px; - overflow-x: auto; - word-break: break-all; -} - -.post-content .chroma code { - background-color: inherit; -} - -.post-content blockquote { - margin: 20px 0; - padding: 0 14px; - border-inline-start: 3px solid var(--primary); -} - -.post-content hr { - margin: 30px 0; - height: 2px; - background: var(--tertiary); - border: 0; -} - -.post-content iframe { - max-width: 100%; -} - -.post-content img { - border-radius: 4px; - margin: 1rem 0; -} - -.post-content img[src*="#center"] { - margin: 1rem auto; -} - -.post-content figure.align-center { - text-align: center; -} - -.post-content figure > figcaption { - color: var(--primary); - font-size: 16px; - font-weight: bold; - margin: 8px 0 16px; -} - -.post-content figure > figcaption > p { - color: var(--secondary); - font-size: 14px; - font-weight: normal; -} - -.toc { - margin: 0 2px 40px 2px; - border: 1px solid var(--border); - background: var(--tertiary); - border-radius: var(--radius); - padding: 0.4em; -} - -@media screen and (min-width: 1400px) { - .toc.side { - position: fixed; - right: 30px; - top: 100px; - width: 300px; - font-size: .9em; - max-height: calc(100% - 150px); - overflow: auto; - } -} - -.dark .toc { - background: var(--entry); -} - -.toc details summary { - cursor: pointer; - margin-inline-start: 20px; -} - -.toc .details { - display: inline; - font-weight: 500; -} - -.toc .inner { - margin: 0 20px; - padding: 10px 20px; -} - -.toc li ul { - margin-inline-start: var(--gap); -} - -.toc summary:focus { - outline: 0; -} - -.post-footer { - margin-top: 56px; -} - -.post-footer>* { - margin-bottom: 10px; -} - -.post-tags { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.post-tags li { - display: inline-block; -} - -.post-tags a, -.paginav { - border-radius: var(--radius); - background: var(--code-bg); - border: 1px solid var(--border); -} - -.post-tags a { - display: block; - padding: 0 14px; - color: var(--secondary); - font-size: 14px; - line-height: 34px; - background: var(--tertiary); -} - -.share-buttons { - padding: 10px; - display: flex; - justify-content: center; - overflow-x: auto; - gap: 10px; -} - -.share-buttons li, -.share-buttons a { - display: inline-flex; -} - -.share-buttons a:not(:last-of-type) { - margin-inline-end: 12px; -} - -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { - border-bottom: none; - display: inline-flex; - color: var(--secondary); - margin-inline-start: 8px; - font-weight: 500; - user-select: none; -} - -.paginav { - display: flex; - line-height: 30px; - border-radius: var(--radius); - background: none; - border: none; -} - -.paginav a { - padding-inline-start: 14px; - padding-inline-end: 14px; - border-radius: var(--radius); -} - -.paginav .title { - letter-spacing: 1px; - text-transform: uppercase; - font-size: small; - color: var(--secondary); -} - -.paginav .prev, -.paginav .next { - width: 50%; -} - -.paginav span:hover:not(.title) { - box-shadow: 0 1px 0; -} - -.paginav .next { - margin-inline-start: auto; - text-align: right; -} - -[dir="rtl"] .paginav .next { - text-align: left; -} - -h1>a>svg { - display: inline; -} - -img.in-text { - display: inline; - margin: auto; -} diff --git a/assets/css/common/profile-mode.css b/assets/css/common/profile-mode.css deleted file mode 100644 index 9e98df55..00000000 --- a/assets/css/common/profile-mode.css +++ /dev/null @@ -1,43 +0,0 @@ -.buttons, -.main .profile { - display: flex; - justify-content: center; -} - -.main .profile { - align-items: center; - min-height: calc(100vh - var(--header-height) - var(--footer-height) - (var(--gap) * 2)); - text-align: center; -} - -.profile .profile_inner { - display: flex; - flex-direction: column; - align-items: center; - gap: 10px; -} - -.profile img { - border-radius: 50%; -} - -.buttons { - flex-wrap: wrap; - max-width: 400px; -} - -.button { - background: var(--tertiary); - border-radius: var(--radius); - margin: 8px; - padding: 6px; - transition: transform 0.1s; -} - -.button-inner { - padding: 0 8px; -} - -.button:active { - transform: scale(0.96); -} diff --git a/assets/css/common/search.css b/assets/css/common/search.css deleted file mode 100644 index 38d5b6bc..00000000 --- a/assets/css/common/search.css +++ /dev/null @@ -1,45 +0,0 @@ -#searchbox input { - padding: 4px 10px; - width: 100%; - color: var(--primary); - font-weight: bold; - border: 2px solid var(--tertiary); - border-radius: var(--radius); -} - -#searchbox input:focus { - border-color: var(--secondary); -} - -#searchResults li { - list-style: none; - border-radius: var(--radius); - padding: 10px; - margin: 10px 0; - position: relative; - font-weight: 500; -} - -#searchResults { - margin: 10px 0; - width: 100%; -} - -#searchResults li:active { - transition: transform 0.1s; - transform: scale(0.98); -} - -#searchResults a { - position: absolute; - width: 100%; - height: 100%; - top: 0px; - left: 0px; - outline: none; -} - -#searchResults .focus { - transform: scale(0.98); - border: 2px solid var(--tertiary); -} diff --git a/assets/css/core/license.css b/assets/css/core/license.css deleted file mode 100644 index 62340074..00000000 --- a/assets/css/core/license.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - PaperMod v7 - License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE - Copyright (c) 2020 nanxiaobei and adityatelange - Copyright (c) 2021-2023 adityatelange -*/ diff --git a/assets/css/core/theme-vars.css b/assets/css/core/theme-vars.css deleted file mode 100644 index 76d85eab..00000000 --- a/assets/css/core/theme-vars.css +++ /dev/null @@ -1,36 +0,0 @@ -:root { - --gap: 24px; - --content-gap: 20px; - --nav-width: 1024px; - --main-width: 720px; - --header-height: 60px; - --footer-height: 60px; - --radius: 8px; - --theme: #e2e4f2; - --entry: #efefff; - --primary: rgb(30, 30, 30); - --secondary: rgb(108, 108, 108); - --tertiary: #c3c5d0; - --content: rgb(31, 31, 31); - --code-bg: #e2e4f2; - --border: rgb(238, 238, 238); -} - -.dark { - --theme: #1f2125; - --entry: #26282e; - --primary: rgb(218, 218, 219); - --secondary: rgb(155, 156, 157); - --tertiary: #3a3c42; - --content: rgb(196, 196, 197); - --code-bg: rgb(55, 56, 62); - --border: none; -} - -.list { - background: var(--code-bg); -} - -.dark.list { - background: var(--theme); -} diff --git a/assets/css/core/zmedia.css b/assets/css/core/zmedia.css deleted file mode 100644 index a68fd718..00000000 --- a/assets/css/core/zmedia.css +++ /dev/null @@ -1,55 +0,0 @@ -@media screen and (max-width: 768px) { - /* theme-vars */ - :root { - --gap: 14px; - } - - /* profile-mode */ - .profile img { - transform: scale(0.85); - } - - /* post-entry */ - .first-entry { - min-height: 260px; - } - - /* archive */ - .archive-month { - flex-direction: column; - } - - .archive-year { - margin-top: 20px; - } - - /* footer */ - .footer { - padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap); - } -} - -/* footer */ -@media screen and (max-width: 900px) { - .list .top-link { - transform: translateY(-5rem); - } -} - -@media screen and (max-width: 340px) { - .share-buttons { - justify-content: unset; - } -} - -@media (prefers-reduced-motion) { - /* terms; profile-mode; post-single; post-entry; post-entry; search; search */ - .terms-tags a:active, - .button:active, - .post-entry:active, - .top-link, - #searchResults .focus, - #searchResults li:active { - transform: none; - } -} diff --git a/assets/css/extended/blank.css b/assets/css/extended/blank.css deleted file mode 100644 index a5772953..00000000 --- a/assets/css/extended/blank.css +++ /dev/null @@ -1,5 +0,0 @@ -/* -This is just a placeholder blank stylesheet so as to support adding custom styles budled with theme's default styles - -Read https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets for more info -*/ diff --git a/assets/css/extended/youtube.css b/assets/css/extended/youtube.css deleted file mode 100644 index c313d073..00000000 --- a/assets/css/extended/youtube.css +++ /dev/null @@ -1,16 +0,0 @@ -.youtube-embed-div { - position: relative; - padding-bottom: 56.25%; - margin-bottom: 20px; - height: 0; - overflow: hidden; -} - -.youtube-embed-frame { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; -} \ No newline at end of file diff --git a/assets/css/common/footer.css b/assets/css/footer.css similarity index 65% rename from assets/css/common/footer.css rename to assets/css/footer.css index 5addb1e0..cf7197f9 100644 --- a/assets/css/common/footer.css +++ b/assets/css/footer.css @@ -1,13 +1,11 @@ -.footer, -.top-link { - font-size: 12px; - color: var(--secondary); -} - +/* Footer +-------------------------------------------------- */ .footer { max-width: calc(var(--main-width) + var(--gap) * 2); margin: auto; - padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap); + padding: calc((var(--footer-height) - (var(--gap)) - 10px) / 2) var(--gap); + color: var(--secondary); + font-size: 12px; text-align: center; line-height: 24px; } @@ -17,21 +15,20 @@ margin-inline-end: 1px; } -.footer span:last-child { - white-space: nowrap; -} - .footer a { color: inherit; border-bottom: 1px solid var(--secondary); } .footer a:hover { + color: var(--primary); border-bottom: 1px solid var(--primary); } .top-link { + font-size: 12px; visibility: hidden; + opacity: 0; position: fixed; bottom: 60px; right: 30px; @@ -40,21 +37,14 @@ width: 42px; height: 42px; padding: 12px; + color: var(--secondary); border-radius: 64px; - transition: visibility 0.5s, opacity 0.8s linear; + fill: currentColor; + fill-opacity: 80%; + transition: visibility 0.5s, + opacity 0.8s linear; } -.top-link, -.top-link svg { - filter: drop-shadow(0px 0px 0px var(--theme)); -} - -.footer a:hover, .top-link:hover { color: var(--primary); -} - -.top-link:focus, -#theme-toggle:focus { - outline: 0; -} +} \ No newline at end of file diff --git a/assets/css/header.css b/assets/css/header.css new file mode 100644 index 00000000..9697ac7e --- /dev/null +++ b/assets/css/header.css @@ -0,0 +1,91 @@ +/* Header +-------------------------------------------------- */ +.nav { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: calc(var(--nav-width) + var(--gap) * 2); + margin-inline-start: auto; + margin-inline-end: auto; + line-height: var(--header-height); +} + +.nav a { + display: block; +} + +.logo, +.menu { + display: flex; + margin: auto var(--gap); + flex-wrap: inherit; +} + +.logo a { + font-size: 24px; + font-weight: 700; +} + +.logo a img { + display: inline; + vertical-align: middle; + pointer-events: none; + transform: translate(0, -10%); + border-radius: 6px; + margin-inline-end: 8px; +} + +.theme-toggle svg { + height: 18px; + margin: 0 10px; + user-select: none; + cursor: pointer; +} + +body.dark #moon { + vertical-align: middle; + display: none; +} + +body:not(.dark) #sun { + display: none; +} + +.menu { + list-style: none; + word-break: keep-all; + overflow-x: auto; + white-space: nowrap; +} + +.menu li+li { + margin-inline-start: var(--gap); +} + +.menu a { + font-size: 16px; +} + +.menu .active { + font-weight: 500; + border-bottom: 2px solid currentColor; +} + +.lang-switch ul { + display: inline-flex; +} + +.lang-switch a { + font-size: 16px; + font-weight: 500; + margin: 0 8px; +} + +.lang-switch li { + display: inline-flex; +} + +.logo-switches { + display: inline-flex; + flex-wrap: inherit; +} diff --git a/assets/css/includes/noscript.css b/assets/css/includes/noscript.css deleted file mode 100644 index 80f9389b..00000000 --- a/assets/css/includes/noscript.css +++ /dev/null @@ -1,8 +0,0 @@ -#theme-toggle, -.top-link { - display: none; -} - -#searchInput { - display: none; -} \ No newline at end of file diff --git a/assets/css/includes/scroll-bar.css b/assets/css/includes/scroll-bar.css deleted file mode 100644 index 7d3c45f1..00000000 --- a/assets/css/includes/scroll-bar.css +++ /dev/null @@ -1,80 +0,0 @@ -/* from reset */ -::-webkit-scrollbar-track { - background: 0 0; -} - -.list:not(.dark)::-webkit-scrollbar-track { - background: var(--code-bg); -} - -::-webkit-scrollbar-thumb { - background: var(--tertiary); - border: 5px solid var(--theme); - border-radius: var(--radius); -} - -.list:not(.dark)::-webkit-scrollbar-thumb { - border: 5px solid var(--code-bg); -} - -::-webkit-scrollbar-thumb:hover { - background: var(--secondary); -} - -::-webkit-scrollbar:not(.highlighttable, .highlight table, .gist .highlight) { - background: var(--theme); -} - -/* from post-single */ -.post-content .highlighttable td .highlight pre code::-webkit-scrollbar { - display: none; -} - -.post-content :not(table) ::-webkit-scrollbar-thumb { - border: 2px solid var(--hljs-bg); - background: rgb(113, 113, 117); -} - -.post-content :not(table) ::-webkit-scrollbar-thumb:hover { - background: rgb(163, 163, 165); -} - -.gist table::-webkit-scrollbar-thumb { - border: 2px solid rgb(255, 255, 255); - background: rgb(173, 173, 173); -} - -.gist table::-webkit-scrollbar-thumb:hover { - background: rgb(112, 112, 112); -} - -.post-content table::-webkit-scrollbar-thumb { - border-width: 2px; -} - -/* from zmedia */ -@media screen and (min-width: 768px) { - - /* reset */ - ::-webkit-scrollbar { - width: 19px; - height: 11px; - } -} - -/* side ToC */ - -.toc.side::-webkit-scrollbar-thumb { - border: none; - background: var(--secondary); -} - -.toc.side::-webkit-scrollbar { - width: 8px; -} - -/* code */ - -.highlight pre code::-webkit-scrollbar { - height: 6px; -} \ No newline at end of file diff --git a/assets/css/common/main.css b/assets/css/main.css similarity index 58% rename from assets/css/common/main.css rename to assets/css/main.css index 25ae4dae..68f8a2f1 100644 --- a/assets/css/common/main.css +++ b/assets/css/main.css @@ -1,3 +1,5 @@ +/* Main +-------------------------------------------------- */ .main { position: relative; min-height: calc(100vh - var(--header-height) - var(--footer-height)); @@ -6,6 +8,16 @@ padding: var(--gap); } +@media screen and (max-width: 400px) { + .main { + min-height: calc(100vh - var(--header-height) - var(--footer-height) - 24px); + } +} + +.page-header { + margin-bottom: 24px; +} + .page-header h1 { font-size: 40px; } @@ -27,10 +39,12 @@ margin-inline-start: auto; } +.social-icons { + padding: 12px 0; +} -.social-icons a { - display: inline-flex; - padding: 10px; +.social-icons a:not(:last-of-type) { + margin-inline-end: 12px; } .social-icons a svg { @@ -38,29 +52,14 @@ width: 26px; } -code { +.direction-rtl { + direction: rtl; +} + +.direction-ltr { direction: ltr; } -div.highlight, -pre { - position: relative; -} - -.copy-code { - display: none; - position: absolute; - top: 4px; - right: 4px; - color: rgba(255, 255, 255, 0.8); - background: rgba(78, 78, 78, 0.8); - border-radius: var(--radius); - padding: 0 5px; - font-size: 14px; - user-select: none; -} - -div.highlight:hover .copy-code, -pre:hover .copy-code { - display: block; +code { + direction: ltr; } diff --git a/assets/css/common/post-entry.css b/assets/css/post-entry.css similarity index 82% rename from assets/css/common/post-entry.css rename to assets/css/post-entry.css index 3d52d3f3..074e4b64 100644 --- a/assets/css/common/post-entry.css +++ b/assets/css/post-entry.css @@ -1,12 +1,20 @@ +/* Post entry +-------------------------------------------------- */ .first-entry { position: relative; display: flex; flex-direction: column; justify-content: center; - min-height: 220px; + min-height: 320px; margin: var(--gap) 0 calc(var(--gap) * 2) 0; } +@media screen and (max-width: 600px) { + .first-entry { + min-height: 260px; + } +} + .first-entry .entry-header { overflow: hidden; display: -webkit-box; @@ -14,9 +22,8 @@ -webkit-line-clamp: 3; } -.first-entry .entry-header h1 { +.first-entry .entry-header h2 { font-size: 34px; - line-height: 1.4; } .first-entry .entry-content { @@ -30,7 +37,7 @@ } .home-info .entry-content { - -webkit-line-clamp: unset; + -webkit-line-clamp: 5; } .post-entry { @@ -40,7 +47,6 @@ background: var(--entry); border-radius: var(--radius); transition: transform 0.1s; - border: 1px solid var(--border); } .post-entry:active { @@ -53,7 +59,6 @@ .entry-header h2 { font-size: 24px; - line-height: 1.3; } .entry-content { @@ -80,26 +85,23 @@ bottom: 0; } -.entry-hint { +.entry-isdraft { + display: inline; color: var(--secondary); -} - -.entry-hint-parent { - display: flex; - justify-content: space-between; + font-size: 14px; } .entry-cover { - font-size: 14px; margin-bottom: var(--gap); text-align: center; + font-size: 14px; + color: var(--secondary); } .entry-cover img { border-radius: var(--radius); pointer-events: none; width: 100%; - height: auto; } .entry-cover a { diff --git a/assets/css/post-single.css b/assets/css/post-single.css new file mode 100644 index 00000000..3e25d08d --- /dev/null +++ b/assets/css/post-single.css @@ -0,0 +1,319 @@ +/* Post single +-------------------------------------------------- */ +.post-header { + margin: 24px auto var(--content-gap) auto +} + +.post-title { + margin-bottom: 2px; + font-size: 40px; + transform: translateX(-2px); +} + +.post-meta { + color: var(--secondary); + font-size: 14px; + display: flex; + flex-wrap: wrap; +} + +.post-meta .i18n_list li { + display: inline-flex; + list-style: none; + margin: auto 3px; + box-shadow: 0 1px 0 var(--secondary); +} + +.post-content { + color: var(--content); +} + +.post-content h3, +.post-content h4, +.post-content h5, +.post-content h6 { + margin: 24px 0 16px 0; +} + +.post-content h1 { + margin: 40px auto 32px auto; + font-size: 40px; +} + +.post-content h2 { + margin: 32px auto 24px auto; + font-size: 32px; +} + +.post-content h3 { + font-size: 24px; +} + +.post-content h4 { + font-size: 16px; +} + +.post-content h5 { + font-size: 14px; +} + +.post-content h6 { + font-size: 12px; +} + +.post-content a { + box-shadow: 0 1px 0 var(--primary); +} + +.post-content a code { + margin: auto 0; + border-radius: 0; + box-shadow: 0 -1px 0 var(--primary) inset; +} + +.post-content del { + text-decoration: none; + background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50% / 1px 1px repeat-x; +} + +.post-content p, +.post-content ul, +.post-content ol, +.post-content dl { + margin-bottom: var(--content-gap); +} + +.post-content ul, +.post-content ol { + padding-inline-start: 20px; +} + +.post-content li { + margin-top: 5px; +} + +.post-content li p { + margin-bottom: 0; +} + +.post-content dl { + display: flex; + flex-wrap: wrap; + margin: 0; +} + +.post-content dt { + width: 25%; + font-weight: 700; +} + +.post-content dd { + width: 75%; + margin-inline-start: 0; + padding-inline-start: 10px; +} + +.post-content dt~dt, +.post-content dd~dd { + margin-top: 10px; +} + +.post-content table { + margin-bottom: 32px; +} + +.post-content table th, +.post-content table:not(.highlighttable) td { + min-width: 80px; + padding: 12px 8px; + line-height: 1.5; + border-bottom: 1px solid var(--border); +} + +.post-content table th { + font-size: 14px; + text-align: start; +} + +.post-content table:not(.highlighttable) td code:only-child { + margin: auto 0; +} + +.post-content .highlight, +.post-content pre { + margin: auto calc(var(--gap) * -1) 32px calc(var(--gap) * -1); + background: var(--hljs-bg) !important; + border-radius: var(--radius); +} + +.post-content li>.highlight { + margin-inline-end: 0 +} + +.post-content ul pre { + margin-inline-start: calc(var(--gap) * -2); +} + +.post-content .highlight pre { + margin: 0; +} + +/* table */ +.post-content .highlighttable { + table-layout: fixed; +} + +.post-content .highlighttable td:first-child { + width: 40px; +} + +.post-content .highlighttable td .linenodiv { + padding-inline-end: 0 !important; +} + +.post-content .highlighttable td .linenodiv pre, +.post-content .highlighttable td .highlight { + margin-bottom: 0; +} + +.post-content .highlighttable td .highlight pre code::-webkit-scrollbar { + display: none; +} + +/* inline */ +.post-content .highlight span { + background: transparent !important; +} + +.post-content code { + margin: auto 4px; + padding: 4px 6px; + font-family: Menlo, Monaco, 'Courier New', Courier, monospace; + font-size: 0.78em; + line-height: 1.5; + background: var(--code-bg); + border-radius: 2px; +} + +.post-content pre code { + display: block; + margin: auto 0; + padding: 10px; + color: rgba(255, 255, 255, 0.8); + background: transparent; + border-radius: 0; + overflow-x: auto; +} + +.post-content blockquote { + margin: 0 calc(var(--gap) * -1); + padding: 0 32px; + border-inline-start: 2px solid var(--primary); +} + +.post-content hr { + margin: 30px calc(var(--gap) * -1); + height: 2px; + background: var(--tertiary); + border-top: 0; + border-bottom: 0; +} + +.post-content iframe { + max-width: 100%; +} + +.post-content img { + border-radius: 4px; +} + +.toc { + margin-bottom: 40px; + border: 1px solid var(--border); + border-radius: var(--radius); + padding: .5em; +} + +.toc details summary { + cursor: zoom-in; + margin-inline-start: 20px; +} + +.toc details[open] summary { + cursor: zoom-out; +} + +.toc .details { + display: inline; + font-weight: 500; +} + +.toc blockquote { + margin: 0 20px; + padding: 10px 20px; +} + +.toc li ul { + margin-inline-start: var(--gap); +} + +.post-footer { + margin-top: 56px; +} + +.post-tags li { + display: inline-block; + margin-inline-end: 3px; + margin-bottom: 5px; +} + +.post-tags a { + display: block; + padding-inline-start: 14px; + padding-inline-end: 14px; + color: var(--secondary); + font-size: 14px; + line-height: 34px; + background: var(--code-bg); + border-radius: 4px; + border: 1px solid var(--tertiary); +} + +.post-tags a:hover { + background: var(--border); +} + +.share-buttons { + margin-top: var(--gap); + border: 1px solid var(--tertiary); + padding-inline-start: var(--radius); + border-radius: var(--radius); + display: flex; + overflow-x: auto; +} + +.share-buttons a { + margin-top: 10px; +} + +.share-buttons a:not(:last-of-type) { + margin-inline-end: 12px; +} + +.share-buttons a svg { + height: 30px; + width: 30px; + fill: currentColor; + transition: transform 0.1s; +} + +.share-buttons svg:hover { + transform: scale(0.96); +} + +@media screen and (max-width: 600px) { + .post-content blockquote { + margin: 0 calc(var(--gap) * -1); + padding: 0 21px; + } +} diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css new file mode 100644 index 00000000..8c218043 --- /dev/null +++ b/assets/css/profile-mode.css @@ -0,0 +1,62 @@ +.main { + text-align: center; + display: table; +} + +.main>.profile { + display: table-cell; + vertical-align: middle; +} + +.main>.profile>.profile_inner { + transform: translate(0, -10%); +} + +.profile_inner h1 { + padding: 12px 0; +} + +.profile_inner span { + padding: 10px 0; + font-size: 18px; +} + +img { + display: inline-table; + width: 180px; + border-radius: 50%; + pointer-events: none; +} + +@media screen and (max-width: 600px) { + img { + width: 150px; + } + .main>.profile>.profile_inner { + transform: translate(0, 0); + } +} + +.buttons { + display: flex; + flex-wrap: wrap; + justify-content: center; + max-width: 400px; + margin: 0 auto; +} + +.button { + background: var(--tertiary); + border-radius: var(--radius); + margin: 8px; + padding: 6px; + transition: transform 0.1s; +} + +.button-inner { + padding: 0 8px; +} + +.button:active { + transform: scale(0.96); +} \ No newline at end of file diff --git a/assets/css/core/reset.css b/assets/css/reset.css similarity index 51% rename from assets/css/core/reset.css rename to assets/css/reset.css index d41fcadb..68aa1e90 100644 --- a/assets/css/core/reset.css +++ b/assets/css/reset.css @@ -1,31 +1,20 @@ +/* Reset +-------------------------------------------------- */ *, -::after, -::before { +*::before, +*::after { box-sizing: border-box; } html { -webkit-tap-highlight-color: transparent; - overflow-y: scroll; - scroll-behavior: smooth; - -webkit-text-size-adjust: 100%; - text-size-adjust: 100%; -} - -a, -button, -body, -h1, -h2, -h3, -h4, -h5, -h6 { - color: var(--primary); } body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + margin: 0; + color: var(--primary); + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, + 'Open Sans', 'Helvetica Neue', sans-serif; font-size: 18px; line-height: 1.6; word-break: break-word; @@ -41,8 +30,7 @@ header, hgroup, main, nav, -section, -table { +section { display: block; } @@ -52,31 +40,28 @@ h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: 0; + color: var(--primary); line-height: 1.2; } -h1, -h2, -h3, -h4, -h5, -h6, p { margin-top: 0; margin-bottom: 0; } ul { + margin: 0; padding: 0; } a { + color: var(--primary); text-decoration: none; } -body, -figure, -ul { +figure { margin: 0; } @@ -84,7 +69,8 @@ table { width: 100%; border-collapse: collapse; border-spacing: 0; - overflow-x: auto; + display: block; + overflow-x: scroll; word-break: keep-all; } @@ -93,21 +79,24 @@ input, textarea { padding: 0; font: inherit; - background: 0 0; + background: transparent; border: 0; + -webkit-appearance: none; +} + +button, +input[type='button'], +input[type='submit'] { + cursor: pointer; } input, textarea { + padding: 0; + border: 0; outline: 0; } -button, -input[type=button], -input[type=submit] { - cursor: pointer; -} - input:-webkit-autofill, textarea:-webkit-autofill { box-shadow: 0 0 0 50px var(--theme) inset; @@ -117,3 +106,32 @@ img { display: block; max-width: 100%; } + +*::-webkit-scrollbar { + width: 10px; + height: 6px; +} + +*::-webkit-scrollbar-track { + background: var(--theme); +} + +*::-webkit-scrollbar-thumb { + background: var(--tertiary); + border-radius: var(--radius); +} + +*::-webkit-scrollbar-thumb:hover { + background: var(--secondary); +} + +@media screen and (max-width: 800px) { + *::-webkit-scrollbar { + width: 8px; + height: 2px; + } +} + +*:focus { + outline:none; +} diff --git a/assets/css/common/terms.css b/assets/css/terms.css similarity index 92% rename from assets/css/common/terms.css rename to assets/css/terms.css index 244614bc..1fc9807b 100644 --- a/assets/css/common/terms.css +++ b/assets/css/terms.css @@ -12,7 +12,7 @@ transition: transform 0.1s; } -.terms-tags a:active { +.terms-tags a:hover { background: var(--tertiary); transform: scale(0.96); -} +} \ No newline at end of file diff --git a/assets/css/theme-vars.css b/assets/css/theme-vars.css new file mode 100644 index 00000000..8e152ffb --- /dev/null +++ b/assets/css/theme-vars.css @@ -0,0 +1,49 @@ +/* Theme +-------------------------------------------------- */ +:root { + --gap: 24px; + --content-gap: 20px; + --nav-width: 1024px; + --main-width: 720px; + --header-height: 60px; + --footer-height: 60px; + --radius: 8px; + + --theme: #fff; + --entry: #fff; + --primary: rgba(0, 0, 0, 0.88); + --secondary: rgba(0, 0, 0, 0.56); + --tertiary: rgba(0, 0, 0, 0.16); + --content: rgba(0, 0, 0, 0.88); + + --hljs-bg: #1c1d21; + --code-bg: #f5f5f5; + --border: #eee; +} + +@media screen and (max-width: 600px) { + :root { + --gap: 14px; + } +} + +.dark { + --theme: #1d1e20; + --entry: #2e2e33; + --primary: rgba(255, 255, 255, 0.84); + --secondary: rgba(255, 255, 255, 0.56); + --tertiary: rgba(255, 255, 255, 0.16); + --content: rgba(255, 255, 255, 0.64); + + --hljs-bg: #2e2e33; + --code-bg: #37383e; + --border: #5b5d67; +} + +.list { + background: var(--code-bg); +} + +.dark.list { + background: var(--theme); +} \ No newline at end of file diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js deleted file mode 100644 index 9484e751..00000000 --- a/assets/js/fastsearch.js +++ /dev/null @@ -1,152 +0,0 @@ -import * as params from '@params'; - -let fuse; // holds our search engine -let resList = document.getElementById('searchResults'); -let sInput = document.getElementById('searchInput'); -let first, last, current_elem = null -let resultsAvailable = false; - -// load our search index -window.onload = function () { - let xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - let data = JSON.parse(xhr.responseText); - if (data) { - // fuse.js options; check fuse.js website for details - let options = { - distance: 100, - threshold: 0.4, - ignoreLocation: true, - keys: [ - 'title', - 'permalink', - 'summary', - 'content' - ] - }; - if (params.fuseOpts) { - options = { - isCaseSensitive: params.fuseOpts.iscasesensitive ?? false, - includeScore: params.fuseOpts.includescore ?? false, - includeMatches: params.fuseOpts.includematches ?? false, - minMatchCharLength: params.fuseOpts.minmatchcharlength ?? 1, - shouldSort: params.fuseOpts.shouldsort ?? true, - findAllMatches: params.fuseOpts.findallmatches ?? false, - keys: params.fuseOpts.keys ?? ['title', 'permalink', 'summary', 'content'], - location: params.fuseOpts.location ?? 0, - threshold: params.fuseOpts.threshold ?? 0.4, - distance: params.fuseOpts.distance ?? 100, - ignoreLocation: params.fuseOpts.ignorelocation ?? true - } - } - fuse = new Fuse(data, options); // build the index from the json file - } - } else { - console.log(xhr.responseText); - } - } - }; - xhr.open('GET', "../index.json"); - xhr.send(); -} - -function activeToggle(ae) { - document.querySelectorAll('.focus').forEach(function (element) { - // rm focus class - element.classList.remove("focus") - }); - if (ae) { - ae.focus() - document.activeElement = current_elem = ae; - ae.parentElement.classList.add("focus") - } else { - document.activeElement.parentElement.classList.add("focus") - } -} - -function reset() { - resultsAvailable = false; - resList.innerHTML = sInput.value = ''; // clear inputbox and searchResults - sInput.focus(); // shift focus to input box -} - -// execute search as each character is typed -sInput.onkeyup = function (e) { - // run a search query (for "term") every time a letter is typed - // in the search box - if (fuse) { - let results; - if (params.fuseOpts) { - results = fuse.search(this.value.trim(), {limit: params.fuseOpts.limit}); // the actual query being run using fuse.js along with options - } else { - results = fuse.search(this.value.trim()); // the actual query being run using fuse.js - } - if (results.length !== 0) { - // build our html if result exists - let resultSet = ''; // our results bucket - - for (let item in results) { - resultSet += `
  • ${results[item].item.title} »
    ` + - `
  • ` - } - - resList.innerHTML = resultSet; - resultsAvailable = true; - first = resList.firstChild; - last = resList.lastChild; - } else { - resultsAvailable = false; - resList.innerHTML = ''; - } - } -} - -sInput.addEventListener('search', function (e) { - // clicked on x - if (!this.value) reset() -}) - -// kb bindings -document.onkeydown = function (e) { - let key = e.key; - let ae = document.activeElement; - - let inbox = document.getElementById("searchbox").contains(ae) - - if (ae === sInput) { - let elements = document.getElementsByClassName('focus'); - while (elements.length > 0) { - elements[0].classList.remove('focus'); - } - } else if (current_elem) ae = current_elem; - - if (key === "Escape") { - reset() - } else if (!resultsAvailable || !inbox) { - return - } else if (key === "ArrowDown") { - e.preventDefault(); - if (ae == sInput) { - // if the currently focused element is the search input, focus the of first
  • - activeToggle(resList.firstChild.lastChild); - } else if (ae.parentElement != last) { - // if the currently focused element's parent is last, do nothing - // otherwise select the next search result - activeToggle(ae.parentElement.nextSibling.lastChild); - } - } else if (key === "ArrowUp") { - e.preventDefault(); - if (ae.parentElement == first) { - // if the currently focused element is first item, go to input box - activeToggle(sInput); - } else if (ae != sInput) { - // if the currently focused element is input box, do nothing - // otherwise select the previous search result - activeToggle(ae.parentElement.previousSibling.lastChild); - } - } else if (key === "ArrowRight") { - ae.click(); // click on active link - } -} diff --git a/assets/js/fuse.basic.min.js b/assets/js/fuse.basic.min.js deleted file mode 100644 index 74577214..00000000 --- a/assets/js/fuse.basic.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io) - * - * Copyright (c) 2023 Kiro Risk (http://kiro.me) - * All Rights Reserved. Apache Software License 2.0 - * - * http://www.apache.org/licenses/LICENSE-2.0 - */ -var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?O.getFn:n,o=t.fieldNormWeight,a=void 0===o?O.fieldNormWeight:o;r(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(j).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),a=parseFloat(Math.round(o*r)/r);return n.set(i,a),a},clear:function(){n.clear()}}}(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return o(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,f(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();f(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?O.getFn:r,o=n.fieldNormWeight,a=void 0===o?O.fieldNormWeight:o,c=new A({getFn:i,fieldNormWeight:a});return c.setKeys(e.map(x)),c.setSources(t),c.create(),c}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?O.distance:s,u=t.ignoreLocation,l=void 0===u?O.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}var F=32;function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?O.location:i,a=r.distance,c=void 0===a?O.distance:a,s=r.threshold,h=void 0===s?O.threshold:s,u=r.findAllMatches,l=void 0===u?O.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?O.minMatchCharLength:d,v=r.includeMatches,g=void 0===v?O.includeMatches:v,y=r.ignoreLocation,p=void 0===y?O.ignoreLocation:y;if(t.length>F)throw new Error("Pattern length exceeds max of ".concat(F,"."));for(var m,b=t.length,k=e.length,M=Math.max(0,Math.min(o,k)),w=h,x=M,L=f>1||g,S=L?Array(k):[];(m=e.indexOf(t,x))>-1;){var _=I(t,{currentLocation:m,expectedLocation:M,distance:c,ignoreLocation:p});if(w=Math.min(_,w),x=m+b,L)for(var j=0;j=$;z-=1){var J=z-1,R=n[e.charAt(J)];if(L&&(S[J]=+!!R),K[z]=(K[z+1]<<1|1)&R,P&&(K[z]|=(A[z+1]|A[z])<<1|1|A[z+1]),K[z]&N&&(E=I(t,{errors:P,currentLocation:J,expectedLocation:M,distance:c,ignoreLocation:p}))<=w){if(w=E,(x=J)<=M)break;$=Math.max(1,2*M-x)}}if(I(t,{errors:P+1,currentLocation:M,expectedLocation:M,distance:c,ignoreLocation:p})>w)break;A=K}var U={isMatch:x>=0,score:Math.max(.001,E)};if(L){var B=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(S,f);B.length?g&&(U.indices=B):U.isMatch=!1}return U}function N(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?O.location:o,c=i.threshold,s=void 0===c?O.threshold:c,h=i.distance,u=void 0===h?O.distance:h,l=i.includeMatches,d=void 0===l?O.includeMatches:l,f=i.findAllMatches,v=void 0===f?O.findAllMatches:f,g=i.minMatchCharLength,y=void 0===g?O.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?O.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?O.ignoreLocation:b;if(r(this,e),this.options={location:a,threshold:s,distance:u,includeMatches:d,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:k},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var M=function(e,t){n.chunks.push({pattern:e,alphabet:N(e),startIndex:t})},w=this.pattern.length;if(w>F){for(var x=0,L=w%F,S=w-L;x-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function D(e,t){t.score=e.score}var K=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(r(this,e),this.options=t(t({},O),i),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new w(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof A))throw new Error("Incorrect 'index' type");this._myIndex=t||E(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){y(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,o=r.includeScore,a=r.shouldSort,c=r.sortFn,s=r.ignoreFieldNorm,h=f(e)?f(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?O.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,a=n?n.weight:null;t*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*(r?1:i))})),e.score=t}))}(h,{ignoreFieldNorm:s}),a&&h.sort(c),v(n)&&n>-1&&(h=h.slice(0,n)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?O.includeMatches:r,o=n.includeScore,a=void 0===o?O.includeScore:o,c=[];return i&&c.push($),a&&c.push(D),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}(h,this._docs,{includeMatches:i,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=T(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(y(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var t=this,n=T(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(y(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!y(n))return[];var i=[];if(u(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(y(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,h=c.score,l=c.indices;s&&i.push({score:h,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return K.version="7.0.0",K.createIndex=E,K.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?O.getFn:n,i=t.fieldNormWeight,o=void 0===i?O.fieldNormWeight:i,a=e.keys,c=e.records,s=new A({getFn:r,fieldNormWeight:o});return s.setKeys(a),s.setIndexRecords(c),s},K.config=O,K},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(); \ No newline at end of file diff --git a/assets/js/highlight.min.js b/assets/js/highlight.min.js new file mode 100644 index 00000000..a833d38c --- /dev/null +++ b/assets/js/highlight.min.js @@ -0,0 +1,44 @@ +/* + Highlight.js 10.2.0 (da7d149b) + License: BSD-3-Clause + Copyright (c) 2006-2020, Ivan Sagalaev +*/ +var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){s+=""}function g(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var d=l();if(s+=t(r.substring(i,d[0].offset)),i=d[0].offset,d===e){o.reverse().forEach(u);do{g(d.splice(0,1)[0]),d=l()}while(d===e&&d.length&&d[0].offset===i);o.reverse().forEach(c)}else"start"===d[0].event?o.push(d[0].node):o.pop(),g(d.splice(0,1)[0])}return s+t(r.substr(i))}});const s="",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=``}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function g(e){return e?"string"==typeof e?e:e.source:null}const d="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},m={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},b=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(m),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=b("//","$"),x=b("/\\*","\\*/"),E=b("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:d,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>g(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:m,COMMENT:b,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:d,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[h,{begin:/\[/,end:/\]/,relevance:0,contains:[h]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}}),w="of and for in not or if then".split(" ");function N(e,n){return n?+n:function(e){return w.includes(e.toLowerCase())}(e)?0:1}const y={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!hljs.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,t(this.code);let e;return this.autoDetect?(e=hljs.highlightAuto(this.code),this.detectedLanguage=e.language):(e=hljs.highlight(this.language,this.code,this.ignoreIllegals),this.detectectLanguage=this.language),e.value},autoDetect(){return!(this.language&&(e=this.autodetect,!e&&""!==e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}},R={install(e){e.component("highlightjs",y)}},k=t,O=r,{nodeStream:M,mergeStreams:L}=i,T=Symbol("nomatch");return function(t){var a=[],i=Object.create(null),s=Object.create(null),o=[],l=!0,c=/(^(<[^>]+>|\t|)+|\n)/gm,d="Could not find the language '{}', did you forget to load/include a language module?";const h={disableAutodetect:!0,name:"Plain text",contains:[]};var f={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function p(e){return f.noHighlightRe.test(e)}function m(e,n,t,r){var a={code:n,language:e};S("before:highlight",a);var i=a.result?a.result:b(a.language,a.code,t,r);return i.code=a.code,S("after:highlight",i),i}function b(e,t,a,s){var o=t;function c(e,n){var t=E.case_insensitive?n[0].toLowerCase():n[0];return Object.prototype.hasOwnProperty.call(e.keywords,t)&&e.keywords[t]}function u(){null!=R.subLanguage?function(){if(""!==L){var e=null;if("string"==typeof R.subLanguage){if(!i[R.subLanguage])return void M.addText(L);e=b(R.subLanguage,L,!0,O[R.subLanguage]),O[R.subLanguage]=e.top}else e=v(L,R.subLanguage.length?R.subLanguage:null);R.relevance>0&&(j+=e.relevance),M.addSublanguage(e.emitter,e.language)}}():function(){if(!R.keywords)return void M.addText(L);let e=0;R.keywordPatternRe.lastIndex=0;let n=R.keywordPatternRe.exec(L),t="";for(;n;){t+=L.substring(e,n.index);const r=c(R,n);if(r){const[e,a]=r;M.addText(t),t="",j+=a,M.addKeyword(n[0],e)}else t+=n[0];e=R.keywordPatternRe.lastIndex,n=R.keywordPatternRe.exec(L)}t+=L.substr(e),M.addText(t)}(),L=""}function h(e){return e.className&&M.openNode(e.className),R=Object.create(e,{parent:{value:R}})}function p(e){return 0===R.matcher.regexIndex?(L+=e[0],1):(I=!0,0)}var m={};function x(t,r){var i=r&&r[0];if(L+=t,null==i)return u(),0;if("begin"===m.type&&"end"===r.type&&m.index===r.index&&""===i){if(L+=o.slice(r.index,r.index+1),!l){const n=Error("0 width match regex");throw n.languageName=e,n.badRule=m.rule,n}return 1}if(m=r,"begin"===r.type)return function(e){var t=e[0],r=e.rule;const a=new n(r),i=[r.__beforeBegin,r["on:begin"]];for(const n of i)if(n&&(n(e,a),a.ignore))return p(t);return r&&r.endSameAsBegin&&(r.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),r.skip?L+=t:(r.excludeBegin&&(L+=t),u(),r.returnBegin||r.excludeBegin||(L=t)),h(r),r.returnBegin?0:t.length}(r);if("illegal"===r.type&&!a){const e=Error('Illegal lexeme "'+i+'" for mode "'+(R.className||"")+'"');throw e.mode=R,e}if("end"===r.type){var s=function(e){var t=e[0],r=o.substr(e.index),a=function e(t,r,a){let i=function(e,n){var t=e&&e.exec(n);return t&&0===t.index}(t.endRe,a);if(i){if(t["on:end"]){const e=new n(t);t["on:end"](r,e),e.ignore&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,r,a)}(R,e,r);if(!a)return T;var i=R;i.skip?L+=t:(i.returnEnd||i.excludeEnd||(L+=t),u(),i.excludeEnd&&(L=t));do{R.className&&M.closeNode(),R.skip||R.subLanguage||(j+=R.relevance),R=R.parent}while(R!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),h(a.starts)),i.returnEnd?0:t.length}(r);if(s!==T)return s}if("illegal"===r.type&&""===i)return 1;if(S>1e5&&S>3*r.index)throw Error("potential infinite loop, way more iterations than matches");return L+=i,i.length}var E=y(e);if(!E)throw console.error(d.replace("{}",e)),Error('Unknown language: "'+e+'"');var _=function(e){function n(n,t){return RegExp(g(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,n="|"){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+=n),a+="(";o.length>0;){var l=t.exec(o);if(null==l){a+=o;break}a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),"\\"===l[0][0]&&l[1]?a+="\\"+(+l[1]+s):(a+=l[0],"("===l[0]&&r++)}a+=")"}return a}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex((e,n)=>n>0&&void 0!==e),r=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,r)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach(([e,t])=>n.addRule(e,t)),n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){return 0!=this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;const t=n.exec(e);return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&(this.regexIndex=0)),t}}function i(e,n){const t=e.input[e.index-1],r=e.input[e.index+e[0].length];"."!==t&&"."!==r||n.ignoreMatch()}if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return function t(s,o){const l=s;if(s.compiled)return l;s.compiled=!0,s.__beforeBegin=null,s.keywords=s.keywords||s.beginKeywords;let c=null;if("object"==typeof s.keywords&&(c=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=function(e,n){var t={};return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){r(n,e[n])})),t;function r(e,r){n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|");t[r[0]]=[e,N(r[0],r[1])]}))}}(s.keywords,e.case_insensitive)),s.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l.keywordPatternRe=n(s.lexemes||c||/\w+/,!0),o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",s.__beforeBegin=i),s.begin||(s.begin=/\B|\b/),l.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(l.endRe=n(s.end)),l.terminator_end=g(s.end)||"",s.endsWithParent&&o.terminator_end&&(l.terminator_end+=(s.end?"|":"")+o.terminator_end)),s.illegal&&(l.illegalRe=n(s.illegal)),void 0===s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return r(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:function e(n){return!!n&&(n.endsWithParent||e(n.starts))}(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?s:e)}))),s.contains.forEach((function(e){t(e,l)})),s.starts&&t(s.starts,o),l.matcher=function(e){const n=new a;return e.contains.forEach(e=>n.addRule(e.begin,{rule:e,type:"begin"})),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(l),l}(e)}(E),w="",R=s||_,O={},M=new f.__emitter(f);!function(){for(var e=[],n=R;n!==E;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>M.openNode(e))}();var L="",j=0,A=0,S=0,I=!1;try{for(R.matcher.considerAll();;){S++,I?I=!1:(R.matcher.lastIndex=A,R.matcher.considerAll());const e=R.matcher.exec(o);if(!e&&R.matcher.resumingScanAtSamePosition()){L+=o[A],A+=1;continue}if(!e)break;const n=x(o.substring(A,e.index),e);A=e.index+n}return x(o.substr(A)),M.closeAllNodes(),M.finalize(),w=M.toHTML(),{relevance:j,value:w,language:e,illegal:!1,emitter:M,top:R}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:o.slice(A-100,A+100),mode:n.mode},sofar:w,relevance:0,value:k(o),emitter:M};if(l)return{illegal:!1,relevance:0,value:k(o),emitter:M,language:e,top:R,errorRaised:n};throw n}}function v(e,n){n=n||f.languages||Object.keys(i);var t=function(e){const n={relevance:0,emitter:new f.__emitter(f),value:k(e),illegal:!1,top:h};return n.emitter.addText(e),n}(e),r=t;return n.filter(y).filter(A).forEach((function(n){var a=b(n,e,!1);a.language=n,a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)})),r.language&&(t.second_best=r),t}function x(e){return f.tabReplace||f.useBR?e.replace(c,e=>"\n"===e?f.useBR?"
    ":e:f.tabReplace?e.replace(/\t/g,f.tabReplace):e):e}function E(e){let n=null;const t=function(e){var n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=f.languageDetectRe.exec(n);if(t){var r=y(t[1]);return r||(console.warn(d.replace("{}",t[1])),console.warn("Falling back to no-highlight mode for this block.",e)),r?t[1]:"no-highlight"}return n.split(/\s+/).find(e=>p(e)||y(e))}(e);if(p(t))return;S("before:highlightBlock",{block:e,language:t}),f.useBR?(n=document.createElement("div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"):n=e;const r=n.textContent,a=t?m(t,r,!0):v(r),i=M(n);if(i.length){const e=document.createElement("div");e.innerHTML=a.value,a.value=L(i,M(e),r)}a.value=x(a.value),S("after:highlightBlock",{block:e,result:a}),e.innerHTML=a.value,e.className=function(e,n,t){var r=n?s[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),e.includes(r)||a.push(r),a.join(" ").trim()}(e.className,t,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const w=()=>{if(!w.called){w.called=!0;var e=document.querySelectorAll("pre code");a.forEach.call(e,E)}};function y(e){return e=(e||"").toLowerCase(),i[e]||i[s[e]]}function j(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach(e=>{s[e]=n})}function A(e){var n=y(e);return n&&!n.disableAutodetect}function S(e,n){var t=e;o.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(t,{highlight:m,highlightAuto:v,fixMarkup:function(e){return console.warn("fixMarkup is deprecated and will be removed entirely in v11.0"),console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534"),x(e)},highlightBlock:E,configure:function(e){f=O(f,e)},initHighlighting:w,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",w,!1)},registerLanguage:function(e,n){var r=null;try{r=n(t)}catch(n){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!l)throw n;console.error(n),r=h}r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&j(r.aliases,{languageName:e})},listLanguages:function(){return Object.keys(i)},getLanguage:y,registerAliases:j,requireLanguage:function(e){var n=y(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:A,inherit:O,addPlugin:function(e){o.push(e)},vuePlugin:R}),t.debugMode=function(){l=!1},t.safeMode=function(){l=!0},t.versionString="10.2.0";for(const n in _)"object"==typeof _[n]&&e(_[n]);return Object.assign(t,_),t}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); +hljs.registerLanguage("apache",function(){"use strict";return function(e){var n={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"",contains:[n,{className:"number",begin:":\\d{1,5}"},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}()); +hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const t={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,t]};t.contains.push(n);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},i=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[i,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}()); +hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},c=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:c,returnBegin:!0,contains:[o],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:a,keywords:l}}}}()); +hljs.registerLanguage("c",function(){"use strict";return function(e){var n=e.requireLanguage("c-like").rawDefinition();return n.name="C",n.aliases=["c","h"],n}}()); +hljs.registerLanguage("coffeescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((e=>n=>!e.includes(n))(["var","const","let","function","static"])).join(" "),literal:n.concat(["yes","no","on","off"]).join(" "),built_in:a.concat(["npm","print"]).join(" ")},i="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/}/,keywords:t},o=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=o;var c=r.inherit(r.TITLE_MODE,{begin:i}),l={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:o.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[c,l]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}()); +hljs.registerLanguage("cpp",function(){"use strict";return function(e){var i=e.requireLanguage("c-like").rawDefinition();return i.disableAutodetect=!1,i.name="C++",i.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],i}}()); +hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in init int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}()); +hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}()); +hljs.registerLanguage("go",function(){"use strict";return function(e){var n={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:n,illegal:"e(n)).join("")}return function(a){var s={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],relevance:0},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(n=>e(n)).join("|")+")";return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}()); +hljs.registerLanguage("java",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}function a(...n){return n.map(n=>e(n)).join("")}function s(...n){return"("+n.map(n=>e(n)).join("|")+")"}return function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},r=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{begin:`\\b(0[bB]${r("01")})[lL]?`},{begin:`\\b(0${r("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,s(a(r("a-fA-F0-9"),/\./,r("a-fA-F0-9")),a(r("a-fA-F0-9"),/\.?/),a(/\./,r("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,s(a(/\d*\./,r("\\d")),r("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,r(/\d/),n(/\.?/),n(r(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface enum",end:/[{;=]/,excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}()); +hljs.registerLanguage("javascript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function s(e){return r("(?=",e,")")}function r(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(t){var i="[A-Za-z$_][0-9A-Za-z$_]*",c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.join(" "),literal:n.join(" "),built_in:a.join(" ")},l={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:t.C_NUMBER_RE+"n?"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]};E.contains=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,l,t.REGEXP_MODE];var b=E.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(E.contains,[t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE])},t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]),_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:b};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,contains:[t.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,l,{begin:r(/[{,\n]\s*/,s(r(/(((\/\/.*$)|(\/\*(.|\n)*\*\/))\s*)*/,i+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:i+s("\\s*:"),relevance:0}]},{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:b}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:c.begin,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:i}),_],illegal:/\[|%/},{begin:/\$[(.]/},t.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+i+"\\()",end:/{/,keywords:"get set",contains:[t.inherit(t.TITLE_MODE,{begin:i}),{begin:/\(\)/},_]}],illegal:/#(?!!)/}}}()); +hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}()); +hljs.registerLanguage("kotlin",function(){"use strict";return function(e){var n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}()); +hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}()); +hljs.registerLanguage("lua",function(){"use strict";return function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},a=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}}()); +hljs.registerLanguage("makefile",function(){"use strict";return function(e){var i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[c],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}()); +hljs.registerLanguage("markdown",function(){"use strict";return function(n){const e={begin:"<",end:">",subLanguage:"xml",relevance:0},a={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},s={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(s),s.contains.push(i);var c=[e,a];return i.contains=i.contains.concat(c),s.contains=s.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(i,s)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}()); +hljs.registerLanguage("nginx",function(){"use strict";return function(e){var n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}],illegal:"[^\\s\\}]"}}}()); +hljs.registerLanguage("objectivec",function(){"use strict";return function(e){var n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:n,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}()); +hljs.registerLanguage("perl",function(){"use strict";return function(e){var n={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},t={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},s={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,t,r],a=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),s,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return t.contains=a,s.contains=a,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:a}}}()); +hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'"}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},s={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},c={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:c,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},l,s]}}}()); +hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}()); +hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}()); +hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}()); +hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}()); +hljs.registerLanguage("python-repl",function(){"use strict";return function(n){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}()); +hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}()); +hljs.registerLanguage("rust",function(){"use strict";return function(e){var n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}}()); +hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE]}]}}}()); +hljs.registerLanguage("shell",function(){"use strict";return function(s){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}()); +hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}}()); +hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("typescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:n.join(" "),built_in:a.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:r.C_NUMBER_RE+"n?"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},c={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[r.BACKSLASH_ESCAPE,o]};o.contains=[r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,i,r.REGEXP_MODE];var d={begin:"\\(",end:/\)/,keywords:t,contains:["self",r.QUOTE_STRING_MODE,r.APOS_STRING_MODE,r.NUMBER_MODE]},u={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,s,d]};return{name:"TypeScript",aliases:["ts"],keywords:t,contains:[r.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,i,{begin:"("+r.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,r.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+r.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:r.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:d.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",r.inherit(r.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),u],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",u]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+r.IDENT_RE,relevance:0},s,d]}}}()); +hljs.registerLanguage("yaml",function(){"use strict";return function(e){var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={begin:"{",end:"}",contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t,g,s],c=[...b];return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:b}}}()); \ No newline at end of file diff --git a/assets/js/license.js b/assets/js/license.js deleted file mode 100644 index 62340074..00000000 --- a/assets/js/license.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - PaperMod v7 - License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE - Copyright (c) 2020 nanxiaobei and adityatelange - Copyright (c) 2021-2023 adityatelange -*/ diff --git a/assets/js/papermod.js b/assets/js/papermod.js deleted file mode 100644 index 2c6874ce..00000000 --- a/assets/js/papermod.js +++ /dev/null @@ -1,106 +0,0 @@ -import * as params from '@params'; - -function scrollToTop() { - const topButton = document.getElementById("top-link"); - - document.addEventListener('scroll', () => { - if (document.body.scrollTop > 600 || document.documentElement.scrollTop > 600) { - topButton.style.visibility = "visible"; - topButton.style.opacity = "1"; - } else { - topButton.style.visibility = "hidden"; - topButton.style.opacity = "0"; - } - }) -} - -function themeToggle() { - const themeButton = document.getElementById("theme-toggle"); - - themeButton.addEventListener("click", () => { - if (document.body.className.includes("dark")) { - document.body.classList.remove('dark'); - localStorage.setItem("pref-theme", 'light'); - } else { - document.body.classList.add('dark'); - localStorage.setItem("pref-theme", 'dark'); - } - }) -} - -function showCodeCopyButtons() { - document.querySelectorAll('pre > code').forEach((codeblock) => { - const container = codeblock.parentNode.parentNode; - - const copybutton = document.createElement('button'); - copybutton.classList.add('copy-code'); - copybutton.innerHTML = 'copy'; - - function copyingDone() { - copybutton.innerHTML = 'copied!'; - setTimeout(() => { - copybutton.innerHTML = 'copy'; - }, 2000); - } - - copybutton.addEventListener('click', (cb) => { - if ('clipboard' in navigator) { - navigator.clipboard.writeText(codeblock.textContent); - copyingDone(); - return; - } - - const range = document.createRange(); - range.selectNodeContents(codeblock); - const selection = window.getSelection(); - selection.removeAllRanges(); - selection.addRange(range); - try { - document.execCommand('copy'); - copyingDone(); - } catch (e) { }; - selection.removeRange(range); - }); - - if (container.classList.contains("highlight")) { - container.appendChild(copybutton); - } else if (container.parentNode.firstChild == container) { - // td containing LineNos - } else if (codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "TABLE") { - // table containing LineNos and code - codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(copybutton); - } else { - // code blocks not having highlight as parent class - codeblock.parentNode.appendChild(copybutton); - } - }); -} - -function openToc() { - const toc = document.getElementById("toc"); - - if (!toc) return; - - if (window.innerWidth > 1500 && window.innerHeight > 800) { - toc.open = true; - } -} - -function progressBar() { - const bar = document.getElementById("progressBar"); - - if (!bar) return; - - document.addEventListener('scroll', () => { - let scrollPercent = document.documentElement.scrollTop / (document.documentElement.scrollHeight - window.innerHeight) * 100; - if (scrollPercent >= 99) { scrollPercent = 0 }; - bar.style.setProperty("--scrollAmount", scrollPercent + '%'); - }) -} - - -if (params.scrollToTop) scrollToTop(); -if (params.themeToggle) themeToggle(); -if (params.showCodeCopyButtons) showCodeCopyButtons(); -openToc(); -progressBar(); \ No newline at end of file diff --git a/assets/js/theme.js b/assets/js/theme.js deleted file mode 100644 index 079c0906..00000000 --- a/assets/js/theme.js +++ /dev/null @@ -1,12 +0,0 @@ -function loadPreferredTheme() { - const preferredTheme = localStorage.getItem("pref-theme"); - const isDarkTheme = document.body.classList.contains("dark"); - - if (preferredTheme === "light" && isDarkTheme) { - document.body.classList.remove('dark') - } else if (preferredTheme === "dark" && !isDarkTheme) { - document.body.classList.add('dark') - } -} - -loadPreferredTheme(); \ No newline at end of file diff --git a/go.mod b/go.mod index d532bff2..af958556 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/Wonderfall/hugo-WonderMod +module github.com/adityatelange/hugo-PaperMod go 1.12 diff --git a/i18n/ar.yaml b/i18n/ar.yaml deleted file mode 100644 index 52990c28..00000000 --- a/i18n/ar.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- id: prev_page - translation: "السابق" - -- id: next_page - translation: "التالي" - -- id: read_time - translation: - one: "دقيقة واحدة" - two: "دقيقتان" - few: "بضع ثوان" - zero: "الآن" - other: "دقائق {{ .Count }}" - -- id: toc - translation: "فهرس المحتوى" - -- id: translations - translation: "ترجمات أخرى" - -- id: home - translation: "الصفحة الرئيسية" - -- id: code_copied - translation: "تم النسخ!" - -- id: code_copy - translation: "نسخ الكود" diff --git a/i18n/be.yaml b/i18n/be.yaml deleted file mode 100644 index 22902ab8..00000000 --- a/i18n/be.yaml +++ /dev/null @@ -1,39 +0,0 @@ -- id: prev_page - translation: "Папярэдняя" - -- id: next_page - translation: "Наступная" - -- id: read_time - translation: - zero: "0 хвілін" - one: "1 хвіліна" - few: "{{ .Count }} хвіліны" - many: "{{ .Count }} хвілін" - other: "{{ .Count }} хвілін" - -- id: words - translation: - zero: "няма слоў" - one: "1 слова" - few: "{{ .Count }} слова" - many: "{{ .Count }} слоў" - other: "{{ .Count }} слова" - -- id: toc - translation: "Змест" - -- id: translations - translation: "Пераклады" - -- id: home - translation: "Галоўная" - -- id: edit_post - translation: "Рэдагаваць" - -- id: code_copy - translation: "капіяваць" - -- id: code_copied - translation: "скапіявана!" diff --git a/i18n/bn.yaml b/i18n/bn.yaml deleted file mode 100644 index f42780f2..00000000 --- a/i18n/bn.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "পূর্ববর্তী" - -- id: next_page - translation: "পরবর্তী" - -- id: read_time - translation: - one : "১ মিনিট" - other: "{{ .Count }} মিনিট" - -- id: words - translation: - one : "১ টি শব্দ" - other: "{{ .Count }} টি শব্দ" - -- id: toc - translation: "সূচিপত্র" - -- id: translations - translation: "অনুবাদসমূহ" - -- id: home - translation: "হোম" - -- id: edit_post - translation: "সম্পাদনা করুন" - -- id: code_copy - translation: "কপি করুন" - -- id: code_copied - translation: "কপি হয়েছে!" diff --git a/i18n/ca.yaml b/i18n/ca.yaml deleted file mode 100644 index 15713e12..00000000 --- a/i18n/ca.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- id: prev_page - translation: "Pàgina anterior" - -- id: next_page - translation: "Pàgina següent" - -- id: read_time - translation: - one : "1 min" - other: "{{ .Count }} min" - -- id: toc - translation: "Taula de Continguts" - -- id: translations - translation: "Traduccions" - -- id: home - translation: "Inici" diff --git a/i18n/ckb.yaml b/i18n/ckb.yaml deleted file mode 100644 index 25789d19..00000000 --- a/i18n/ckb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- id: prev_page - translation: "پەڕەی پێشتر" - -- id: next_page - translation: "پەڕەی دواتر" - -- id: read_time - translation: - one : "1 خولەک" - other: "{{ .Count }} خولەک" - -- id: toc - translation: "پێڕست" - -- id: translations - translation: "وەرگێڕانەکان" - -- id: home - translation: "ماڵەوە" - -- id: code_copy - translation: "لەبەری بگرەوە" - -- id: code_copied - translation: "لەبەر گیرایەوە!" diff --git a/i18n/cs.yaml b/i18n/cs.yaml deleted file mode 100644 index 058c3a1c..00000000 --- a/i18n/cs.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Předchozí" - -- id: next_page - translation: "Další" - -- id: read_time - translation: - one : "1 min" - other: "{{ .Count }} min" - -- id: words - translation: - one : "slovo" - other: "{{ .Count }} slov" - -- id: toc - translation: "Obsah" - -- id: translations - translation: "Překlady" - -- id: home - translation: "Domů" - -- id: edit_post - translation: "Upravit" - -- id: code_copy - translation: "kopírovat" - -- id: code_copied - translation: "zkopírováno!" diff --git a/i18n/da.yaml b/i18n/da.yaml deleted file mode 100644 index 03b0abe7..00000000 --- a/i18n/da.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- id: prev_page - translation: "Forrige Side" - -- id: next_page - translation: "Næste Side" - -- id: read_time - translation: - one: "1 min" - other: "{{ .Count }} min" - -- id: toc - translation: "Indholdsfortegnelse" - -- id: translations - translation: "Oversættelser" - -- id: home - translation: "Start" - -- id: edit_post - translation: "Rediger" - -- id: code_copy - translation: "kopier" - -- id: code_copied - translation: "kopieret!" diff --git a/i18n/de.yaml b/i18n/de.yaml index f64aad97..e7feaacc 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -1,33 +1,5 @@ - id: prev_page - translation: "Vorherige" + translation: "Vorherige Seite" - id: next_page - translation: "Nächste" - -- id: read_time - translation: - one: "1 Minute" - other: "{{ .Count }} Minuten" - -- id: words - translation: - one : "Wort" - other: "{{ .Count }} Wörter" - -- id: toc - translation: "Inhaltsverzeichnis" - -- id: translations - translation: "Übersetzungen" - -- id: home - translation: "Home" - -- id: edit_post - translation: "Bearbeiten" - -- id: code_copy - translation: "Kopieren" - -- id: code_copied - translation: "Kopiert!" + translation: "Nächste Seite" diff --git a/i18n/el.yaml b/i18n/el.yaml deleted file mode 100644 index 4257bac8..00000000 --- a/i18n/el.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Προηγούμενο" - -- id: next_page - translation: "Επόμενο" - -- id: read_time - translation: - one: "1 λεπτό" - other: "{{ .Count }} λεπτά" - -- id: words - translation: - one: "λέξη" - other: "{{ .Count }} λέξεις" - -- id: toc - translation: "Πίνακας Περιεχομένων" - -- id: translations - translation: "Μεταφράσεις" - -- id: home - translation: "Αρχική" - -- id: edit_post - translation: "Επεξεργασία" - -- id: code_copy - translation: "αντιγραφή" - -- id: code_copied - translation: "αντιγράφηκε!" \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index 3a1e2151..14b37b5e 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,33 +1,16 @@ - id: prev_page - translation: "Prev" + translation: "Prev Page" - id: next_page - translation: "Next" + translation: "Next Page" - id: read_time translation: one : "1 min" other: "{{ .Count }} min" -- id: words - translation: - one : "word" - other: "{{ .Count }} words" - - id: toc translation: "Table of Contents" - id: translations translation: "Translations" - -- id: home - translation: "Home" - -- id: edit_post - translation: "Edit" - -- id: code_copy - translation: "copy" - -- id: code_copied - translation: "copied!" diff --git a/i18n/eo.yaml b/i18n/eo.yaml deleted file mode 100644 index de5d7443..00000000 --- a/i18n/eo.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- id: prev_page - translation: "antaŭa paĝo" - -- id: next_page - translation: "sekva paĝo" - -- id: read_time - translation: - one : "1 min" - other: "{{ .Count }} min" - -- id: toc - translation: "Enhavo" - -- id: translations - translation: "tradukoj" - -- id: home - translation: "ĉefpaĝo" - -- id: code_copy - translation: "kopii" - -- id: code_copied - translation: "kopiite!" diff --git a/i18n/es.yaml b/i18n/es.yaml index 52a559ce..38d2239d 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -1,33 +1,16 @@ - id: prev_page - translation: "Anterior" + translation: "Página anterior" - id: next_page - translation: "Siguiente" + translation: "Página siguiente" - id: read_time translation: one : "1 min" other: "{{ .Count }} min" -- id: words - translation: - one : "palabra" - other: "{{ .Count }} palabras" - - id: toc translation: "Tabla de Contenidos" - id: translations translation: "Traducciones" - -- id: home - translation: "Inicio" - -- id: edit_post - translation: "Editar" - -- id: code_copy - translation: "copiar" - -- id: code_copied - translation: "¡copiado!" diff --git a/i18n/fa.yaml b/i18n/fa.yaml index 3fd5927c..3cdd047c 100644 --- a/i18n/fa.yaml +++ b/i18n/fa.yaml @@ -1,28 +1,16 @@ - id: prev_page - translation: "صفحه قبلی" + translation: "صفحهٔ قبل" - id: next_page - translation: "صفحه بعدی" + translation: "صفحهٔ بعد" - id: read_time translation: - one: "۱ دقیقه" + one : "1 دقیقه" other: "{{ .Count }} دقیقه" - id: toc translation: "فهرست مطالب" - id: translations - translation: "ترجمه ها" - -- id: home - translation: "خانه" - -- id: edit_post - translation: "ویرایش" - -- id: code_copy - translation: "کپی" - -- id: code_copied - translation: "کپی شد!" \ No newline at end of file + translation: "ترجمه‌ها" diff --git a/i18n/fr.yaml b/i18n/fr.yaml index e48d8e98..a26a8765 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -1,33 +1,5 @@ - id: prev_page - translation: "Précédent" + translation: "Page Précédente" - id: next_page - translation: "Suivant" - -- id: read_time - translation: - one : "1 min" - other: "{{ .Count }} min" - -- id: words - translation: - one : "mot" - other: "{{ .Count }} mots" - -- id: toc - translation: "Table des matières" - -- id: translations - translation: "Traductions" - -- id: home - translation: "Accueil" - -- id: edit_post - translation: "Modifier" - -- id: code_copy - translation: "Copier" - -- id: code_copied - translation: "Copié !" + translation: "Page Suivante" diff --git a/i18n/he.yaml b/i18n/he.yaml deleted file mode 100644 index 3912fb8d..00000000 --- a/i18n/he.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "קודם" - -- id: next_page - translation: "הבא" - -- id: read_time - translation: - one : "דקה אחת" - other: "דקות {{ .Count }}" - -- id: words - translation: - one : "word" - other: "מילים {{ .Count }} " - -- id: toc - translation: "תוכן העניינים" - -- id: translations - translation: "תרגומים" - -- id: home - translation: "בית" - -- id: edit_post - translation: "ערוך" - -- id: code_copy - translation: "העתק" - -- id: code_copied - translation: "!הועתק" diff --git a/i18n/hi.yaml b/i18n/hi.yaml index 681efdc5..24e8fc61 100644 --- a/i18n/hi.yaml +++ b/i18n/hi.yaml @@ -1,17 +1,14 @@ - id: prev_page - translation: "पिछला" + translation: "पिछला पृष्ठ" - id: next_page - translation: "अगला" + translation: "अगला पृष्ठ" - id: read_time translation: one : "एक मिनट" other: "{{ .Count }} मिनट" -- id: edit_post - translation: "सुधारें" - - id: toc translation: "विषय - सूची" diff --git a/i18n/hr.yaml b/i18n/hr.yaml deleted file mode 100644 index 2f2d228c..00000000 --- a/i18n/hr.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Prethodna stranica" - -- id: next_page - translation: "Sljedeća stranica" - -- id: read_time - translation: - one : "1 minuta" - other: "{{ .Count }} minute" - -- id: words - translation: - one : "riječ" - other: "{{ .Count }} riječi" - -- id: toc - translation: "Tablica Sadržaja" - -- id: translations - translation: "Prijevodi" - -- id: home - translation: "Početna stranica" - -- id: edit_post - translation: "Promjeni" - -- id: code_copy - translation: "kopiraj" - -- id: code_copied - translation: "kopirano!" diff --git a/i18n/hu.yaml b/i18n/hu.yaml deleted file mode 100644 index a039dda9..00000000 --- a/i18n/hu.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- id: prev_page - translation: "Előző oldal" - -- id: next_page - translation: "Következő oldal" - -- id: read_time - translation: - one: "1 perc" - other: "{{ .Count }} perc" - -- id: toc - translation: "Tartalomjegyzék" - -- id: translations - translation: "Fordítások" diff --git a/i18n/id.yaml b/i18n/id.yaml deleted file mode 100644 index 93d34f5b..00000000 --- a/i18n/id.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Sebelumnya" - -- id: next_page - translation: "Selanjutnya" - -- id: read_time - translation: - one : "1 menit" - other: "{{ .Count }} menit" - -- id: words - translation: - one : "kata" - other: "{{ .Count }} kata" - -- id: toc - translation: "Daftar isi" - -- id: translations - translation: "Terjemahan" - -- id: home - translation: "Beranda" - -- id: edit_post - translation: "Sunting" - -- id: code_copy - translation: "salin" - -- id: code_copied - translation: "disalin!" \ No newline at end of file diff --git a/i18n/it.yaml b/i18n/it.yaml deleted file mode 100644 index c87c95d0..00000000 --- a/i18n/it.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Precedente" - -- id: next_page - translation: "Successivo" - -- id: read_time - translation: - one: "1 minuto" - other: "{{ .Count }} minuti" - -- id: words - translation: - one : "parola" - other: "{{ .Count }} parole" - -- id: toc - translation: "Indice contenuti" - -- id: translations - translation: "Traduzioni" - -- id: home - translation: "Home" - -- id: edit_post - translation: "Modifica" - -- id: code_copy - translation: "copia" - -- id: code_copied - translation: "copiato!" diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 93948d37..30b412d8 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -1,33 +1,5 @@ - id: prev_page - translation: "前へ" + translation: "前のページ" - id: next_page - translation: "次へ" - -- id: read_time - translation: - one : "1 分" - other: "{{ .Count }} 分" - -- id: words - translation: - one: "文字" - other: "{{ .Count }} 文字" - -- id: toc - translation: "目次" - -- id: translations - translation: "言語" - -- id: home - translation: "ホーム" - -- id: edit_post - translation: "編集" - -- id: code_copy - translation: "コピー" - -- id: code_copied - translation: "コピーされました!" + translation: "次のページ" diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 777dd938..129ad732 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -3,31 +3,3 @@ - id: next_page translation: "다음 페이지" - -- id: read_time - translation: - one : "1 분" - other: "{{ .Count }} 분" - -- id: words - translation: - one : "단어" - other: "{{ .Count }} 단어" - -- id: toc - translation: "목차" - -- id: translations - translation: "번역" - -- id: home - translation: "홈" - -- id: edit_post - translation: "편집" - -- id: code_copy - translation: "복사" - -- id: code_copied - translation: "복사 완료!" diff --git a/i18n/ku.yaml b/i18n/ku.yaml deleted file mode 100644 index d1d30a53..00000000 --- a/i18n/ku.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- id: prev_page - translation: "Rûpela Paş" - -- id: next_page - translation: "Rûpela Pêş" - -- id: read_time - translation: - one : "1 xulek" - other: "{{ .Count }} xulek" - -- id: toc - translation: "Pêrist" - -- id: translations - translation: "Wergeran" - -- id: home - translation: "Xanî" - -- id: code_copy - translation: "Jê bigire" - -- id: code_copied - translation: "Hat jêgirtin!" diff --git a/i18n/mn.yaml b/i18n/mn.yaml deleted file mode 100644 index dbce2ce6..00000000 --- a/i18n/mn.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- id: prev_page - translation: "Ѳмнѳх" - -- id: next_page - translation: "Дараах" - -- id: read_time - translation: - one : "1 МИН" - other: "{{ .Count }} МИН" - -- id: toc - translation: "Агуулга" - -- id: translations - translation: "Орчуулга" - -- id: home - translation: "Нүүр" - -- id: code_copy - translation: "хуулах" - -- id: code_copied - translation: "хуулсан!" diff --git a/i18n/ms.yaml b/i18n/ms.yaml deleted file mode 100644 index d8a9effd..00000000 --- a/i18n/ms.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- id: prev_page - translation: "Halaman Sebelumnya" - -- id: next_page - translation: "Halaman Seterusnya" - -- id: read_time - translation: - one: "1 minit" - other: "{{ .Count }} minit" - -- id: toc - translation: "Isi Kandungan" - -- id: translations - translation: "Terjemahan" - -- id: home - translation: "Home" - -- id: edit_post - translation: "Sunting" - -- id: code_copy - translation: "Salin" - -- id: code_copied - translation: "Disalin!" diff --git a/i18n/nl.yaml b/i18n/nl.yaml deleted file mode 100644 index e9d06fa5..00000000 --- a/i18n/nl.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Vorige" - -- id: next_page - translation: "Volgende" - -- id: read_time - translation: - one: "1 min" - other: "{{ .Count }} min" - -- id: words - translation: - one : "woord" - other: "{{ .Count }} woorden" - -- id: toc - translation: "Inhoudsopgave" - -- id: translations - translation: "Vertalingen" - -- id: home - translation: "Startpagina" - -- id: edit_post - translation: "Bewerk" - -- id: code_copy - translation: "kopieer" - -- id: code_copied - translation: "gekopieerd!" diff --git a/i18n/no.yaml b/i18n/no.yaml deleted file mode 100644 index 24003489..00000000 --- a/i18n/no.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Forrige Side" - -- id: next_page - translation: "Neste Side" - -- id: read_time - translation: - one: "1 min" - other: "{{ .Count }} min" - -- id: words - translation: - one: "ord" - other: "{{ .Count }} ord" - -- id: toc - translation: "Innholdsfortegnelse" - -- id: translations - translation: "Oversettelser" - -- id: home - translation: "Hjem" - -- id: edit_post - translation: "Rediger" - -- id: code_copy - translation: "Kopier" - -- id: code_copied - translation: "Kopiert!" diff --git a/i18n/pl.yaml b/i18n/pl.yaml deleted file mode 100644 index 81b0e778..00000000 --- a/i18n/pl.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Poprzednia" - -- id: next_page - translation: "Następna" - -- id: read_time - translation: - one: "1 min" - other: "{{ .Count }} min" - -- id: words - translation: - one : "słowo" - other: "{{ .Count }} słów" - -- id: toc - translation: "Spis treści" - -- id: translations - translation: "Tłumaczenia" - -- id: home - translation: "Strona Główna" - -- id: edit_post - translation: "Edytuj" - -- id: code_copy - translation: "Kopiuj" - -- id: code_copied - translation: "Skopiowano!" diff --git a/i18n/pt.yaml b/i18n/pt.yaml deleted file mode 100644 index ab06429c..00000000 --- a/i18n/pt.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Página Anterior" - -- id: next_page - translation: "Próxima Página" - -- id: read_time - translation: - one: "1 minuto" - other: "{{ .Count }} minutos" - -- id: words - translation: - one : "palavra" - other: "{{ .Count }} palavras" - -- id: toc - translation: "Conteúdo" - -- id: translations - translation: "Traduções" - -- id: home - translation: "Início" - -- id: edit_post - translation: "Editar" - -- id: code_copy - translation: "copiar" - -- id: code_copied - translation: "copiado!" diff --git a/i18n/ro.yaml b/i18n/ro.yaml deleted file mode 100644 index 694f20bd..00000000 --- a/i18n/ro.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Înapoi" - -- id: next_page - translation: "Înainte" - -- id: read_time - translation: - one : "1 minut" - other: "{{ .Count }} minute" - -- id: words - translation: - one : "cuvânt" - other: "{{ .Count }} cuvinte" - -- id: toc - translation: "Sumar" - -- id: translations - translation: "Traduceri" - -- id: home - translation: "Acasă" - -- id: edit_post - translation: "Editează" - -- id: code_copy - translation: "copiază" - -- id: code_copied - translation: "copiat!" diff --git a/i18n/ru.yaml b/i18n/ru.yaml index a5dbb5cb..cf081eab 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,39 +1,14 @@ - id: prev_page - translation: "Предыдущая" + translation: 'Предыдущая' - id: next_page - translation: "Следующая" + translation: 'Следующая' - id: read_time - translation: - zero: "0 минут" - one: "1 минута" - few: "{{ .Count }} минуты" - many: "{{ .Count }} минут" - other: "{{ .Count }} минута" - -- id: words - translation: - zero: "0 слов" - one: "1 слово" - few: "{{ .Count }} слова" - many: "{{ .Count }} слов" - other: "{{ .Count }} слово" + translation: '{{ .Count }} мин' - id: toc - translation: "Оглавление" + translation: 'Оглавление' - id: translations - translation: "Переводы" - -- id: home - translation: "Главная" - -- id: edit_post - translation: "Редактировать" - -- id: code_copy - translation: "копировать" - -- id: code_copied - translation: "скопировано!" \ No newline at end of file + translation: 'Переводы' diff --git a/i18n/sv.yaml b/i18n/sv.yaml deleted file mode 100644 index 65ce4226..00000000 --- a/i18n/sv.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- id: prev_page - translation: "Förra Sidan" - -- id: next_page - translation: "Nästa Sida" - -- id: read_time - translation: - one: "1 min" - other: "{{ .Count }} min" - -- id: toc - translation: "Innehållsförteckning" - -- id: translations - translation: "Översättningar" - -- id: home - translation: "Hem" - -- id: edit_post - translation: "Redigera" - -- id: code_copy - translation: "kopiera" - -- id: code_copied - translation: "kopierad!" diff --git a/i18n/sw.yaml b/i18n/sw.yaml deleted file mode 100644 index 5fceb1a0..00000000 --- a/i18n/sw.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Uliopita" - -- id: next_page - translation: "Ujao" - -- id: read_time - translation: - one : "dakika 1" - other: "dakika {{ .Count }}" - -- id: words - translation: - one : "neno" - other: "maneno {{ .Count }}" - -- id: toc - translation: "Jedwali la Yaliyomo" - -- id: translations - translation: "Tafsiri" - -- id: home - translation: "Mwanzo" - -- id: edit_post - translation: "Hariri" - -- id: code_copy - translation: "nakili" - -- id: code_copied - translation: "nakiliwa!" diff --git a/i18n/th.yaml b/i18n/th.yaml deleted file mode 100644 index d8036ae5..00000000 --- a/i18n/th.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "ก่อนหน้า" - -- id: next_page - translation: "ถัดไป" - -- id: read_time - translation: - one : "1 นาที" - other: "{{ .Count }} นาที" - -- id: words - translation: - one : "คำ" - other: "{{ .Count }} คำ" - -- id: toc - translation: "สารบัญ" - -- id: translations - translation: "การแปล" - -- id: home - translation: "หน้าหลัก" - -- id: edit_post - translation: "แก้ไข" - -- id: code_copy - translation: "คัดลอก" - -- id: code_copied - translation: "คัดลอกแล้ว!" diff --git a/i18n/tr.yaml b/i18n/tr.yaml deleted file mode 100644 index d11ef210..00000000 --- a/i18n/tr.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Önceki" - -- id: next_page - translation: "Sonraki" - -- id: read_time - translation: - one : "1 dk" - other: "{{ .Count }} dk" - -- id: words - translation: - one : "kelime" - other: "{{ .Count }} kelime" - -- id: toc - translation: "İçindekiler" - -- id: translations - translation: "Çeviriler" - -- id: home - translation: "Anasayfa" - -- id: edit_post - translation: "Düzenle" - -- id: code_copy - translation: "Kopyala" - -- id: code_copied - translation: "Kopyalandı!" diff --git a/i18n/uk.yaml b/i18n/uk.yaml deleted file mode 100644 index 41be9648..00000000 --- a/i18n/uk.yaml +++ /dev/null @@ -1,25 +0,0 @@ -- id: prev_page - translation: "Попередня" - -- id: next_page - translation: "Наступна" - -- id: read_time - translation: - one : "1 хвилина" - other: "{{ .Count }} хвилин" - -- id: toc - translation: "Зміст" - -- id: translations - translation: "Переклади" - -- id: home - translation: "Головна" - -- id: code_copy - translation: "копіювати" - -- id: code_copied - translation: "скопійовано!" \ No newline at end of file diff --git a/i18n/uz.yaml b/i18n/uz.yaml deleted file mode 100644 index c9f2375a..00000000 --- a/i18n/uz.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- id: prev_page - translation: "Oldingi sahifa" - -- id: next_page - translation: "Keyingi sahifa" - -- id: read_time - translation: - one : "Bir daqiqa" - other: "{{ .Count }} daqiqa" - -- id: toc - translation: "Mundarija" - -- id: translations - translation: "Tarjimalar" - -- id: home - translation: "Bosh sahifa" - diff --git a/i18n/vi.yaml b/i18n/vi.yaml deleted file mode 100644 index 2eb05d08..00000000 --- a/i18n/vi.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "Trang trước" - -- id: next_page - translation: "Trang tiếp theo" - -- id: read_time - translation: - one: "1 phút" - other: "{{ .Count }} phút" - -- id: words - translation: - one: "từ" - other: "{{ .Count }} từ" - -- id: toc - translation: "Mục lục" - -- id: translations - translation: "Bản dịch" - -- id: home - translation: "Trang chủ" - -- id: edit_post - translation: "Chỉnh sửa" - -- id: code_copy - translation: "Sao chép" - -- id: code_copied - translation: "Đã sao chép!" diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml deleted file mode 100644 index 48b84d26..00000000 --- a/i18n/zh-tw.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: prev_page - translation: "上一頁" - -- id: next_page - translation: "下一頁" - -- id: read_time - translation: - one : "1 分鐘" - other: "{{ .Count }} 分鐘" - -- id: words - translation: - one: "字" - other: "{{ .Count }} 字" - -- id: toc - translation: "目錄" - -- id: translations - translation: "語言" - -- id: home - translation: "首頁" - -- id: edit_post - translation: "編輯" - -- id: code_copy - translation: "複製" - -- id: code_copied - translation: "已複製!" diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 02804259..cb84ce99 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -9,25 +9,8 @@ one : "1 分钟" other: "{{ .Count }} 分钟" -- id: words - translation: - one: "字" - other: "{{ .Count }} 字" - - id: toc translation: "目录" - id: translations translation: "语言" - -- id: home - translation: "主页" - -- id: edit_post - translation: "编辑" - -- id: code_copy - translation: "复制" - -- id: code_copied - translation: "已复制!" diff --git a/layouts/404.html b/layouts/404.html index a405573e..6f6f3a10 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,3 +1,3 @@ -{{- define "main" }} +{{ define "main" }}
    404
    -{{- end }}{{/* end main */ -}} +{{ end }}{{/* end main */}} \ No newline at end of file diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html deleted file mode 100644 index 1acb87d1..00000000 --- a/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Text }} diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index b38e39a1..b63460ba 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -1,38 +1,10 @@ {{- define "main" }}
    {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} - -{{- if site.Params.ShowAllPagesInArchive }} -{{- $pages = site.RegularPages }} -{{- end }} - {{- range $pages.GroupByPublishDate "2006" }} {{- if ne .Key "0001" }}
    @@ -41,21 +13,13 @@ {{- range .Pages.GroupByDate "January" }}
    -

    {{- .Key }}  {{ len .Pages }}

    +

    {{- .Key }}  {{ len .Pages }}

    - {{- range .Pages }} + {{- range .Pages }} {{- if eq .Kind "page" }}
    -

    +

    {{- .Title | markdownify }} - {{- if .Draft }} - - - - - - {{- end }}

    {{- partial "post_meta.html" . -}} @@ -71,4 +35,4 @@ {{- end }} {{- end }} -{{- end }}{{/* end main */}} +{{- end }}{{/* end main */}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index df611bfb..cd999824 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,27 +1,18 @@ -{{- if lt hugo.Version "0.112.4" }} -{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }} -{{- end -}} - - + {{- partial "head.html" . }} - - {{- partialCached "header.html" . .Page -}} + + {{- partialCached "header.html" . .Page}}
    - {{- block "main" . }}{{ end }} + {{- block "main" . }} + {{- end }}
    - {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} + {{- partialCached "footer.html" . .Type }} - + \ No newline at end of file diff --git a/layouts/_default/index.json b/layouts/_default/index.json deleted file mode 100644 index feeb437d..00000000 --- a/layouts/_default/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range site.RegularPages -}} - {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} - {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} - {{- end }} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 81aea6e4..dad1d3ce 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,94 +1,51 @@ {{- define "main" }} -{{- if (and site.Params.profileMode.enabled .IsHome) }} +{{- if (and .Site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{/* if not profileMode */}} {{- if not .IsHome | and .Title }} {{- end }} -{{- if .Content }} -
    - {{- if not (.Param "disableAnchoredHeadings") }} - {{- partial "anchored_headings.html" .Content -}} - {{- else }}{{ .Content }}{{ end }} -
    -{{- end }} - {{- $pages := union .RegularPages .Sections }} {{- if .IsHome }} {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} -{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} -{{- end }} +{{- end}} -{{- $paginator := .Paginate $pages }} - -{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} -{{- partial "home_info.html" . }} -{{- end }} - -{{- $term := .Data.Term }} +{{ $paginator := .Paginate $pages }} +{{ $term := .Data.Term}} {{- range $index, $page := $paginator.Pages }} {{- $class := "post-entry" }} - -{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} -{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }} +{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}} +{{- partial "home_info.html" . }} +{{- else}} {{- $class = "first-entry" }} +{{- end }} {{- else if $term }} {{- $class = "post-entry tag-entry" }} {{- end }} -
    - {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} - {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }} + {{- partial "cover.html" (dict "cxt" . "IsHome" true) }}
    -

    - {{- .Title }} - {{- if .Draft }} - - - - - - {{- end }} +

    + {{ .Title }} + {{- if .Draft }}
      [draft]
    {{- end }}

    - {{- if (ne (.Param "hideSummary") true) }} -
    -

    {{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

    -
    + {{- if (ne .Site.Params.hideSummary true)}} +
    +

    {{ .Summary | plainify | htmlUnescape }}...

    +
    {{- end }} - {{- if not (.Param "hideMeta") }}
    {{- partial "post_meta.html" . -}}
    - {{- end }}
    {{- end }} @@ -97,25 +54,13 @@ {{- end }} - -{{- end }}{{/* end profileMode */}} - -{{- end }}{{- /* end main */ -}} +{{end}}{{/* end profileMode */}} +{{- end }}{{- /* end main */ -}} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml deleted file mode 100644 index cf8ef79b..00000000 --- a/layouts/_default/rss.xml +++ /dev/null @@ -1,80 +0,0 @@ -{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} -{{- $authorEmail := "" }} -{{- with site.Params.author }} - {{- if reflect.IsMap . }} - {{- with .email }} - {{- $authorEmail = . }} - {{- end }} - {{- end }} -{{- else }} - {{- with site.Author.email }} - {{- $authorEmail = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} - {{- end }} -{{- end }} - -{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} -{{- $authorName := "" }} -{{- with site.Params.author }} - {{- if reflect.IsMap . }} - {{- with .name }} - {{- $authorName = . }} - {{- end }} - {{- else }} - {{- $authorName = . }} - {{- end }} -{{- else }} - {{- with site.Author.name }} - {{- $authorName = . }} - {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} - {{- end }} -{{- end }} - -{{- $pctx := . }} -{{- if .IsHome }}{{ $pctx = site }}{{ end }} -{{- $pages := slice }} -{{- if or $.IsHome $.IsSection }} -{{- $pages = $pctx.RegularPages }} -{{- else }} -{{- $pages = $pctx.Pages }} -{{- end }} -{{- $limit := site.Config.Services.RSS.Limit }} -{{- if ge $limit 1 }} -{{- $pages = $pages | first $limit }} -{{- end }} - -{{- printf "" | safeHTML }} - - {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} - - - Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} - {{ .Permalink }} - Hugo - {{ site.Language.LanguageCode }} - {{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} - - {{ with $authorName }}{{ . }}{{ end }} - {{ with $authorEmail }}{{ . }}{{ end }} - - {{ with site.Copyright }}{{ . }}{{ end }} - - {{- range $pages }} - {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} - - {{ .Title }} - - {{ .Permalink }} - {{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} - {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} - {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} - {{- if site.Params.ShowFullTextinRSS }} - {{ (printf "" .Content) | safeHTML }} - {{- end }} - - {{- end }} - {{- end }} - - - - diff --git a/layouts/_default/search.html b/layouts/_default/search.html deleted file mode 100644 index fa166b50..00000000 --- a/layouts/_default/search.html +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "main" }} - - - - - -{{- end }}{{/* end main */}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fd5c75b2..b13fb74a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,67 +2,57 @@
    - {{ partial "breadcrumbs.html" . }} -

    +

    {{ .Title }} - {{- if .Draft }} - - - - - - {{- end }} + {{- if .Draft }}
      [draft]
    {{- end }}

    - {{- if .Description }} -
    - {{ .Description }} -
    - {{- end }} - {{- if not (.Param "hideMeta") }} + {{- if .Params.hideMeta }}{{ else }} - - {{- end }} + {{- end}}
    - {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} - {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }} - {{- if (.Param "ShowToc") }} - {{- partial "toc.html" . }} - {{- end }} - - {{- if .Content }} -
    - {{- if not (.Param "disableAnchoredHeadings") }} - {{- partial "anchored_headings.html" .Content -}} - {{- else }}{{ .Content }}{{ end }} + {{- partial "cover.html" (dict "cxt" . "IsHome" false) }} + {{- if .Params.ShowToc }} +
    +
    + +
    {{- i18n "toc" | default "Table of Contents" }}
    +
    +
    + {{- partial "toc.html" . }} +
    +
    {{- end }} - +
    {{ .Content }}
    - {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} + {{- if .Params.tags }} - {{- if (.Param "ShowPostNavLinks") }} - {{- partial "post_nav_links.html" . }} {{- end }} - {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} - {{- partial "share_icons.html" . -}} + {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }} + {{- partial "share_icons.html" . }} {{- end }}
    - {{- if (.Param "comments") }} + {{- if and ($.Site.Params.comments) (ne .Params.comments false) }} {{- partial "comments.html" . }} {{- end }}
    -{{- end }}{{/* end main */}} +{{- end }}{{/* end main */}} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 6fd26540..adbd2f53 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,13 +1,8 @@ -{{- define "main" }} +{{ define "main" }} {{- if .Title }} {{- end }} @@ -16,7 +11,7 @@ {{- range $key, $value := .Data.Terms.Alphabetical }} {{- $name := .Name }} {{- $count := .Count }} - {{- with site.GetPage (printf "/%s/%s" $type $name) }} + {{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
  • {{ .Name }} {{ $count }}
  • @@ -24,4 +19,4 @@ {{- end }} -{{- end }}{{/* end main */ -}} +{{ end }}{{/* end main */}} \ No newline at end of file diff --git a/layouts/partials/anchored_headings.html b/layouts/partials/anchored_headings.html deleted file mode 100644 index 377af89d..00000000 --- a/layouts/partials/anchored_headings.html +++ /dev/null @@ -1,2 +0,0 @@ -{{- /* formats .Content headings by adding an anchor */ -}} -{{ . | replaceRE "()" "${1}${3}" | safeHTML }} diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 8f2758fa..a1ef62c9 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,7 +1,7 @@ -{{- if or .Params.author site.Params.author }} -{{- $author := (.Params.author | default site.Params.author) }} +{{- if or .Params.author .Site.Params.author }} +{{- $author := (.Params.author | default .Site.Params.author)}} {{- $author_type := (printf "%T" $author) }} -{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} +{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}") ) }} {{- (delimit $author ", " ) }} {{- else }} {{- $author }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html deleted file mode 100644 index 7e8257b7..00000000 --- a/layouts/partials/breadcrumbs.html +++ /dev/null @@ -1,19 +0,0 @@ -{{- if (.Param "ShowBreadCrumbs") -}} - -{{- end -}} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 918451a1..d6ff0103 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,3 +1,5 @@ -{{- /* Comments area start */ -}} -{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} -{{- /* Comments area end */ -}} + + + \ No newline at end of file diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 706ce1f5..b4487329 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -1,43 +1,33 @@ {{- with .cxt}} {{/* Apply proper context from dict */}} -{{- if (and .Params.cover.image (not $.isHidden)) }} +{{- if .Params.cover.image }} {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} -{{- $loading := cond $.IsSingle "eager" "lazy" }}
    - {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} - {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} - {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} - {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} - {{- $cover := (or $pageBundleCover $globalResourcesCover)}} + {{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }} + {{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- if $cover -}}{{/* i.e it is present in page bundle */}} - {{- if $addLink }}{{ end -}} + {{- if $addLink }}{{ end -}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} - {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} - {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} - {{ $alt }} + {{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}" + sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}" /> {{- else }}{{/* Unprocessable image or responsive images disabled */}} - {{ $alt }} + {{ $alt }} {{- end }} {{- else }}{{/* For absolute urls and external links, no img processing here */}} - {{- if $addLink }}{{ end -}} - {{ $alt }} + {{- if $addLink }}{{ end -}} + {{ $alt }} {{- end }} {{- if $addLink }}{{ end -}} {{/* Display Caption */}} - {{- if $.IsSingle }} + {{- if not $.IsHome }} {{ with .Params.cover.caption }}

    {{ . | markdownify }}

    {{- end }} {{- end }}
    {{- end }}{{/* End image */}} -{{- end -}}{{/* End context */ -}} +{{- end -}}{{/* End context */}} diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html deleted file mode 100644 index e9ccf77f..00000000 --- a/layouts/partials/edit_post.html +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}} -{{- $fileUrlPath := path.Join .File.Path }} - -{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} - - {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} - -{{- end }} diff --git a/layouts/partials/extend_footer.html b/layouts/partials/extend_footer.html index 0519748c..52714e8c 100644 --- a/layouts/partials/extend_footer.html +++ b/layouts/partials/extend_footer.html @@ -1,3 +1,5 @@ -{{- /* Footer custom content area start */ -}} -{{- /* Insert any custom code web-analytics, resources, etc. here */ -}} -{{- /* Footer custom content area end */ -}} + + + diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html index 150cbefd..d372acc9 100644 --- a/layouts/partials/extend_head.html +++ b/layouts/partials/extend_head.html @@ -1,4 +1,5 @@ -{{- /* Head custom content area start */ -}} -{{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}} -{{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} -{{- /* Head custom content area end */ -}} + + + \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e517095a..f6d407e2 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,26 +1,70 @@ -{{- if not (.Param "hideFooter") }} -{{- end }} - -{{- if (not site.Params.disableScrollToTop) }} - - - - + + +{{- partial "extend_footer.html" . -}} +{{ if in site.Params.mainSections .Type }} +{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint -}} + + {{- end }} + +{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }} + +{{- else -}} + + +{{- end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5621a135..af7ac9d6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,110 +1,55 @@ -{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} - -{{- else }} - -{{- end }} - -{{- /* Title */}} -{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} - -{{- /* Meta */}} -{{- if .IsHome }} -{{ with site.Params.keywords -}}{{ end }} -{{- else }} + +{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }} + -{{- end }} - + {{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" /> + - -{{- if site.Params.analytics.google.SiteVerificationTag }} - -{{- end }} -{{- if site.Params.analytics.yandex.SiteVerificationTag }} - -{{- end }} -{{- if site.Params.analytics.bing.SiteVerificationTag }} - -{{- end }} -{{- if site.Params.analytics.naver.SiteVerificationTag }} - -{{- end }} - -{{- /* Styles */}} - -{{- /* includes */}} -{{- $includes := slice }} -{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}} - -{{- if not (eq site.Params.assets.disableScrollBarStyle true) }} - {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }} - {{- $includes = (append $ScrollStyle $includes) }} -{{- end }} - -{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }} - -{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} -{{- $reset := (resources.Get "css/core/reset.css") }} -{{- $media := (resources.Get "css/core/zmedia.css") }} -{{- $license_css := (resources.Get "css/core/license.css") }} -{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} -{{- $commonHighlight := (resources.Get "css/common/chroma.css") }} - -{{- /* order is important */}} -{{- $core := (slice $theme_vars $reset $common $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} -{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} - -{{- /* bundle all required css */}} -{{- /* Add extended css after theme style */ -}} -{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} - -{{- if not site.Params.assets.disableFingerprinting }} -{{- $stylesheet := $stylesheet | fingerprint }} - -{{- else }} - -{{- end }} - -{{- /* noscript */}} - - -{{- /* Favicons */}} - - - - - - - - -{{- /* RSS */}} -{{ range .AlternativeOutputFormats -}} - + +{{- if .Site.Params.analytics.google.SiteVerificationTag }} + +{{- end}} + +{{- $anoldhope := resources.Get "css/an-old-hope.min.css" }} +{{- $theme := resources.Get "css/theme-vars.css" }} +{{- $reset := resources.Get "css/reset.css" }} +{{- $header := resources.Get "css/header.css" }} +{{- $main := resources.Get "css/main.css" }} +{{- $postentry := resources.Get "css/post-entry.css" }} +{{- $postsingle := resources.Get "css/post-single.css" }} +{{- $terms := resources.Get "css/terms.css" }} +{{- $archive := resources.Get "css/archive.css" }} +{{- $footer := resources.Get "css/footer.css" }} +{{- $404 := resources.Get "css/404.css" }} +{{- $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" }} +{{- $stylesheet := slice $anoldhope $style | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}} + +{{- if (and (.Site.Params.profileMode.enabled) (.IsHome)) }} +{{- $profileMode := slice (resources.Get "css/profile-mode.css") | resources.Concat "assets/css/profile-mode.css" | minify | fingerprint }} + +{{- end -}} + + + + +{{- hugo.Generator }} + +{{- range .AlternativeOutputFormats -}} + {{ end -}} -{{- range .AllTranslations -}} - -{{ end -}} - {{- partial "extend_head.html" . -}} - -{{- /* Misc */}} -{{- if hugo.IsProduction | or (eq site.Params.env "production") }} -{{- template "_internal/google_analytics.html" . }} + +{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} +{{- template "_internal/google_analytics_async.html" . }} {{- template "partials/templates/opengraph.html" . }} {{- template "partials/templates/twitter_cards.html" . }} {{- template "partials/templates/schema_json.html" . }} -{{- end -}} +{{- end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 75c31799..48a9f4eb 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,126 +1,108 @@ -{{- /* theme.js */}} -{{- if not site.Params.disableThemeToggle }} -{{- $theme := resources.Get "js/theme.js" | resources.Minify }} -{{- if not site.Params.assets.disableFingerprinting }} -{{- $theme_js := (slice $theme) | resources.Concat "assets/js/theme.js" | fingerprint }} - -{{- else }} -{{- $theme_js := (slice $theme) | resources.Concat "assets/js/theme.js" }} - -{{- end }} -{{- end }} +{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }} + +{{- end }} +{{- if (and (.Site.Params.disableThemeToggle) (eq .Site.Params.defaultTheme "auto")) }} + +{{- end }} +
    - {{- if ( and (.IsPage) (ne .Layout "archives") (ne .Layout "search")) }} -
    - {{- end }}
    diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html index 199dfb72..ef086158 100644 --- a/layouts/partials/home_info.html +++ b/layouts/partials/home_info.html @@ -1,13 +1,13 @@ -{{- with site.Params.homeInfoParams }} +{{- with $.Site.Params.homeInfoParams }}
    -

    {{ .Title | markdownify }}

    +

    {{- .Title | markdownify }}

    -
    - {{ .Content | markdownify }} -
    +
    +

    {{- .Content | markdownify }}

    +
    - {{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} + {{- partial "social_icons.html" $.Site.Params.socialIcons -}}
    -{{- end -}} +{{- end}} diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index 6882f39b..5de8057a 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -1,56 +1,18 @@
    - {{- with site.Params.profileMode }} + {{- with .Site.Params.profileMode }}
    - {{- if .imageUrl -}} - {{- $img := "" }} - {{- if not (urls.Parse .imageUrl).IsAbs }} - {{- $img = resources.Get .imageUrl }} - {{- end }} - {{- if $img }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} - {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} - {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} - {{- if (not (and (not .imageHeight) (not .imageWidth))) }} - {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} - {{- else if .imageHeight }} - {{- $img = $img.Resize (printf "x%d" .imageHeight) }} - {{ else if .imageWidth }} - {{- $img = $img.Resize (printf "%dx" .imageWidth) }} - {{ else }} - {{- $img = $img.Resize "150x150" }} - {{- end }} - {{- end }} - {{ .imageTitle | default - {{- else }} - {{ .imageTitle | default - {{- end }} - {{- end }} -

    {{ .title | default site.Title | markdownify }}

    - {{ .subtitle | markdownify }} - {{- partial "social_icons.html" -}} + {{- if .imageUrl}}{{ .imageTitle | default {{- end}} +

    {{- .title | default $.Site.Title | markdownify -}}

    + {{- .subtitle | markdownify -}} + {{- partial "social_icons.html" $.Site.Params.socialIcons -}} {{- with .buttons }} {{- end }}
    diff --git a/layouts/partials/post_canonical.html b/layouts/partials/post_canonical.html deleted file mode 100644 index d3df859a..00000000 --- a/layouts/partials/post_canonical.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}} -{{ $url := urls.Parse .Params.canonicalURL }} - -{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}} - - {{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}} -  {{ $url.Host }} - -{{- end }} diff --git a/layouts/partials/post_lastmod.html b/layouts/partials/post_lastmod.html deleted file mode 100644 index 750ff217..00000000 --- a/layouts/partials/post_lastmod.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ $date := .Date.Format "02.01.2006" }} -{{ $lastmod := .Lastmod.Format "02.01.2006" }} - -{{- if ne $lastmod $date -}} -Last updated on {{ .Lastmod | time.Format (default "January 2, 2006" site.Params.DateFormat) }} -{{- end }} \ No newline at end of file diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index b0c0417e..e0dbef40 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -1,23 +1,17 @@ -{{- $scratch := newScratch }} +{{- $scratch := newScratch}} {{- if not .Date.IsZero -}} -{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} -{{- end }} - -{{- if (.Param "ShowReadingTime") -}} -{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} -{{- end }} - -{{- if (.Param "ShowWordCount") -}} -{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} -{{- end }} - -{{- if not (.Param "hideAuthor") -}} -{{- with (partial "author.html" .) }} -{{- $scratch.Add "meta" (slice .) }} -{{- end }} -{{- end }} - -{{- with ($scratch.Get "meta") }} -{{- delimit . " · " | safeHTML -}} +{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} {{- end -}} + +{{- if $.Site.Params.ShowReadingTime -}} +{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} +{{- end -}} + +{{ with (partial "author.html" . ) }} +{{ $scratch.Add "meta" (slice .)}} +{{end}} + +{{- with ($scratch.Get "meta")}} +{{- delimit . " · "}} +{{- end }} diff --git a/layouts/partials/post_nav_links.html b/layouts/partials/post_nav_links.html deleted file mode 100644 index b6a0a987..00000000 --- a/layouts/partials/post_nav_links.html +++ /dev/null @@ -1,19 +0,0 @@ -{{- $pages := .CurrentSection.RegularPages.ByTitle }} -{{- if and (gt (len $pages) 1) (in $pages . ) }} - -{{- end }} diff --git a/layouts/partials/script.html b/layouts/partials/script.html deleted file mode 100644 index 819cf49c..00000000 --- a/layouts/partials/script.html +++ /dev/null @@ -1,27 +0,0 @@ -{{- /* Search */}} -{{- if (eq .Layout `search`) -}} - -{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} -{{- $fusejs := resources.Get "js/fuse.basic.min.js" }} -{{- $license_js := resources.Get "js/license.js" }} -{{- if not site.Params.assets.disableFingerprinting }} -{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} - -{{- else }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} - -{{- end }} -{{- end -}} - -{{- /* PaperMod.js */}} -{{- $scrollToTop := (not site.Params.disableScrollToTop | default .Params.disableScrollToTop ) }} -{{- $themeToggle := (not site.Params.disableThemeToggle | default .Params.disableThemeToggle ) }} -{{- $showCodeCopyButtons := (site.Params.ShowCodeCopyButtons | default .Params.ShowCodeCopyButtons ) }} -{{- $papermod := resources.Get "js/papermod.js" | js.Build (dict "params" (dict "scrollToTop" $scrollToTop "themeToggle" $themeToggle "showCodeCopyButtons" $showCodeCopyButtons)) | resources.Minify }} -{{- if not site.Params.assets.disableFingerprinting }} -{{- $papermod_js := (slice $papermod) | resources.Concat "assets/js/papermod.js" | fingerprint }} - -{{- else }} -{{- $papermod_js := (slice $papermod) | resources.Concat "assets/js/papermod.js" }} - -{{- end }} \ No newline at end of file diff --git a/layouts/partials/share_icons.html b/layouts/partials/share_icons.html index 910ba7f1..e1d40a77 100644 --- a/layouts/partials/share_icons.html +++ b/layouts/partials/share_icons.html @@ -1,95 +1,55 @@ {{- $pageurl := .Permalink }} {{- $title := .Title }} -{{- $.Scratch.Set "tags" ""}} +{{ $.Scratch.Set "tags" ""}} {{- with .Params.Tags }} -{{- $hashtags := newScratch}} -{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} -{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} -{{- end -}} +{{ $hashtags := newScratch}} +{{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} +{{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} +{{- end }} -{{- $custom := false }} -{{- $ShareButtons := (.Param "ShareButtons")}} -{{- with $ShareButtons }}{{ $custom = true }}{{ end }} - - + diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html index 2b385172..7bb9c143 100644 --- a/layouts/partials/social_icons.html +++ b/layouts/partials/social_icons.html @@ -1,8 +1,6 @@ -