commit 7bf35697501cee3a6bb37f3e42575b5d29589a26 Author: Nathan Anderson Date: Thu Sep 1 18:42:28 2022 -0600 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86c95ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +/.hugo_build.lock diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..89ebe96 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,15 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +tags: +summary: +cover: + image: "/images/img.jpg" + # can also paste direct link from external site + # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png + alt: "" + caption: "" + relative: false +--- + diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..5373c8e --- /dev/null +++ b/config.yml @@ -0,0 +1,53 @@ +baseURL: http://fosscat.com/ +languageCode: en-us +title: Foss Cat +theme: "PaperMod" +params: + env: production + defaultTheme: dark + homeInfoParams: + Title: Hello weary traveler + Content: This is my personal blog. I write about open source, technology, philosophy, digital privacy, and whatever else is pressing on my mind + ShowShareButtons: false + ShowReadingTime: true + ShowToc: true + ShowBreadCrumbs: true + ShowCodeCopyButtons: true + author: Tom Cat + fuseOpts: # This modifies search params + isCaseSensitive: false + shouldSort: true + location: 0 + distance: 1000 + threshold: 0.4 + minMatchCharLength: 2 + keys: ["title", "permalink", "summary", "tags", "content"] + assets: + disableHLJS: true + cover: + responsiveImages: true # disable to speed up build times at cost of responsive sizes +outputs: + home: + - HTML + - RSS + - JSON +menu: + main: + - identifier: search + name: search + url: /search/ + weight: 1 + - identifier: tags + name: tags + url: /tags/ + weight: 2 +taxonomies: + tag: tags +markup: + highlight: + tabWidth: 2 + codeFences: true + guessSyntax: true + lineNos: false + noClasses: false + style: dracula \ No newline at end of file diff --git a/content/posts/how-i-made-this-site.md b/content/posts/how-i-made-this-site.md new file mode 100644 index 0000000..65da888 --- /dev/null +++ b/content/posts/how-i-made-this-site.md @@ -0,0 +1,101 @@ +--- +title: "How I Made This Site" +date: 2022-08-31T20:38:09-06:00 +draft: false +searchHidden: false +tags: ['self host', 'raspberry pi'] +summary: 'This is the summary' +cover: + image: "/images/img.jpg" + # can also paste direct link from external site + # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png + alt: "" + caption: "Ocean" + relative: false +--- + +I've dreamed of this day but never imagined I'd actually stop playing league long enough to do it. Turns out, we each have a streak of awesome inside each of us just waiting to burst forth. + +How do websites work? +=== +Back in my senior year of highschool, my buddies and thought it would be funny to have our own blog / website. I didn't think there was much to it, so I turned to godaddy.com, the only website-buying marketplace around. Little did I know that they only sell domain names, and there aren't in a monopolistic market. Did I pay $20 for a domain name? Splashthetown.com says yes. Did I have a website? Nope. Two-thirds of a CS degree later and I think I am finally ready. Billions of webpages exist on the internet, so it can't be that difficult, right? I'm going to walk you through the steps I undertook to get this website to you, and how you are able to see the words you are reading on your screen right now. + +Internet, I've Heard of That +--- +I once heard the internet described as "the cloud", which is good to help people understand you know nothing about it. To give a marginally better explanation, imagine your brain, with all its neurons interconnected and whatnot. Lets call each neuron a "node". Each node holds information, and when it recieves a message it decides what to do with that information, modify it, store it, pass it on, sell it to the highest bidder for ad revenue, the possibilities are endless. In this way, the brain is much like the internet. These "nodes", or nuerons, are actually computers that make up the internet, a big web of interconnected, communicating devices. I know hardly anything about the brain. + +How did I get Here +--- +Here is the process when you type in or click on a link in your web browser: + - Your machine sends a **request** with the link info to the "node" or machine giving it internet, typically a router. + - The router _routes_ your request to an internet "phone book" of sorts to see what machine on the interwebs your url cooresponds to, much like an address on a package you send in the mail. + - With the machines (ip) **address** known, your package is sent to that machine + - The machine has some code running on it that opens your package, gives thanks, and as quickly as it can manage, sends a package back to the sender with some code. + - That package goes back down the pipes the way it came, your browser opens the package, and you see the package contents, `html`, Mark Zuckerburg pics, cat videos, etc. + +How to create your own _Node_ +=== +If you want to put your stake on the great world wide web, then you need a few things: + + - The _Address_ - a domain name, purchasing one lets you tell internet phone books where your computer is. + - The _Node_ - a computer that can run some internet code on it. Most people want this to be some computer AWS or other server farm controls so that it stays online 24/7 and can scale easily (your code can be copied to other machines if you get tons of visitors). + - Some internet code, typically called a web server + +I will be walking you through the fairly unconventional steps I took to get you here on this web page. There are hundreds of ways to get something on the internet, but my way is certainly one of them. For reference, I am running Arch Linux btw. + +Since I don't want to pay $5 a month for ease-of-use and stability and scalability, I will be using a rasperry pi zero w2 plugged into a charging brick behind my book shelf to be the node. + + + +imgage goes here + +![image](/images/img.jpg#center) + +Get a Domain +--- +Any domain selling company online is eager for your money. I've used [Name](https://name.com) and [GoDaddy](https://godaddy.com), but any google result will do. Purchase one, that is all for now. + +Write some Internet Code +--- +Actually the goal for me with this site is to not have to write any code at all. + +If you don't have a raspberry pi and instead coughed over $$$ to Jeff Bezos, then get the IP address of your machine and skip to step 4. + +1. I used [rpi imager](https://github.com/raspberrypi/rpi-imager) to flash Raspberry Pi OS Lite to an SD card. + - You can use any flashing tool, but rpi imager is convenient when working with Pi's, and it lets you configure Wifi so the Pi connects automatically on boot. +2. Put the SD into the Pi and turn it on. +3. Verify it is connected to the internet: + - I use [nmap](https://nmap.org/) to scan my local network + + {{< highlight go >}} + nmap -sn 192.168..0/24 + {{< / highlight >}} + This gives me output like + ``` go {hl_lines=[4]} + Host is up (0.018s latency). + Nmap scan report for 192.168.27.169 + Host is up (0.077s latency). + Nmap scan report for raspberrypi.lan (192.168.27.161) + ``` +4. Use ssh to connect to the device `ssh user@192.168.27.161`. Do _not_ forget to include the user name in the ssh command + - For this website, I'm using [Hugo](https://gohugo.io/), a static site generator written in [Go](https://go.dev/). Follow the instructions [here](https://gohugo.io/getting-started/quick-start/#step-1-install-hugo) to install and set up a simple site locally with Hugo. + - Once your site is built, run `hugo` in the base directory of your hugo site + ``` + user@raspberrypi:~/foss-cat $ hugo + Start building sites … + hugo v0.102.2-f104f7bc02f7d23d41f17c7353df1217cf25b2dc linux/arm BuildDate=2022-08-31T10:42:06Z VendorInfo=gohugoio + + | EN + -------------------+----- + Pages | 10 + Paginator pages | 0 + Non-page files | 0 + Static files | 0 + Processed images | 0 + Aliases | 2 + Sitemaps | 1 + Cleaned | 0 + + Total in 756 ms + ``` + diff --git a/content/posts/my-first-post.md b/content/posts/my-first-post.md new file mode 100644 index 0000000..3b8f0e1 --- /dev/null +++ b/content/posts/my-first-post.md @@ -0,0 +1,33 @@ +--- +title: "My First Post" +date: 2022-08-31T12:33:24-06:00 +draft: true +--- + +Does this look big? +================== +Another markdown header +---------- + +`This is code` + +Italics are easy, just one `_` or `*` before and after like *this* + +To do bold, just put two before and after, looks like **this** + +Unoredered lists you just use `+` `-` or `*` +- they +- are +- interchangable + +And numbered lists are with `numbers` lol +1. like +2. so + +For links, you need to wrap the link text (clickable part) inside `[]`, then follow it with the actual url inside `()` +[click me](https://lmao.com) + +Here is my first ever post :3 I hope it looks nice <3 + +Love, +Nate diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000..cb24f33 --- /dev/null +++ b/content/search.md @@ -0,0 +1,8 @@ +--- +title: "Search" +layout: "search" # is necessary +# url: "/search-fosscat" +# description: "Description for Search" +# summary: "search" +# placeholder: "How i made this site..." +--- \ No newline at end of file diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..04849f4 --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,12 @@ +{{ define "main" }} +
+

All {{ .Type }}

+
    + {{ range .Data.Pages }} +
  • + {{ .Title }} +
  • + {{ end }} +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/term.html b/layouts/_default/term.html new file mode 100644 index 0000000..264f41d --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,18 @@ +{{ define "main" }} +
+

All posts for {{ .Type | singularize }} "{{ .Title }}"

+
+ {{ range .Data.Pages }} +
+ +
+

{{ .Title }}

+

{{ .Date | time.Format ":date_medium" }}

+
+
+

{{ .Summary }}

+
+
+ {{ end }} +
+{{ end}} \ No newline at end of file diff --git a/layouts/shortcodes/baseurl.html b/layouts/shortcodes/baseurl.html new file mode 100644 index 0000000..af2adbe --- /dev/null +++ b/layouts/shortcodes/baseurl.html @@ -0,0 +1 @@ +{{ .Page.Site.BaseURL }} \ No newline at end of file diff --git a/static/images/img.jpg b/static/images/img.jpg new file mode 100644 index 0000000..4f48a69 Binary files /dev/null and b/static/images/img.jpg differ diff --git a/themes/PaperMod/.github/ISSUE_TEMPLATE/bug_report.md b/themes/PaperMod/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3e6cf7e --- /dev/null +++ b/themes/PaperMod/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,50 @@ +--- +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.83.0 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/themes/PaperMod/.github/ISSUE_TEMPLATE/config.yml b/themes/PaperMod/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..1a4dd9b --- /dev/null +++ b/themes/PaperMod/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +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/themes/PaperMod/.github/ISSUE_TEMPLATE/new-blank-issue.md b/themes/PaperMod/.github/ISSUE_TEMPLATE/new-blank-issue.md new file mode 100644 index 0000000..dbc48f1 --- /dev/null +++ b/themes/PaperMod/.github/ISSUE_TEMPLATE/new-blank-issue.md @@ -0,0 +1,7 @@ +--- +name: New Blank Issue +about: Anything other than bug report +title: "" +labels: "" +assignees: "" +--- diff --git a/themes/PaperMod/.github/PULL_REQUEST_TEMPLATE.md b/themes/PaperMod/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..00b856c --- /dev/null +++ b/themes/PaperMod/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,44 @@ + + + +**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/themes/PaperMod/.github/stale.yml b/themes/PaperMod/.github/stale.yml new file mode 100644 index 0000000..7b5f571 --- /dev/null +++ b/themes/PaperMod/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 7 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 3 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - keep +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/themes/PaperMod/.github/workflows/gh-pages.yml b/themes/PaperMod/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..305a6de --- /dev/null +++ b/themes/PaperMod/.github/workflows/gh-pages.yml @@ -0,0 +1,80 @@ +name: Deploy Hugo PaperMod Demo to Pages + +on: + push: + paths-ignore: + - "images/**" + - "LICENSE" + - "README.md" + branches: + - master + - exampleSite + workflow_dispatch: + # manual run + inputs: + hugoVersion: + description: "Hugo Version" + required: false + default: "0.83.0" + +# 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: + runs-on: ubuntu-latest + env: + HUGO_VERSION: "0.83.0" + 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-64bit.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Checkout + uses: actions/checkout@v3 + with: + ref: exampleSite + - name: Setup Pages + id: pages + uses: actions/configure-pages@v1 + - 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@v1 + 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@v1 diff --git a/themes/PaperMod/LICENSE b/themes/PaperMod/LICENSE new file mode 100644 index 0000000..1580f7f --- /dev/null +++ b/themes/PaperMod/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2020 nanxiaobei and adityatelange +Copyright (c) 2021-2022 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/PaperMod/README.md b/themes/PaperMod/README.md new file mode 100644 index 0000000..286617a --- /dev/null +++ b/themes/PaperMod/README.md @@ -0,0 +1,96 @@ +

Hugo PaperMod | Demo

+ +

☄️ 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 to add more features and customization to the og theme. + +The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with a few more stuff. Make sure you visit it, to get an awesome hands-on experience and get to know about the features ... + +**ExampleSite** can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source. + +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.83.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.83.0) +[![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)](https://github.com/adityatelange/hugo-PaperMod/deployments/activity_log?environment=github-pages) +[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE) +[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/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) +[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord)](https://discord.gg/ahpmTvhVmp) + +--- + +

+ Mockup image +

+ +--- + +## Features/Mods 💥 + +- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. +- 3 Modes: + - [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode) + - [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode) + - [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode) +- Table of Content Generation (newer implementation). +- Archive of posts. +- Social Icons (home-info and profile-mode) +- Social-Media Share buttons on posts. +- Menu location indicator. +- Multilingual support. (with language selector) +- Taxonomies +- Cover image for each post (with Responsive image support). +- Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). +- SEO Friendly. +- Multiple Author support. +- Search Page with Fuse.js +- Other Posts suggestion below a post +- Breadcrumb Navigation +- Code Block Copy buttons +- No webpack, nodejs and other dependencies are required to edit the theme. + +Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** + +--- + +## Install/Update 📥 + +Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** + +--- + +## Social-Icons/Share-Icons 🖼️ + +Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** + +--- + +## FAQs / How To's Guide 🙋 + +Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** + +--- + +## Release Changelog 📃 + +Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** + +--- + +## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/) 👀 + +--- + +## Special Thanks 🌟 + +- [**Highlight.js**](https://github.com/highlightjs/highlight.js) +- [**Fuse.js**](https://github.com/krisk/fuse) +- [**Feather Icons**](https://github.com/feathericons/feather) +- [**Simple Icons**](https://github.com/simple-icons/simple-icons) +- **All Contributors and Supporters** + +## Stargazers over time 📈 + +[![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg)](https://starchart.cc/adityatelange/hugo-PaperMod) + diff --git a/themes/PaperMod/assets/css/common/404.css b/themes/PaperMod/assets/css/common/404.css new file mode 100644 index 0000000..8a23430 --- /dev/null +++ b/themes/PaperMod/assets/css/common/404.css @@ -0,0 +1,11 @@ +.not-found { + position: absolute; + left: 0; + right: 0; + display: flex; + align-items: center; + justify-content: center; + height: 80%; + font-size: 160px; + font-weight: 700; +} diff --git a/themes/PaperMod/assets/css/common/archive.css b/themes/PaperMod/assets/css/common/archive.css new file mode 100644 index 0000000..7e7e245 --- /dev/null +++ b/themes/PaperMod/assets/css/common/archive.css @@ -0,0 +1,44 @@ +.archive-posts { + width: 100%; + font-size: 16px; +} + +.archive-year { + margin-top: 40px; +} + +.archive-year:not(:last-of-type) { + border-bottom: 2px solid var(--border); +} + +.archive-month { + display: flex; + align-items: flex-start; + padding: 10px 0; +} + +.archive-month-header { + margin: 25px 0; + width: 200px; +} + +.archive-month:not(:last-of-type) { + border-bottom: 1px solid var(--border); +} + +.archive-entry { + position: relative; + padding: 5px; + margin: 10px 0; +} + +.archive-entry-title { + margin: 5px 0; + font-weight: 400; +} + +.archive-count, +.archive-meta { + color: var(--secondary); + font-size: 14px; +} diff --git a/themes/PaperMod/assets/css/common/footer.css b/themes/PaperMod/assets/css/common/footer.css new file mode 100644 index 0000000..5addb1e --- /dev/null +++ b/themes/PaperMod/assets/css/common/footer.css @@ -0,0 +1,60 @@ +.footer, +.top-link { + font-size: 12px; + color: var(--secondary); +} + +.footer { + max-width: calc(var(--main-width) + var(--gap) * 2); + margin: auto; + padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap); + text-align: center; + line-height: 24px; +} + +.footer span { + margin-inline-start: 1px; + margin-inline-end: 1px; +} + +.footer span:last-child { + white-space: nowrap; +} + +.footer a { + color: inherit; + border-bottom: 1px solid var(--secondary); +} + +.footer a:hover { + border-bottom: 1px solid var(--primary); +} + +.top-link { + visibility: hidden; + position: fixed; + bottom: 60px; + right: 30px; + z-index: 99; + background: var(--tertiary); + width: 42px; + height: 42px; + padding: 12px; + border-radius: 64px; + 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; +} diff --git a/themes/PaperMod/assets/css/common/header.css b/themes/PaperMod/assets/css/common/header.css new file mode 100644 index 0000000..64894da --- /dev/null +++ b/themes/PaperMod/assets/css/common/header.css @@ -0,0 +1,93 @@ +.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); +} + +#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; +} diff --git a/themes/PaperMod/assets/css/common/main.css b/themes/PaperMod/assets/css/common/main.css new file mode 100644 index 0000000..50022ac --- /dev/null +++ b/themes/PaperMod/assets/css/common/main.css @@ -0,0 +1,68 @@ +.main { + position: relative; + min-height: calc(100vh - var(--header-height) - var(--footer-height)); + max-width: calc(var(--main-width) + var(--gap) * 2); + margin: auto; + padding: var(--gap); +} + +.page-header h1 { + font-size: 40px; +} + +.pagination { + display: flex; +} + +.pagination a { + color: var(--theme); + font-size: 13px; + line-height: 36px; + background: var(--primary); + border-radius: calc(36px / 2); + padding: 0 16px; +} + +.pagination .next { + margin-inline-start: auto; +} + +.social-icons { + padding: 12px 0; +} + +.social-icons a:not(:last-of-type) { + margin-inline-end: 12px; +} + +.social-icons a svg { + height: 26px; + width: 26px; +} + +code { + 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; +} diff --git a/themes/PaperMod/assets/css/common/post-entry.css b/themes/PaperMod/assets/css/common/post-entry.css new file mode 100644 index 0000000..885aa2a --- /dev/null +++ b/themes/PaperMod/assets/css/common/post-entry.css @@ -0,0 +1,104 @@ +.first-entry { + position: relative; + display: flex; + flex-direction: column; + justify-content: center; + min-height: 320px; + margin: var(--gap) 0 calc(var(--gap) * 2) 0; +} + +.first-entry .entry-header { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; +} + +.first-entry .entry-header h1 { + font-size: 34px; + line-height: 1.3; +} + +.first-entry .entry-content { + margin: 14px 0; + font-size: 16px; + -webkit-line-clamp: 3; +} + +.first-entry .entry-footer { + font-size: 14px; +} + +.home-info .entry-content { + -webkit-line-clamp: unset; +} + +.post-entry { + position: relative; + margin-bottom: var(--gap); + padding: var(--gap); + background: var(--entry); + border-radius: var(--radius); + transition: transform 0.1s; + border: 1px solid var(--border); +} + +.post-entry:active { + transform: scale(0.96); +} + +.tag-entry .entry-cover { + display: none; +} + +.entry-header h2 { + font-size: 24px; + line-height: 1.3; +} + +.entry-content { + margin: 8px 0; + color: var(--secondary); + font-size: 14px; + line-height: 1.6; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.entry-footer { + color: var(--secondary); + font-size: 13px; +} + +.entry-link { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.entry-cover, +.entry-isdraft { + font-size: 14px; + color: var(--secondary); +} + +.entry-cover { + margin-bottom: var(--gap); + text-align: center; +} + +.entry-cover img { + border-radius: var(--radius); + pointer-events: none; + width: 100%; + height: auto; +} + +.entry-cover a { + color: var(--secondary); + box-shadow: 0 1px 0 var(--primary); +} diff --git a/themes/PaperMod/assets/css/common/post-single.css b/themes/PaperMod/assets/css/common/post-single.css new file mode 100644 index 0000000..0f569bf --- /dev/null +++ b/themes/PaperMod/assets/css/common/post-single.css @@ -0,0 +1,401 @@ +.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 { + box-shadow: 0 1px 0; +} + +.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 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: 32px; +} + +.post-content table th, +.post-content table:not(.highlighttable, .highlight table, .gist .highlight) 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 table { + border-radius: var(--radius); +} + +.post-content .highlight:not(table) { + margin: 10px auto; + background: var(--hljs-bg) !important; + 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 code { + margin: auto 4px; + padding: 4px 6px; + 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: rgb(213, 213, 214); + background: var(--hljs-bg) !important; + border-radius: var(--radius); + overflow-x: auto; + word-break: break-all; +} + +.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(--code-bg); + border-radius: var(--radius); + padding: 0.4em; +} + +.dark .toc { + background: var(--entry); +} + +.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 .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-tags li { + display: inline-block; + margin-inline-end: 3px; + margin-bottom: 5px; +} + +.post-tags a, +.share-buttons, +.paginav { + border-radius: var(--radius); + background: var(--code-bg); + border: 1px solid var(--border); +} + +.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); +} + +.post-tags a:hover, +.paginav a:hover { + background: var(--border); +} + +.share-buttons { + margin: 14px 0; + padding-inline-start: var(--radius); + display: flex; + justify-content: center; + overflow-x: auto; +} + +.share-buttons a { + margin-top: 10px; +} + +.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 { + display: inline-flex; + color: var(--secondary); + margin-inline-start: 8px; + font-weight: 500; + user-select: none; +} + +.paginav { + margin: 10px 0; + display: flex; + line-height: 30px; + border-radius: var(--radius); +} + +.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; +} \ No newline at end of file diff --git a/themes/PaperMod/assets/css/common/profile-mode.css b/themes/PaperMod/assets/css/common/profile-mode.css new file mode 100644 index 0000000..58f2819 --- /dev/null +++ b/themes/PaperMod/assets/css/common/profile-mode.css @@ -0,0 +1,42 @@ +.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 h1 { + padding: 12px 0; +} + +.profile img { + display: inline-table; + border-radius: 50%; +} + +.buttons { + flex-wrap: wrap; + 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); +} diff --git a/themes/PaperMod/assets/css/common/search.css b/themes/PaperMod/assets/css/common/search.css new file mode 100644 index 0000000..38d5b6b --- /dev/null +++ b/themes/PaperMod/assets/css/common/search.css @@ -0,0 +1,45 @@ +#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/themes/PaperMod/assets/css/common/syntax.css b/themes/PaperMod/assets/css/common/syntax.css new file mode 100644 index 0000000..c5fda76 --- /dev/null +++ b/themes/PaperMod/assets/css/common/syntax.css @@ -0,0 +1,85 @@ +/* Background */ .bg { color: #f8f8f2; background-color: #282a36; } +/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #282a36; } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* CodeLine */ .chroma .cl { } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } +/* LineHighlight */ .chroma .hl { background-color: #5e5e5e } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Line */ .chroma .line { display: flex; } +/* 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/themes/PaperMod/assets/css/common/terms.css b/themes/PaperMod/assets/css/common/terms.css new file mode 100644 index 0000000..244614b --- /dev/null +++ b/themes/PaperMod/assets/css/common/terms.css @@ -0,0 +1,18 @@ +.terms-tags li { + display: inline-block; + margin: 10px; + font-weight: 500; +} + +.terms-tags a { + display: block; + padding: 3px 10px; + background: var(--tertiary); + border-radius: 6px; + transition: transform 0.1s; +} + +.terms-tags a:active { + background: var(--tertiary); + transform: scale(0.96); +} diff --git a/themes/PaperMod/assets/css/core/license.css b/themes/PaperMod/assets/css/core/license.css new file mode 100644 index 0000000..8e81d22 --- /dev/null +++ b/themes/PaperMod/assets/css/core/license.css @@ -0,0 +1,6 @@ +/* + PaperMod v6 + License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE + Copyright (c) 2020 nanxiaobei and adityatelange + Copyright (c) 2021-2022 adityatelange +*/ diff --git a/themes/PaperMod/assets/css/core/reset.css b/themes/PaperMod/assets/css/core/reset.css new file mode 100644 index 0000000..f509cf6 --- /dev/null +++ b/themes/PaperMod/assets/css/core/reset.css @@ -0,0 +1,116 @@ +*, +::after, +::before { + box-sizing: border-box; +} + +html { + -webkit-tap-highlight-color: transparent; + overflow-y: scroll; +} + +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; + font-size: 18px; + line-height: 1.6; + word-break: break-word; + background: var(--theme); +} + +article, +aside, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +table { + display: block; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1, +h2, +h3, +h4, +h5, +h6, +p { + margin-top: 0; + margin-bottom: 0; +} + +ul { + padding: 0; +} + +a { + text-decoration: none; +} + +body, +figure, +ul { + margin: 0; +} + +table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + overflow-x: auto; + word-break: keep-all; +} + +button, +input, +textarea { + padding: 0; + font: inherit; + background: 0 0; + border: 0; +} + +input, +textarea { + 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; +} + +img { + display: block; + max-width: 100%; +} diff --git a/themes/PaperMod/assets/css/core/theme-vars.css b/themes/PaperMod/assets/css/core/theme-vars.css new file mode 100644 index 0000000..fd0c5ee --- /dev/null +++ b/themes/PaperMod/assets/css/core/theme-vars.css @@ -0,0 +1,38 @@ +:root { + --gap: 24px; + --content-gap: 20px; + --nav-width: 1024px; + --main-width: 720px; + --header-height: 60px; + --footer-height: 60px; + --radius: 8px; + --theme: rgb(255, 255, 255); + --entry: rgb(255, 255, 255); + --primary: rgb(30, 30, 30); + --secondary: rgb(108, 108, 108); + --tertiary: rgb(214, 214, 214); + --content: rgb(31, 31, 31); + --hljs-bg: rgb(28, 29, 33); + --code-bg: rgb(245, 245, 245); + --border: rgb(238, 238, 238); +} + +.dark { + --theme: rgb(29, 30, 32); + --entry: rgb(46, 46, 51); + --primary: rgb(218, 218, 219); + --secondary: rgb(155, 156, 157); + --tertiary: rgb(65, 66, 68); + --content: rgb(196, 196, 197); + --hljs-bg: rgb(46, 46, 51); + --code-bg: rgb(55, 56, 62); + --border: rgb(51, 51, 51); +} + +.list { + background: var(--code-bg); +} + +.dark.list { + background: var(--theme); +} diff --git a/themes/PaperMod/assets/css/core/zmedia.css b/themes/PaperMod/assets/css/core/zmedia.css new file mode 100644 index 0000000..210d486 --- /dev/null +++ b/themes/PaperMod/assets/css/core/zmedia.css @@ -0,0 +1,49 @@ +@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 (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/themes/PaperMod/assets/css/extended/blank.css b/themes/PaperMod/assets/css/extended/blank.css new file mode 100644 index 0000000..a577295 --- /dev/null +++ b/themes/PaperMod/assets/css/extended/blank.css @@ -0,0 +1,5 @@ +/* +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/themes/PaperMod/assets/css/hljs/an-old-hope.min.css b/themes/PaperMod/assets/css/hljs/an-old-hope.min.css new file mode 100644 index 0000000..b5dabdf --- /dev/null +++ b/themes/PaperMod/assets/css/hljs/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; +} diff --git a/themes/PaperMod/assets/css/includes/scroll-bar.css b/themes/PaperMod/assets/css/includes/scroll-bar.css new file mode 100644 index 0000000..47405de --- /dev/null +++ b/themes/PaperMod/assets/css/includes/scroll-bar.css @@ -0,0 +1,63 @@ +/* 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; + } +} \ No newline at end of file diff --git a/themes/PaperMod/assets/js/fastsearch.js b/themes/PaperMod/assets/js/fastsearch.js new file mode 100644 index 0000000..d586345 --- /dev/null +++ b/themes/PaperMod/assets/js/fastsearch.js @@ -0,0 +1,148 @@ +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 ? params.fuseOpts.iscasesensitive : false, + includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false, + includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false, + minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1, + shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true, + findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false, + keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'], + location: params.fuseOpts.location ? params.fuseOpts.location : 0, + threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4, + distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100, + ignoreLocation: params.fuseOpts.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) { + const 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} »
    ` + + `

    ${results[item].item.summary}

    ` + + `
  • ` + } + + 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/themes/PaperMod/assets/js/fuse.basic.min.js b/themes/PaperMod/assets/js/fuse.basic.min.js new file mode 100644 index 0000000..89477c6 --- /dev/null +++ b/themes/PaperMod/assets/js/fuse.basic.min.js @@ -0,0 +1,9 @@ +/** + * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io) + * + * Copyright (c) 2022 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]: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(_).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()}}}var O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?L.getFn:n,o=t.fieldNormWeight,a=void 0===o?L.fieldNormWeight:o;r(this,e),this.norm=S(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,u(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();u(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?L.getFn:r,o=n.fieldNormWeight,a=void 0===o?L.fieldNormWeight:o,c=new O({getFn:i,fieldNormWeight:a});return c.setKeys(e.map(k)),c.setSources(t),c.create(),c}function j(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?L.distance:s,u=t.ignoreLocation,l=void 0===u?L.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}function E(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L.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}var I=32;function F(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?L.location:o,c=i.threshold,s=void 0===c?L.threshold:c,h=i.distance,u=void 0===h?L.distance:h,l=i.includeMatches,d=void 0===l?L.includeMatches:l,f=i.findAllMatches,v=void 0===f?L.findAllMatches:f,g=i.minMatchCharLength,y=void 0===g?L.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?L.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?L.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:F(e),startIndex:t})},w=this.pattern.length;if(w>I){for(var x=0,_=w%I,S=w-_;x3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?L.location:i,a=r.distance,c=void 0===a?L.distance:a,s=r.threshold,h=void 0===s?L.threshold:s,u=r.findAllMatches,l=void 0===u?L.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?L.minMatchCharLength:d,v=r.includeMatches,g=void 0===v?L.includeMatches:v,y=r.ignoreLocation,m=void 0===y?L.ignoreLocation:y;if(t.length>I)throw new Error(p(I));for(var b,k=t.length,M=e.length,w=Math.max(0,Math.min(o,M)),x=h,_=w,S=f>1||g,O=S?Array(M):[];(b=e.indexOf(t,_))>-1;){var A=j(t,{currentLocation:b,expectedLocation:w,distance:c,ignoreLocation:m});if(x=Math.min(A,x),_=b+k,S)for(var F=0;F=T;R-=1){var U=R-1,B=n[e.charAt(U)];if(S&&(O[U]=+!!B),J[R]=(J[R+1]<<1|1)&B,$&&(J[R]|=(C[R+1]|C[R])<<1|1|C[R+1]),J[R]&W&&(N=j(t,{errors:$,currentLocation:U,expectedLocation:w,distance:c,ignoreLocation:m}))<=x){if(x=N,(_=U)<=w)break;T=Math.max(1,2*w-_)}}if(j(t,{errors:$+1,currentLocation:w,expectedLocation:w,distance:c,ignoreLocation:m})>x)break;C=J}var V={isMatch:_>=0,score:Math.max(.001,N)};if(S){var q=E(O,f);q.length?g&&(V.indices=q):V.isMatch=!1}return V}(e,n,i,{location:a+o,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:l,includeMatches:r,ignoreLocation:d}),m=y.isMatch,b=y.score,k=y.indices;m&&(g=!0),v+=b,m&&k&&(f=[].concat(c(f),c(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=f),y}}]),e}(),N=[];function P(e,t){for(var n=0,r=N.length;n-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function D(e,t){t.score=e.score}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?L.includeMatches:r,o=n.includeScore,a=void 0===o?L.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}))}var T=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({},L),i),this.options.useExtendedSearch)throw new Error(y);this._keyStore=new b(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof O))throw new Error("Incorrect 'index' type");this._myIndex=t||A(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){f(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]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,a=i.includeScore,c=i.shouldSort,s=i.sortFn,h=i.ignoreFieldNorm,d=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return W(d,{ignoreFieldNorm:h}),c&&d.sort(s),l(r)&&r>-1&&(d=d.slice(0,r)),K(d,this._docs,{includeMatches:o,includeScore:a})}},{key:"_searchStringList",value:function(e){var t=P(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(f(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=P(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(f(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(!f(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(f(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,u=c.score,l=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return T.version="6.6.2",T.createIndex=A,T.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?L.getFn:n,i=t.fieldNormWeight,o=void 0===i?L.fieldNormWeight:i,a=e.keys,c=e.records,s=new O({getFn:r,fieldNormWeight:o});return s.setKeys(a),s.setIndexRecords(c),s},T.config=L,T},"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/themes/PaperMod/assets/js/highlight.min.js b/themes/PaperMod/assets/js/highlight.min.js new file mode 100644 index 0000000..93a6f86 --- /dev/null +++ b/themes/PaperMod/assets/js/highlight.min.js @@ -0,0 +1,44 @@ +/* + Highlight.js 10.2.1 (32fb9a1d) + 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,M=r,{nodeStream:O,mergeStreams:L}=i,A=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};j("before:highlight",a);var i=a.result?a.result:b(a.language,a.code,t,r);return i.code=a.code,j("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 O.addText(L);e=b(R.subLanguage,L,!0,M[R.subLanguage]),M[R.subLanguage]=e.top}else e=v(L,R.subLanguage.length?R.subLanguage:null);R.relevance>0&&(I+=e.relevance),O.addSublanguage(e.emitter,e.language)}}():function(){if(!R.keywords)return void O.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;O.addText(t),t="",I+=a,O.addKeyword(n[0],e)}else t+=n[0];e=R.keywordPatternRe.lastIndex,n=R.keywordPatternRe.exec(L)}t+=L.substr(e),O.addText(t)}(),L=""}function h(e){return e.className&&O.openNode(e.className),R=Object.create(e,{parent:{value:R}})}function p(e){return 0===R.matcher.regexIndex?(L+=e[0],1):(S=!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 A;var i=R;i.skip?L+=t:(i.returnEnd||i.excludeEnd||(L+=t),u(),i.excludeEnd&&(L=t));do{R.className&&O.closeNode(),R.skip||R.subLanguage||(I+=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!==A)return s}if("illegal"===r.type&&""===i)return 1;if(j>1e5&&j>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;let t=n.exec(e);if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&this.considerAll()),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||_,M={},O=new f.__emitter(f);!function(){for(var e=[],n=R;n!==E;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>O.openNode(e))}();var L="",I=0,T=0,j=0,S=!1;try{for(R.matcher.considerAll();;){j++,S?S=!1:R.matcher.considerAll(),R.matcher.lastIndex=T;const e=R.matcher.exec(o);if(!e)break;const n=x(o.substring(T,e.index),e);T=e.index+n}return x(o.substr(T)),O.closeAllNodes(),O.finalize(),w=O.toHTML(),{relevance:I,value:w,language:e,illegal:!1,emitter:O,top:R}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:o.slice(T-100,T+100),mode:n.mode},sofar:w,relevance:0,value:k(o),emitter:O};if(l)return{illegal:!1,relevance:0,value:k(o),emitter:O,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(T).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;j("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=O(n);if(i.length){const e=document.createElement("div");e.innerHTML=a.value,a.value=L(i,O(e),r)}a.value=x(a.value),j("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 I(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach(e=>{s[e]=n})}function T(e){var n=y(e);return n&&!n.disableAutodetect}function j(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=M(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&&I(r.aliases,{languageName:e})},listLanguages:function(){return Object.keys(i)},getLanguage:y,registerAliases:I,requireLanguage:function(e){var n=y(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:T,inherit:M,addPlugin:function(e){o.push(e)},vuePlugin:R}),t.debugMode=function(){l=!1},t.safeMode=function(){l=!0},t.versionString="10.2.1";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/themes/PaperMod/assets/js/license.js b/themes/PaperMod/assets/js/license.js new file mode 100644 index 0000000..8e81d22 --- /dev/null +++ b/themes/PaperMod/assets/js/license.js @@ -0,0 +1,6 @@ +/* + PaperMod v6 + License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE + Copyright (c) 2020 nanxiaobei and adityatelange + Copyright (c) 2021-2022 adityatelange +*/ diff --git a/themes/PaperMod/go.mod b/themes/PaperMod/go.mod new file mode 100644 index 0000000..af95855 --- /dev/null +++ b/themes/PaperMod/go.mod @@ -0,0 +1,3 @@ +module github.com/adityatelange/hugo-PaperMod + +go 1.12 diff --git a/themes/PaperMod/i18n/ar.yaml b/themes/PaperMod/i18n/ar.yaml new file mode 100644 index 0000000..11f50a2 --- /dev/null +++ b/themes/PaperMod/i18n/ar.yaml @@ -0,0 +1,22 @@ +- 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: "الصفحة الرئيسية" diff --git a/themes/PaperMod/i18n/bg.yaml b/themes/PaperMod/i18n/bg.yaml new file mode 100644 index 0000000..1e314af --- /dev/null +++ b/themes/PaperMod/i18n/bg.yaml @@ -0,0 +1,16 @@ +- id: prev_page + translation: "Предишна страница" + +- id: next_page + translation: "Следваща страница" + +- id: read_time + translation: + one : "1 мин" + other: "{{ .Count }} мин" + +- id: toc + translation: "Съдържание" + +- id: translations + translation: "Преводи" diff --git a/themes/PaperMod/i18n/bn.yaml b/themes/PaperMod/i18n/bn.yaml new file mode 100644 index 0000000..9c5a2c4 --- /dev/null +++ b/themes/PaperMod/i18n/bn.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "পূর্ববর্তী" + +- id: next_page + translation: "পরবর্তী" + +- id: read_time + 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/themes/PaperMod/i18n/ca.yaml b/themes/PaperMod/i18n/ca.yaml new file mode 100644 index 0000000..15713e1 --- /dev/null +++ b/themes/PaperMod/i18n/ca.yaml @@ -0,0 +1,19 @@ +- 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/themes/PaperMod/i18n/ckb.yaml b/themes/PaperMod/i18n/ckb.yaml new file mode 100644 index 0000000..25789d1 --- /dev/null +++ b/themes/PaperMod/i18n/ckb.yaml @@ -0,0 +1,25 @@ +- 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/themes/PaperMod/i18n/da.yaml b/themes/PaperMod/i18n/da.yaml new file mode 100644 index 0000000..03b0abe --- /dev/null +++ b/themes/PaperMod/i18n/da.yaml @@ -0,0 +1,28 @@ +- 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/themes/PaperMod/i18n/de.yaml b/themes/PaperMod/i18n/de.yaml new file mode 100644 index 0000000..f64aad9 --- /dev/null +++ b/themes/PaperMod/i18n/de.yaml @@ -0,0 +1,33 @@ +- id: prev_page + translation: "Vorherige" + +- 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!" diff --git a/themes/PaperMod/i18n/en.yaml b/themes/PaperMod/i18n/en.yaml new file mode 100644 index 0000000..3a1e215 --- /dev/null +++ b/themes/PaperMod/i18n/en.yaml @@ -0,0 +1,33 @@ +- id: prev_page + translation: "Prev" + +- id: next_page + translation: "Next" + +- 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/themes/PaperMod/i18n/eo.yaml b/themes/PaperMod/i18n/eo.yaml new file mode 100644 index 0000000..de5d744 --- /dev/null +++ b/themes/PaperMod/i18n/eo.yaml @@ -0,0 +1,25 @@ +- 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/themes/PaperMod/i18n/es.yaml b/themes/PaperMod/i18n/es.yaml new file mode 100644 index 0000000..52a559c --- /dev/null +++ b/themes/PaperMod/i18n/es.yaml @@ -0,0 +1,33 @@ +- id: prev_page + translation: "Anterior" + +- id: next_page + translation: "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/themes/PaperMod/i18n/fa.yaml b/themes/PaperMod/i18n/fa.yaml new file mode 100644 index 0000000..3fd5927 --- /dev/null +++ b/themes/PaperMod/i18n/fa.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "صفحه قبلی" + +- id: next_page + translation: "صفحه بعدی" + +- id: read_time + 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/themes/PaperMod/i18n/fr.yaml b/themes/PaperMod/i18n/fr.yaml new file mode 100644 index 0000000..b074c10 --- /dev/null +++ b/themes/PaperMod/i18n/fr.yaml @@ -0,0 +1,33 @@ +- id: prev_page + translation: "Page précédente" + +- id: next_page + translation: "Page suivante" + +- 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é !" diff --git a/themes/PaperMod/i18n/he.yaml b/themes/PaperMod/i18n/he.yaml new file mode 100644 index 0000000..6d203f4 --- /dev/null +++ b/themes/PaperMod/i18n/he.yaml @@ -0,0 +1,19 @@ +- id: prev_page + translation: "לעמוד הקודם" + +- id: next_page + translation: "לעמוד הבא" + +- id: read_time + translation: + one : "דקה אחת" + other: "{{ .Count }} דקות" + +- id: toc + translation: "תוכן עניינים" + +- id: translations + translation: "תרגומים" + +- id: home + translation: "דף בית" diff --git a/themes/PaperMod/i18n/hi.yaml b/themes/PaperMod/i18n/hi.yaml new file mode 100644 index 0000000..681efdc --- /dev/null +++ b/themes/PaperMod/i18n/hi.yaml @@ -0,0 +1,19 @@ +- id: prev_page + translation: "पिछला" + +- id: next_page + translation: "अगला" + +- id: read_time + translation: + one : "एक मिनट" + other: "{{ .Count }} मिनट" + +- id: edit_post + translation: "सुधारें" + +- id: toc + translation: "विषय - सूची" + +- id: translations + translation: "अनुवाद" diff --git a/themes/PaperMod/i18n/hu.yaml b/themes/PaperMod/i18n/hu.yaml new file mode 100644 index 0000000..a039dda --- /dev/null +++ b/themes/PaperMod/i18n/hu.yaml @@ -0,0 +1,16 @@ +- 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/themes/PaperMod/i18n/id.yaml b/themes/PaperMod/i18n/id.yaml new file mode 100644 index 0000000..93d34f5 --- /dev/null +++ b/themes/PaperMod/i18n/id.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/i18n/it.yaml b/themes/PaperMod/i18n/it.yaml new file mode 100644 index 0000000..ef41db4 --- /dev/null +++ b/themes/PaperMod/i18n/it.yaml @@ -0,0 +1,27 @@ +- id: prev_page + translation: "Pag Prec" + +- id: next_page + translation: "Pag Succ" + +- id: read_time + translation: + one: "1 minuto" + other: "{{ .Count }} minuti" + +- id: words + translation: + one : "parola" + other: "{{ .Count }} parole" + +- id: toc + translation: "Tabella dei Contenuti" + +- id: translations + translation: "Traduzioni" + +- id: code_copy + translation: "copia" + +- id: code_copied + translation: "copiato!" diff --git a/themes/PaperMod/i18n/ja.yaml b/themes/PaperMod/i18n/ja.yaml new file mode 100644 index 0000000..bc7bf37 --- /dev/null +++ b/themes/PaperMod/i18n/ja.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/i18n/ko.yaml b/themes/PaperMod/i18n/ko.yaml new file mode 100644 index 0000000..777dd93 --- /dev/null +++ b/themes/PaperMod/i18n/ko.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/i18n/ku.yaml b/themes/PaperMod/i18n/ku.yaml new file mode 100644 index 0000000..d1d30a5 --- /dev/null +++ b/themes/PaperMod/i18n/ku.yaml @@ -0,0 +1,25 @@ +- 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/themes/PaperMod/i18n/mn.yaml b/themes/PaperMod/i18n/mn.yaml new file mode 100644 index 0000000..dbce2ce --- /dev/null +++ b/themes/PaperMod/i18n/mn.yaml @@ -0,0 +1,25 @@ +- 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/themes/PaperMod/i18n/ms.yaml b/themes/PaperMod/i18n/ms.yaml new file mode 100644 index 0000000..d8a9eff --- /dev/null +++ b/themes/PaperMod/i18n/ms.yaml @@ -0,0 +1,28 @@ +- 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/themes/PaperMod/i18n/nl.yaml b/themes/PaperMod/i18n/nl.yaml new file mode 100644 index 0000000..e9d06fa --- /dev/null +++ b/themes/PaperMod/i18n/nl.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/i18n/pl.yaml b/themes/PaperMod/i18n/pl.yaml new file mode 100644 index 0000000..fdf6b0c --- /dev/null +++ b/themes/PaperMod/i18n/pl.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "Poprzednia strona" + +- id: next_page + translation: "Następna strona" + +- id: read_time + translation: + one: "1 min" + other: "{{ .Count }} min" + +- 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/themes/PaperMod/i18n/pt.yaml b/themes/PaperMod/i18n/pt.yaml new file mode 100644 index 0000000..f449de9 --- /dev/null +++ b/themes/PaperMod/i18n/pt.yaml @@ -0,0 +1,21 @@ +- 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" diff --git a/themes/PaperMod/i18n/ru.yaml b/themes/PaperMod/i18n/ru.yaml new file mode 100644 index 0000000..a5dbb5c --- /dev/null +++ b/themes/PaperMod/i18n/ru.yaml @@ -0,0 +1,39 @@ +- 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: "0 слов" + 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: "скопировано!" \ No newline at end of file diff --git a/themes/PaperMod/i18n/sv.yaml b/themes/PaperMod/i18n/sv.yaml new file mode 100644 index 0000000..65ce422 --- /dev/null +++ b/themes/PaperMod/i18n/sv.yaml @@ -0,0 +1,28 @@ +- 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/themes/PaperMod/i18n/tr.yaml b/themes/PaperMod/i18n/tr.yaml new file mode 100644 index 0000000..e598b41 --- /dev/null +++ b/themes/PaperMod/i18n/tr.yaml @@ -0,0 +1,25 @@ +- id: prev_page + translation: "Önceki Sayfa" + +- id: next_page + translation: "Sonraki Sayfa" + +- id: read_time + translation: + one : "1 dk" + other: "{{ .Count }} dk" + +- id: toc + translation: "İçindekiler" + +- id: translations + translation: "Çeviriler" + +- id: home + translation: "Anasayfa" + +- id: code_copy + translation: "Kopyala" + +- id: code_copied + translation: "Kopyalandı!" diff --git a/themes/PaperMod/i18n/uk.yaml b/themes/PaperMod/i18n/uk.yaml new file mode 100644 index 0000000..41be964 --- /dev/null +++ b/themes/PaperMod/i18n/uk.yaml @@ -0,0 +1,25 @@ +- 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/themes/PaperMod/i18n/uz.yaml b/themes/PaperMod/i18n/uz.yaml new file mode 100644 index 0000000..c9f2375 --- /dev/null +++ b/themes/PaperMod/i18n/uz.yaml @@ -0,0 +1,20 @@ +- 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/themes/PaperMod/i18n/vi.yaml b/themes/PaperMod/i18n/vi.yaml new file mode 100644 index 0000000..a3832ed --- /dev/null +++ b/themes/PaperMod/i18n/vi.yaml @@ -0,0 +1,25 @@ +- 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: toc + translation: "Mục lục" + +- id: translations + translation: "Bản dịch" + +- id: home + translation: "Trang chủ" + +- id: code_copy + translation: "Sao chép" + +- id: code_copied + translation: "Đã sao chép!" diff --git a/themes/PaperMod/i18n/zh-tw.yaml b/themes/PaperMod/i18n/zh-tw.yaml new file mode 100644 index 0000000..48b84d2 --- /dev/null +++ b/themes/PaperMod/i18n/zh-tw.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/i18n/zh.yaml b/themes/PaperMod/i18n/zh.yaml new file mode 100644 index 0000000..0280425 --- /dev/null +++ b/themes/PaperMod/i18n/zh.yaml @@ -0,0 +1,33 @@ +- 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/themes/PaperMod/images/screenshot.png b/themes/PaperMod/images/screenshot.png new file mode 100644 index 0000000..a37c485 Binary files /dev/null and b/themes/PaperMod/images/screenshot.png differ diff --git a/themes/PaperMod/images/tn.png b/themes/PaperMod/images/tn.png new file mode 100644 index 0000000..cf83179 Binary files /dev/null and b/themes/PaperMod/images/tn.png differ diff --git a/themes/PaperMod/layouts/404.html b/themes/PaperMod/layouts/404.html new file mode 100644 index 0000000..a405573 --- /dev/null +++ b/themes/PaperMod/layouts/404.html @@ -0,0 +1,3 @@ +{{- define "main" }} +
    404
    +{{- end }}{{/* end main */ -}} diff --git a/themes/PaperMod/layouts/_default/_markup/render-image.html b/themes/PaperMod/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..1acb87d --- /dev/null +++ b/themes/PaperMod/layouts/_default/_markup/render-image.html @@ -0,0 +1 @@ +{{ .Text }} diff --git a/themes/PaperMod/layouts/_default/archives.html b/themes/PaperMod/layouts/_default/archives.html new file mode 100644 index 0000000..e400e2c --- /dev/null +++ b/themes/PaperMod/layouts/_default/archives.html @@ -0,0 +1,49 @@ +{{- 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" }} +
    +{{- end }} +{{- end }} + +{{- end }}{{/* end main */}} diff --git a/themes/PaperMod/layouts/_default/baseof.html b/themes/PaperMod/layouts/_default/baseof.html new file mode 100644 index 0000000..3d13f07 --- /dev/null +++ b/themes/PaperMod/layouts/_default/baseof.html @@ -0,0 +1,23 @@ + + + + + {{- partial "head.html" . }} + + + + {{- partialCached "header.html" . .Page -}} +
    + {{- block "main" . }}{{ end }} +
    + {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} + + + diff --git a/themes/PaperMod/layouts/_default/index.json b/themes/PaperMod/layouts/_default/index.json new file mode 100644 index 0000000..feeb437 --- /dev/null +++ b/themes/PaperMod/layouts/_default/index.json @@ -0,0 +1,7 @@ +{{- $.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/themes/PaperMod/layouts/_default/list.html b/themes/PaperMod/layouts/_default/list.html new file mode 100644 index 0000000..3a6f316 --- /dev/null +++ b/themes/PaperMod/layouts/_default/list.html @@ -0,0 +1,112 @@ +{{- define "main" }} + +{{- 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 }} + +{{- $paginator := .Paginate $pages }} + +{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} +{{- partial "home_info.html" . }} +{{- end }} + +{{- $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)) }} +{{- $class = "first-entry" }} +{{- else if $term }} +{{- $class = "post-entry tag-entry" }} +{{- end }} + +
    + {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} + {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} +
    +

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

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

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

    +
    + {{- end }} + {{- if not (.Param "hideMeta") }} +
    + {{- partial "post_meta.html" . -}} +
    + {{- end }} + +
    +{{- end }} + +{{- if gt $paginator.TotalPages 1 }} + +{{- end }} + +{{- end }}{{/* end profileMode */}} + +{{- end }}{{- /* end main */ -}} diff --git a/themes/PaperMod/layouts/_default/rss.xml b/themes/PaperMod/layouts/_default/rss.xml new file mode 100644 index 0000000..134d50d --- /dev/null +++ b/themes/PaperMod/layouts/_default/rss.xml @@ -0,0 +1,50 @@ +{{- $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 }} + {{ .Permalink }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }} + {{- with site.Params.images }} + + {{ index . 0 | absURL }} + {{ index . 0 | absURL }} + + {{- end }} + Hugo -- gohugo.io{{ with site.LanguageCode }} + {{.}}{{end}}{{ with site.Author.email }} + {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Author.email }} + {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} + {{- if site.Params.ShowFullTextinRSS }} + {{ (printf "" .Content) | safeHTML }} + {{- end }} + + {{- end }} + {{ end }} + + diff --git a/themes/PaperMod/layouts/_default/search.html b/themes/PaperMod/layouts/_default/search.html new file mode 100644 index 0000000..2349587 --- /dev/null +++ b/themes/PaperMod/layouts/_default/search.html @@ -0,0 +1,29 @@ +{{- define "main" }} + + + + + +{{- end }}{{/* end main */}} diff --git a/themes/PaperMod/layouts/_default/single.html b/themes/PaperMod/layouts/_default/single.html new file mode 100644 index 0000000..b749725 --- /dev/null +++ b/themes/PaperMod/layouts/_default/single.html @@ -0,0 +1,58 @@ +{{- define "main" }} + +
    +
    + {{ partial "breadcrumbs.html" . }} +

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

    + {{- if .Description }} +
    + {{ .Description }} +
    + {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} +
    + {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }} + {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} + {{- if (.Param "ShowToc") }} + {{- partial "toc.html" . }} + {{- end }} + + {{- if .Content }} +
    + {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
    + {{- end }} + +
    + {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} + + {{- if (.Param "ShowPostNavLinks") }} + {{- partial "post_nav_links.html" . }} + {{- end }} + {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} + {{- partial "share_icons.html" . -}} + {{- end }} +
    + + {{- if (.Param "comments") }} + {{- partial "comments.html" . }} + {{- end }} +
    + +{{- end }}{{/* end main */}} diff --git a/themes/PaperMod/layouts/_default/terms.html b/themes/PaperMod/layouts/_default/terms.html new file mode 100644 index 0000000..6fd2654 --- /dev/null +++ b/themes/PaperMod/layouts/_default/terms.html @@ -0,0 +1,27 @@ +{{- define "main" }} + +{{- if .Title }} + +{{- end }} + +
      + {{- $type := .Type }} + {{- range $key, $value := .Data.Terms.Alphabetical }} + {{- $name := .Name }} + {{- $count := .Count }} + {{- with site.GetPage (printf "/%s/%s" $type $name) }} +
    • + {{ .Name }} {{ $count }} +
    • + {{- end }} + {{- end }} +
    + +{{- end }}{{/* end main */ -}} diff --git a/themes/PaperMod/layouts/partials/anchored_headings.html b/themes/PaperMod/layouts/partials/anchored_headings.html new file mode 100644 index 0000000..377af89 --- /dev/null +++ b/themes/PaperMod/layouts/partials/anchored_headings.html @@ -0,0 +1,2 @@ +{{- /* formats .Content headings by adding an anchor */ -}} +{{ . | replaceRE "()" "${1}${3}" | safeHTML }} diff --git a/themes/PaperMod/layouts/partials/author.html b/themes/PaperMod/layouts/partials/author.html new file mode 100644 index 0000000..8f2758f --- /dev/null +++ b/themes/PaperMod/layouts/partials/author.html @@ -0,0 +1,9 @@ +{{- 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 {}")) }} +{{- (delimit $author ", " ) }} +{{- else }} +{{- $author }} +{{- end }} +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/breadcrumbs.html b/themes/PaperMod/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..7e8257b --- /dev/null +++ b/themes/PaperMod/layouts/partials/breadcrumbs.html @@ -0,0 +1,19 @@ +{{- if (.Param "ShowBreadCrumbs") -}} + +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/comments.html b/themes/PaperMod/layouts/partials/comments.html new file mode 100644 index 0000000..918451a --- /dev/null +++ b/themes/PaperMod/layouts/partials/comments.html @@ -0,0 +1,3 @@ +{{- /* Comments area start */ -}} +{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} +{{- /* Comments area end */ -}} diff --git a/themes/PaperMod/layouts/partials/cover.html b/themes/PaperMod/layouts/partials/cover.html new file mode 100644 index 0000000..5c5f2fb --- /dev/null +++ b/themes/PaperMod/layouts/partials/cover.html @@ -0,0 +1,40 @@ +{{- with .cxt}} {{/* Apply proper context from dict */}} +{{- if (and .Params.cover.image (not $.isHidden)) }} +{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} +
    + {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} + {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }} + {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- if $cover -}}{{/* i.e it is present in page bundle */}} + {{- 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 }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} + {{ $alt }} + {{- end }} + {{- else }}{{/* For absolute urls and external links, no img processing here */}} + {{- if $addLink }}{{ end -}} + {{ $alt }} + {{- end }} + {{- if $addLink }}{{ end -}} + {{/* Display Caption */}} + {{- if not $.IsHome }} + {{ with .Params.cover.caption }}

    {{ . | markdownify }}

    {{- end }} + {{- end }} +
    +{{- end }}{{/* End image */}} +{{- end -}}{{/* End context */ -}} diff --git a/themes/PaperMod/layouts/partials/edit_post.html b/themes/PaperMod/layouts/partials/edit_post.html new file mode 100644 index 0000000..efa4c70 --- /dev/null +++ b/themes/PaperMod/layouts/partials/edit_post.html @@ -0,0 +1,8 @@ +{{- if or .Params.editPost.URL site.Params.editPost.URL -}} +{{- $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/themes/PaperMod/layouts/partials/extend_footer.html b/themes/PaperMod/layouts/partials/extend_footer.html new file mode 100644 index 0000000..0519748 --- /dev/null +++ b/themes/PaperMod/layouts/partials/extend_footer.html @@ -0,0 +1,3 @@ +{{- /* Footer custom content area start */ -}} +{{- /* Insert any custom code web-analytics, resources, etc. here */ -}} +{{- /* Footer custom content area end */ -}} diff --git a/themes/PaperMod/layouts/partials/extend_head.html b/themes/PaperMod/layouts/partials/extend_head.html new file mode 100644 index 0000000..150cbef --- /dev/null +++ b/themes/PaperMod/layouts/partials/extend_head.html @@ -0,0 +1,4 @@ +{{- /* 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 */ -}} diff --git a/themes/PaperMod/layouts/partials/footer.html b/themes/PaperMod/layouts/partials/footer.html new file mode 100644 index 0000000..0d71cec --- /dev/null +++ b/themes/PaperMod/layouts/partials/footer.html @@ -0,0 +1,137 @@ +{{- if not (.Param "hideFooter") }} +
    + {{- if site.Copyright }} + {{ site.Copyright | markdownify }} + {{- else }} + © {{ now.Year }} {{ site.Title }} + {{- end }} + + Powered by + Hugo & + PaperMod + Hosted on + gitlab + +
    +{{- end }} + +{{- if (not site.Params.disableScrollToTop) }} + + + + + +{{- end }} + +{{- partial "extend_footer.html" . }} + + + +{{- if (not site.Params.disableScrollToTop) }} + +{{- end }} + +{{- if (not site.Params.disableThemeToggle) }} + +{{- end }} + +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} + +{{- end }} diff --git a/themes/PaperMod/layouts/partials/head.html b/themes/PaperMod/layouts/partials/head.html new file mode 100644 index 0000000..35257fc --- /dev/null +++ b/themes/PaperMod/layouts/partials/head.html @@ -0,0 +1,170 @@ + + + +{{- 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 }} + +{{- 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" }} + +{{- /* include `an-old-hope` if hljs is on */}} +{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }} +{{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} + +{{- /* order is important */}} +{{- $core := (slice $theme_vars $reset $common $hljs $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 }} + +{{- /* 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 -}} + +{{- /* Highlight.js */}} +{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} +{{- if not site.Params.assets.disableFingerprinting }} +{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }} + +{{- else }} +{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }} + +{{- end }} +{{- end }} + +{{- /* Favicons */}} + + + + + + + + +{{- /* RSS */}} +{{ 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" . }} +{{- template "partials/templates/opengraph.html" . }} +{{- template "partials/templates/twitter_cards.html" . }} +{{- template "partials/templates/schema_json.html" . }} +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/header.html b/themes/PaperMod/layouts/partials/header.html new file mode 100644 index 0000000..4a7291e --- /dev/null +++ b/themes/PaperMod/layouts/partials/header.html @@ -0,0 +1,149 @@ +{{- /* theme-toggle is enabled */}} +{{- if (not site.Params.disableThemeToggle) }} +{{- /* theme is light */}} +{{- if (eq site.Params.defaultTheme "light") }} + +{{- /* theme is dark */}} +{{- else if (eq site.Params.defaultTheme "dark") }} + +{{- else }} +{{- /* theme is auto */}} + +{{- end }} +{{- /* theme-toggle is disabled and theme is auto */}} +{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} + +{{- end }} + +
    + +
    diff --git a/themes/PaperMod/layouts/partials/home_info.html b/themes/PaperMod/layouts/partials/home_info.html new file mode 100644 index 0000000..efae956 --- /dev/null +++ b/themes/PaperMod/layouts/partials/home_info.html @@ -0,0 +1,13 @@ +{{- with site.Params.homeInfoParams }} +
    +
    +

    {{ .Title | markdownify }}

    +
    +
    + {{ .Content | markdownify }} +
    +
    + {{ partial "social_icons.html" site.Params.socialIcons }} +
    +
    +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/index_profile.html b/themes/PaperMod/layouts/partials/index_profile.html new file mode 100644 index 0000000..c2ff3e6 --- /dev/null +++ b/themes/PaperMod/layouts/partials/index_profile.html @@ -0,0 +1,55 @@ +
    + {{- with site.Params.profileMode }} +
    + {{- if .imageUrl -}} + {{- $img := resources.Get .imageUrl }} + {{- 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" site.Params.socialIcons -}} + + {{- with .buttons }} + + {{- end }} +
    + {{- end}} +
    diff --git a/themes/PaperMod/layouts/partials/post_canonical.html b/themes/PaperMod/layouts/partials/post_canonical.html new file mode 100644 index 0000000..abfc1e3 --- /dev/null +++ b/themes/PaperMod/layouts/partials/post_canonical.html @@ -0,0 +1,9 @@ +{{ 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/themes/PaperMod/layouts/partials/post_meta.html b/themes/PaperMod/layouts/partials/post_meta.html new file mode 100644 index 0000000..15b8b1b --- /dev/null +++ b/themes/PaperMod/layouts/partials/post_meta.html @@ -0,0 +1,21 @@ +{{- $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 }} + +{{- with (partial "author.html" .) }} +{{- $scratch.Add "meta" (slice .) }} +{{- end }} + +{{- with ($scratch.Get "meta") }} +{{- delimit . " · " -}} +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/post_nav_links.html b/themes/PaperMod/layouts/partials/post_nav_links.html new file mode 100644 index 0000000..b988641 --- /dev/null +++ b/themes/PaperMod/layouts/partials/post_nav_links.html @@ -0,0 +1,19 @@ +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- if and (gt (len $pages) 1) (in $pages . ) }} + +{{- end }} diff --git a/themes/PaperMod/layouts/partials/share_icons.html b/themes/PaperMod/layouts/partials/share_icons.html new file mode 100644 index 0000000..59ed050 --- /dev/null +++ b/themes/PaperMod/layouts/partials/share_icons.html @@ -0,0 +1,71 @@ +{{- $pageurl := .Permalink }} +{{- $title := .Title }} + +{{- $.Scratch.Set "tags" ""}} + +{{- with .Params.Tags }} +{{- $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 }} + + \ No newline at end of file diff --git a/themes/PaperMod/layouts/partials/social_icons.html b/themes/PaperMod/layouts/partials/social_icons.html new file mode 100644 index 0000000..3f8d6a3 --- /dev/null +++ b/themes/PaperMod/layouts/partials/social_icons.html @@ -0,0 +1,7 @@ + diff --git a/themes/PaperMod/layouts/partials/svg.html b/themes/PaperMod/layouts/partials/svg.html new file mode 100644 index 0000000..49f5389 --- /dev/null +++ b/themes/PaperMod/layouts/partials/svg.html @@ -0,0 +1,649 @@ +{{- $icon_name := ( trim .name " " | lower )}} +{{- if (eq $icon_name "123rf") -}} + + + + +{{- else if (eq $icon_name "adobestock") -}} + + + + +{{- else if (eq $icon_name "anilist") -}} + + + +{{- else if (eq $icon_name "applemusic") -}} + + + +{{- else if (eq $icon_name "applepodcasts") -}} + + + +{{- else if (eq $icon_name "behance") -}} + + + +{{- else if (eq $icon_name "bilibili") -}} + + + + + + + +{{- else if (eq $icon_name "bitcoin") -}} + + + +{{- else if (eq $icon_name "buymeacoffee") -}} + + + + + + + + + + + + + + + + +{{- else if (eq $icon_name "codepen") -}} + + + + + + + +{{- else if (eq $icon_name "cryptohack") -}} + + + + + + +{{- else if (eq $icon_name "ctftime") -}} + + + + + + +{{- else if (eq $icon_name "cv") -}} + + + + + + +{{- else if (eq $icon_name "dev") -}} + + + +{{- else if (eq $icon_name "deviantart") -}} + + + +{{- else if (eq $icon_name "deezer") -}} + + + +{{- else if (eq $icon_name "discogs") -}} + + + +{{- else if (eq $icon_name "discord") -}} + + + + +{{- else if (eq $icon_name "dreamstime") -}} + + + +{{- else if (eq $icon_name "dribbble") -}} + + + + + +{{- else if (eq $icon_name "email") -}} + + + + +{{- else if (eq $icon_name "facebook") -}} + + + +{{- else if (eq $icon_name "flickr") -}} + + + +{{- else if (eq $icon_name "freepik") -}} + + + + + + +{{- else if (eq $icon_name "gitea") -}} + + + +{{- else if (eq $icon_name "github") -}} + + + + +{{- else if (eq $icon_name "gitlab") -}} + + + + +{{- else if (eq $icon_name "goodreads") -}} + + + +{{- else if (eq $icon_name "googlepodcasts") -}} + + + +{{- else if (eq $icon_name "googlescholar") -}} + + + +{{- else if (eq $icon_name "gurushots") -}} + + + + + + + + + + + + +{{- else if (eq $icon_name "hackerone") -}} + + + +{{- else if (eq $icon_name "hackerrank") -}} + + + + + + +{{- else if (eq $icon_name "hackthebox") -}} + + + + + + +{{- else if (eq $icon_name "instagram") -}} + + + + + +{{- else if (eq $icon_name "itchio") -}} + + + +{{- else if (eq $icon_name "kaggle") -}} + + + +{{- else if (eq $icon_name "kakaotalk") -}} + + + + + + + +{{- else if (eq $icon_name "keybase") -}} + + + +{{- else if (eq $icon_name "kofi") -}} + + + +{{- else if (eq $icon_name "komoot") -}} + + + +{{- else if (eq $icon_name "lastfm") -}} + + + +{{- else if (eq $icon_name "letterboxd") -}} + + + +{{- else if (eq $icon_name "liberapay") -}} + + + + + + +{{- else if (eq $icon_name "lichess" ) -}} + + + +{{- else if (eq $icon_name "linkedin") -}} + + + + + +{{- else if (eq $icon_name "mastodon") -}} + + + + +{{- else if (eq $icon_name "matrix") -}} + + + +{{- else if (eq $icon_name "medium") -}} + + + + + +{{- else if (eq $icon_name "microblog") -}} + + + + + + +{{- else if (eq $icon_name "mixcloud") -}} + + + +{{- else if (eq $icon_name "monero") -}} + + + +{{- else if (eq $icon_name "nuget") -}} + + + + + + + + +{{- else if (eq $icon_name "orcid") -}} + + + +{{- else if (eq $icon_name "osu!") -}} + + + + + + +{{- else if (eq $icon_name "overcast") -}} + + + +{{- else if (eq $icon_name "patreon") -}} + + + +{{- else if (eq $icon_name "paypal") -}} + + + +{{- else if (eq $icon_name "peertube") -}} + + + +{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}} + + + + +{{- else if (eq $icon_name "phone") -}} + + + + + +{{- else if (eq $icon_name "pocketcasts") -}} + + + +{{- else if (eq $icon_name "polywork") -}} + +{{- else if (eq $icon_name "qq") -}} + + + + +{{- else if (eq $icon_name "reddit") -}} + + + +{{- else if (eq $icon_name "researchgate") -}} + + + +{{- else if (eq $icon_name "rss") -}} + + + + + +{{- else if (eq $icon_name "serverfault") -}} + + + +{{- else if (eq $icon_name "sessionmessenger") -}} + + + + +{{- else if (eq $icon_name "soundcloud") -}} + + + +{{- else if (eq $icon_name "shutterstock") -}} + + + + +{{- else if (eq $icon_name "sketchfab") -}} + + + +{{- else if (eq $icon_name "slack") -}} + + + + + + + +{{- else if (eq $icon_name "snapchat") -}} + + + +{{- else if (eq $icon_name "sourcehut") -}} + + + + +{{- else if (eq $icon_name "spotify") -}} + + + +{{- else if (eq $icon_name "stackoverflow") -}} + + + +{{- else if (eq $icon_name "steam") -}} + + + + + + + + + +{{- else if (eq $icon_name "strava") -}} + + + +{{- else if (eq $icon_name "telegram") -}} + + + +{{- else if (eq $icon_name "threema") -}} + + + +{{- else if (eq $icon_name "tiktok") -}} + + + +{{- else if (eq $icon_name "twitch") -}} + + + +{{- else if (eq $icon_name "twitter") -}} + + + + +{{- else if (eq $icon_name "unsplash") -}} + + + + +{{- else if (eq $icon_name "vimeo") -}} + + + +{{- else if (eq $icon_name "xda") -}} + + + +{{- else if (eq $icon_name "xing") -}} + + + + +{{- else if (eq $icon_name "xmpp") -}} + + + + +{{- else if (eq $icon_name "ycombinator") -}} + + + +{{- else if (eq $icon_name "youtube") -}} + + + + + +{{- else if $icon_name -}} + + + + +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/templates/opengraph.html b/themes/PaperMod/layouts/partials/templates/opengraph.html new file mode 100644 index 0000000..13e7b2b --- /dev/null +++ b/themes/PaperMod/layouts/partials/templates/opengraph.html @@ -0,0 +1,52 @@ + + + + +{{- if .Params.cover.image -}} +{{- if (ne .Params.cover.relative true) }} + +{{- else}} + +{{- end}} +{{- else }} + +{{- with $.Params.images -}} +{{- range first 6 . }}{{ end -}} +{{- else -}} +{{- $images := $.Resources.ByType "image" -}} +{{- $featured := $images.GetMatch "*feature*" -}} +{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} +{{- with $featured -}} + +{{- else -}} +{{- with site.Params.images }}{{ end -}} +{{- end -}} +{{- end -}} +{{- end }} + +{{- if .IsPage }} +{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} + +{{ with .PublishDate }}{{ end }} +{{ with .Lastmod }}{{ end }} +{{- end -}} + +{{- with .Params.audio }}{{ end }} +{{- with .Params.locale }}{{ end }} +{{- with site.Params.title }}{{ end }} +{{- with .Params.videos }}{{- range . }} + +{{ end }}{{ end }} + +{{- /* If it is part of a series, link to related articles */}} +{{- $permalink := .Permalink }} +{{- $siteSeries := site.Taxonomies.series }} +{{ with .Params.series }}{{- range $name := . }} + {{- $series := index $siteSeries ($name | urlize) }} + {{- range $page := first 6 $series.Pages }} + {{- if ne $page.Permalink $permalink }}{{ end }} + {{- end }} +{{ end }}{{ end }} + +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with site.Social.facebook_admin }}{{ end }} diff --git a/themes/PaperMod/layouts/partials/templates/schema_json.html b/themes/PaperMod/layouts/partials/templates/schema_json.html new file mode 100644 index 0000000..74abbb5 --- /dev/null +++ b/themes/PaperMod/layouts/partials/templates/schema_json.html @@ -0,0 +1,119 @@ +{{ if .IsHome }} + +{{- else if (or .IsPage .IsSection) }} +{{/* BreadcrumbList */}} +{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }} +{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} +{{- $bc_list := (split $lang_url "/")}} + +{{- $scratch := newScratch }} + +{{- if .IsPage }} + +{{- end }}{{/* .IsPage end */}} + +{{- end -}} diff --git a/themes/PaperMod/layouts/partials/templates/twitter_cards.html b/themes/PaperMod/layouts/partials/templates/twitter_cards.html new file mode 100644 index 0000000..bd46e37 --- /dev/null +++ b/themes/PaperMod/layouts/partials/templates/twitter_cards.html @@ -0,0 +1,33 @@ +{{- if .Params.cover.image -}} + +{{- if (ne $.Params.cover.relative true) }} + +{{- else }} + +{{- end}} +{{- else }} +{{- with $.Params.images -}} + + +{{ else -}} +{{- $images := $.Resources.ByType "image" -}} +{{- $featured := $images.GetMatch "*feature*" -}} +{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} +{{- with $featured -}} + + +{{- else -}} +{{- with site.Params.images -}} + + +{{ else -}} + +{{- end -}} +{{- end -}} +{{- end }} +{{- end }} + + +{{ with site.Social.twitter -}} + +{{ end -}} diff --git a/themes/PaperMod/layouts/partials/toc.html b/themes/PaperMod/layouts/partials/toc.html new file mode 100644 index 0000000..d9b8b23 --- /dev/null +++ b/themes/PaperMod/layouts/partials/toc.html @@ -0,0 +1,97 @@ +{{- $headers := findRE "(.|\n])+?
    " .Content -}} +{{- $has_headers := ge (len $headers) 1 -}} +{{- if $has_headers -}} +
    +
    + + {{- i18n "toc" | default "Table of Contents" }} + + +
    + {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} + {{- $largest := 6 -}} + {{- range $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + {{- if lt $headerLevel $largest -}} + {{- $largest = $headerLevel -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} + + {{- $.Scratch.Set "bareul" slice -}} +
      + {{- range seq (sub $firstHeaderLevel $largest) -}} +
        + {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}} + {{- end -}} + {{- range $i, $header := $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + + {{/* get id="xyz" */}} + {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }} + + {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}} + {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }} + {{- $header := replaceRE "((.|\n])+?)" "$1" $header -}} + + {{- if ne $i 0 -}} + {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}} + {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}} + {{- if gt $headerLevel $prevHeaderLevel -}} + {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}} +
          + {{/* the first should not be recorded */}} + {{- if ne $prevHeaderLevel . -}} + {{- $.Scratch.Add "bareul" . -}} + {{- end -}} + {{- end -}} + {{- else -}} + + {{- if lt $headerLevel $prevHeaderLevel -}} + {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}} + {{- if in ($.Scratch.Get "bareul") . -}} +
        + {{/* manually do pop item */}} + {{- $tmp := $.Scratch.Get "bareul" -}} + {{- $.Scratch.Delete "bareul" -}} + {{- $.Scratch.Set "bareul" slice}} + {{- range seq (sub (len $tmp) 1) -}} + {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}} + {{- end -}} + {{- else -}} +
      + + {{- end -}} + {{- end -}} + {{- end -}} + {{- end }} +
    • + {{- $header | safeHTML -}} + {{- else }} +
    • + {{- $header | safeHTML -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := $largest }} + {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} +
    • + {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} + {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} +
    + {{- else }} + +
  • + {{- end -}} + {{- end }} + + {{- end }} + + + +{{- end }} diff --git a/themes/PaperMod/layouts/partials/translation_list.html b/themes/PaperMod/layouts/partials/translation_list.html new file mode 100644 index 0000000..0028251 --- /dev/null +++ b/themes/PaperMod/layouts/partials/translation_list.html @@ -0,0 +1,19 @@ +{{- if .IsTranslated -}} +{{- if (ne .Layout "search") }} +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} +{{- end }} +{{- i18n "translations" | default "Translations" }}: + +{{- end -}} diff --git a/themes/PaperMod/layouts/robots.txt b/themes/PaperMod/layouts/robots.txt new file mode 100644 index 0000000..f26f508 --- /dev/null +++ b/themes/PaperMod/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +Disallow: +{{- else }} +Disallow: / +{{- end }} +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/themes/PaperMod/layouts/shortcodes/collapse.html b/themes/PaperMod/layouts/shortcodes/collapse.html new file mode 100644 index 0000000..17d8d3b --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/collapse.html @@ -0,0 +1,8 @@ +{{ if .Get "summary" }} +{{ else }} +{{ warnf "missing value for param 'summary': %s" .Position }} +{{ end }} +

    + {{ .Get "summary" | markdownify }} + {{ .Inner | markdownify }} +

    diff --git a/themes/PaperMod/layouts/shortcodes/figure.html b/themes/PaperMod/layouts/shortcodes/figure.html new file mode 100644 index 0000000..8c93eff --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/figure.html @@ -0,0 +1,31 @@ + + {{- if .Get "link" -}} + + {{- end }} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
    + {{ with (.Get "title") -}} + {{ . }} + {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

    + {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

    + {{- end }} +
    + {{- end }} + diff --git a/themes/PaperMod/layouts/shortcodes/inTextImg.html b/themes/PaperMod/layouts/shortcodes/inTextImg.html new file mode 100644 index 0000000..0239fd6 --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/inTextImg.html @@ -0,0 +1,5 @@ +{{- $Img := (.Get "url") }} +{{- $height := (.Get "height") }} +{{- $alt := (.Get "alt") }} + +{{$alt}} diff --git a/themes/PaperMod/layouts/shortcodes/ltr.html b/themes/PaperMod/layouts/shortcodes/ltr.html new file mode 100644 index 0000000..4ad7682 --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/ltr.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
    + {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
    diff --git a/themes/PaperMod/layouts/shortcodes/rawhtml.html b/themes/PaperMod/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..9350c13 --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{- .Inner -}} \ No newline at end of file diff --git a/themes/PaperMod/layouts/shortcodes/rtl.html b/themes/PaperMod/layouts/shortcodes/rtl.html new file mode 100644 index 0000000..a69b8ce --- /dev/null +++ b/themes/PaperMod/layouts/shortcodes/rtl.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
    + {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
    diff --git a/themes/PaperMod/theme.toml b/themes/PaperMod/theme.toml new file mode 100644 index 0000000..b49887d --- /dev/null +++ b/themes/PaperMod/theme.toml @@ -0,0 +1,51 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "PaperMod" +license = "MIT" +licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE" +description = "A fast, clean, responsive Hugo theme" +homepage = "https://adityatelange.github.io/hugo-PaperMod/" +tags = [ + "responsive", + "simple", + "clean", + "light", + "dark", + "blog", + "minimalist", + "highlight.js", + "search" +] +features = [ + "responsive", + "single-column", + "blog", + "cover-image", + "table-of-contents", + "opengraph", + "highlight.js", + "favicon", + "archive", + "share-icons", + "cover", + "multilingual", + "social-icons", + "minified-assets", + "theme-toggle", + "menu-location-indicator", + "scroll-to-top", + "search" +] +min_version = "0.83.0" + +[author] + name = "Aditya Telange" + homepage = "https://github.com/adityatelange/" + +# If porting an existing theme +[original] + name = "Paper" + author = "nanxiaobei" + homepage = "https://github.com/nanxiaobei" + repo = "https://github.com/nanxiaobei/hugo-paper/" diff --git a/update-theme.sh b/update-theme.sh new file mode 100644 index 0000000..9cc723a --- /dev/null +++ b/update-theme.sh @@ -0,0 +1,3 @@ +#! /bin/bash +cd themes/PaperMod +git pull