mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-11-23 13:18:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
118119693d | ||
|
|
28cbd3c581 | ||
|
|
6be1e9170c | ||
|
|
26523e0fd8 | ||
|
|
5f157eba7a | ||
|
|
969bebdc56 | ||
|
|
60eababe10 | ||
|
|
71da652f29 | ||
|
|
17bf01d323 | ||
|
|
77ff4a25f5 | ||
|
|
8919e487b5 | ||
|
|
a87aee984e | ||
|
|
a5d59c7d44 | ||
|
|
d3768854d0 | ||
|
|
154d006e01 | ||
|
|
a1788a7a59 | ||
|
|
c4ca7ca486 | ||
|
|
2a980c81da | ||
|
|
0d26c357e1 | ||
|
|
ecd0d4f8f4 | ||
|
|
4bf8893adc | ||
|
|
30f865ef21 | ||
|
|
f82488f1f9 | ||
|
|
e15621f499 | ||
|
|
8a1d813d2c | ||
|
|
1e01e41de0 | ||
|
|
153ed24afe | ||
|
|
1027c7fc62 | ||
|
|
87de3fb024 | ||
|
|
8af442a6a7 | ||
|
|
e457685198 | ||
|
|
809b67df8b | ||
|
|
176670c077 | ||
|
|
57a82e48c9 | ||
|
|
2935f62cde | ||
|
|
4d06cee5d6 | ||
|
|
fbdafa5a11 | ||
|
|
c43b0d19b8 | ||
|
|
5c076622e2 | ||
|
|
4a3e050bc3 | ||
|
|
fe946d57b3 | ||
|
|
7dee1df343 | ||
|
|
6533518403 | ||
|
|
f207ce6d58 | ||
|
|
35b4e39829 | ||
|
|
ec4eb885f2 | ||
|
|
ee4cadecc5 | ||
|
|
9870ab3b40 | ||
|
|
b6a1156b8b | ||
|
|
34c9e0a8ed | ||
|
|
437fa67355 | ||
|
|
4ecb141461 | ||
|
|
e26cb4ae9a | ||
|
|
5688e87f66 | ||
|
|
8739b2f73b | ||
|
|
86ed1c47bc | ||
|
|
08f945d386 | ||
|
|
a3b58b9e95 | ||
|
|
1d9e109808 | ||
|
|
c4543e32f0 | ||
|
|
4fede693fd | ||
|
|
31185b01d5 | ||
|
|
e8b88d4e72 | ||
|
|
7c29bf83e7 | ||
|
|
a05b477340 | ||
|
|
1b45b3f6a1 | ||
|
|
67f02cdc85 | ||
|
|
c17406565e | ||
|
|
adc2d0af81 | ||
|
|
96f8b27fd1 | ||
|
|
fb9b5984fa | ||
|
|
7ca348827e | ||
|
|
730ab0de35 | ||
|
|
8438531860 | ||
|
|
3c7fef6ba3 | ||
|
|
893811ac43 | ||
|
|
d76a7f8e87 | ||
|
|
b9cea2f9c3 | ||
|
|
011c004f6a | ||
|
|
f5a9cf000f | ||
|
|
dd36eab662 | ||
|
|
58788790e0 | ||
|
|
383696db85 | ||
|
|
f1b2dea280 | ||
|
|
a88ff686b3 | ||
|
|
cc93a30768 | ||
|
|
cb2ecbadb9 | ||
|
|
38cf5f95b6 | ||
|
|
6585da7746 | ||
|
|
50745e5e2f | ||
|
|
10d3dcc0e0 | ||
|
|
a2f09c8c0d | ||
|
|
3f20d3cd77 | ||
|
|
59984fa98f | ||
|
|
da89fed021 | ||
|
|
c1c1252519 | ||
|
|
3bb0ca281f | ||
|
|
6c5a8f6b05 | ||
|
|
7d061d56d4 | ||
|
|
1cf53273c3 | ||
|
|
bb4f2dce35 | ||
|
|
466b48b5ba | ||
|
|
b63c195a10 | ||
|
|
c98a924842 | ||
|
|
6e10faefc8 | ||
|
|
312906c27c | ||
|
|
7fa2cf7642 | ||
|
|
6bb81981e6 | ||
|
|
0abc19221a | ||
|
|
73f747f017 | ||
|
|
ed783f2342 | ||
|
|
ac64b01989 | ||
|
|
dfe2f63b61 | ||
|
|
008441da54 | ||
|
|
8e06a8ab43 | ||
|
|
4d9a3e3f2a | ||
|
|
0a5bd487e0 | ||
|
|
ff85b9cd65 | ||
|
|
b8cdf95eb2 | ||
|
|
8ea01a6e85 | ||
|
|
5a4651783f | ||
|
|
22da2f8c02 | ||
|
|
d3bc6af9b6 | ||
|
|
ee1e0f3aa3 | ||
|
|
7cf752f864 | ||
|
|
149f12cea7 | ||
|
|
72615b6d49 | ||
|
|
e2e1011bde | ||
|
|
b4a056662a | ||
|
|
fd10e80d47 | ||
|
|
96418e7ab6 | ||
|
|
6d82e5054d | ||
|
|
bd46db414e | ||
|
|
f84eeba36e | ||
|
|
78ac395814 | ||
|
|
9b297ff00d | ||
|
|
243ba38a34 | ||
|
|
a020be2137 | ||
|
|
0ff8237eed | ||
|
|
9f1f414be8 | ||
|
|
3e53621007 | ||
|
|
5a2a88cab1 | ||
|
|
d360267d4e | ||
|
|
8c5833bad0 | ||
|
|
aebcc92712 | ||
|
|
0234865f62 | ||
|
|
1ace39ae0f | ||
|
|
862630533c | ||
|
|
65bd711a3b | ||
|
|
696579255a | ||
|
|
8a17bf8931 | ||
|
|
f163fb1dc0 |
No files matched your search
@@ -8,7 +8,7 @@ body:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report :)
|
||||
- Kindly **DO NOT** ask for instructions.
|
||||
- Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any orther relevant question.
|
||||
- Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any other relevant question.
|
||||
- You may join [Discord community](https://discord.gg/ahpmTvhVmp) to interact with fellow contributors and users
|
||||
- Read project's [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) for detailed documentation.
|
||||
- Read project's [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs) section for Frequently asked questions.
|
||||
@@ -39,8 +39,8 @@ body:
|
||||
label: Hugo Version
|
||||
description: What version of Hugo are you running?
|
||||
options:
|
||||
- Hugo >= 0.112.4 (Recommended - Minimum version required for PaperMod)
|
||||
- Hugo < 0.112.4 (Incompatible - Not recommended to build PaperMod on lower verions)
|
||||
- Hugo >= 0.158.0 (Recommended - Minimum version required for PaperMod)
|
||||
- Hugo < 0.158.0 (Incompatible - Not recommended to build PaperMod on lower versions)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
@@ -104,7 +104,7 @@ body:
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme).
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme).
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
|
||||
@@ -6,8 +6,8 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this enahancement form :)
|
||||
- Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any orther relevant question.
|
||||
Thanks for taking the time to fill out this enhancement form :)
|
||||
- Use [Discussions](https://github.com/adityatelange/hugo-PaperMod/discussions) section if you have a query or doubts or any other relevant question.
|
||||
- You may join [Discord community](https://discord.gg/ahpmTvhVmp) to interact with fellow contributors and users
|
||||
- Read project's [Wiki](https://github.com/adityatelange/hugo-PaperMod/wiki) for detailed documentation.
|
||||
- Read project's [FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs) section for Frequently asked questions.
|
||||
@@ -16,15 +16,15 @@ body:
|
||||
id: what_happened
|
||||
attributes:
|
||||
label: What you'd like to propose?
|
||||
description:
|
||||
placeholder:
|
||||
description:
|
||||
placeholder:
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme).
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adityatelange/hugo-PaperMod?tab=coc-ov-file#readme).
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
|
||||
@@ -17,7 +17,7 @@ https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#custom-head--footer
|
||||
**What does this PR change? What problem does it solve?**
|
||||
|
||||
<!--
|
||||
Describe the changes and their purpose here, as detailed as and if needed.
|
||||
Describe the changes and their purpose here, as detailed as and if needed.
|
||||
|
||||
Please do not add 2 unrelated changes in a single PR as it is difficult to track/revert those in future.
|
||||
-->
|
||||
@@ -26,7 +26,7 @@ Please do not add 2 unrelated changes in a single PR as it is difficult to track
|
||||
**Was the change discussed in an issue or in the Discussions before?**
|
||||
|
||||
<!--
|
||||
Link issues and relevant Discussions posts here.
|
||||
Link issues and relevant Discussions posts here. Please create an issue or start a Discussion before opening a PR if you have not done so already.
|
||||
|
||||
If this PR resolves an issue on GitHub, use "Closes #1234" so that the issue
|
||||
is closed automatically when this PR is merged.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
name: Build Check
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "images/**"
|
||||
- "LICENSE"
|
||||
- "README.md"
|
||||
branches:
|
||||
- master
|
||||
- exampleSite
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "images/**"
|
||||
- "LICENSE"
|
||||
- "README.md"
|
||||
branches:
|
||||
- master
|
||||
- exampleSite
|
||||
workflow_dispatch:
|
||||
# manual run
|
||||
inputs:
|
||||
hugoVersion:
|
||||
description: "Hugo Version"
|
||||
required: false
|
||||
default: "0.158.0"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
# min_version from theme.toml
|
||||
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.158.0' }}
|
||||
steps:
|
||||
- name: Install Hugo CLI
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: exampleSite
|
||||
|
||||
- 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
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
hugoVersion:
|
||||
description: "Hugo Version"
|
||||
required: false
|
||||
default: "0.112.4"
|
||||
default: "latest"
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
@@ -27,30 +27,32 @@ 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:
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.112.4' }}
|
||||
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || 'latest' }}
|
||||
steps:
|
||||
- name: Resolve Hugo version
|
||||
run: |
|
||||
if [ "${HUGO_VERSION}" = "latest" ]; then
|
||||
HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/')
|
||||
echo "HUGO_VERSION=${HUGO_VERSION}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Install Hugo CLI
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: exampleSite
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v3
|
||||
uses: actions/configure-pages@v6
|
||||
- name: Get Theme
|
||||
run: git submodule update --init --recursive
|
||||
- name: Update theme to Latest commit
|
||||
@@ -61,11 +63,14 @@ jobs:
|
||||
--buildDrafts --gc \
|
||||
--baseURL ${{ steps.pages.outputs.base_url }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
path: ./public
|
||||
# Deployment job
|
||||
deploy:
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
@@ -74,4 +79,4 @@ jobs:
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
uses: actions/deploy-pages@v5
|
||||
@@ -1,7 +1,7 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 nanxiaobei and adityatelange
|
||||
Copyright (c) 2021-2024 adityatelange
|
||||
Copyright (c) 2021-2026 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
|
||||
|
||||
@@ -1,106 +1,93 @@
|
||||
<h1 align=center>Hugo PaperMod | <a href="https://adityatelange.github.io/hugo-PaperMod/" rel="nofollow">Demo</a></h1>
|
||||
# Hugo PaperMod
|
||||
|
||||
<h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4>
|
||||
<br>
|
||||
|
||||
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).<br>
|
||||
> The goal of this project is to add more features and customization to the og theme.
|
||||
|
||||
**Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki)
|
||||
|
||||
**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.
|
||||
**A fast, clean, and responsive theme for [Hugo](https://gohugo.io/).**
|
||||
|
||||
[](https://themes.gohugo.io/themes/hugo-papermod/)
|
||||
[](https://github.com/gohugoio/hugo/releases/tag/v0.112.4)
|
||||
[](https://github.com/gohugoio/hugo/releases/tag/v0.158.0)
|
||||
[](https://discord.gg/ahpmTvhVmp)
|
||||
[](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
|
||||

|
||||
[](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod)
|
||||
|
||||
> Based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3), with additional features and customization options.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Live Demo</td>
|
||||
<td><a href="https://adityatelange.github.io/hugo-PaperMod/">adityatelange.github.io/hugo-PaperMod</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Documentation 📚</td>
|
||||
<td><a href="https://github.com/adityatelange/hugo-PaperMod/wiki">Github Wiki</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example Site Source</td>
|
||||
<td><a href="https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite">exampleSite branch</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.star-history.com/adityatelange/hugo-papermod"><img src="https://api.star-history.com/badge?repo=adityatelange/hugo-PaperMod&theme=dark" alt="Star History Rank" /></a></td>
|
||||
<td><a href="https://ko-fi.com/H2H229ZWH"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="ko-fi" /></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<kbd><img src="https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png" alt="Mockup image" title="Mockup"/></kbd>
|
||||
<img src="https://user-images.githubusercontent.com/21258296/114303440-bfc0ae80-9aeb-11eb-8cfa-48a4bb385a6d.png" alt="Mockup image" title="Mockup"/>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Features/Mods 💥
|
||||
## Features 💥
|
||||
|
||||
- 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.
|
||||
- Hugo's Chroma syntax highlighter.
|
||||
- No webpack, nodejs and other dependencies are required to edit the theme.
|
||||
`☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive`
|
||||
|
||||
Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**
|
||||
- **Asset pipeline** -- Hugo's built-in asset generator with fingerprinting, bundling, and minification.
|
||||
- **Three layout modes** -- [Regular](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode), [Home-Info](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode), and [Profile](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode).
|
||||
- **Light and dark themes** -- Automatic switching based on browser preference, plus a manual toggle.
|
||||
- **Multilingual support** -- Includes a built-in language selector.
|
||||
- **Search** -- Client-side search powered by Fuse.js.
|
||||
- **SEO optimized** -- Open Graph, Twitter Cards, and Schema.org structured data out of the box.
|
||||
- **Cover images** -- Per-post cover images with responsive image support.
|
||||
- **Table of contents** -- Auto-generated from heading structure.
|
||||
- **Multiple authors** -- Native support for multi-author sites.
|
||||
- **Social icons and share buttons** -- Configurable social links and per-post sharing.
|
||||
- **Breadcrumb navigation**
|
||||
- **Post archives and taxonomies**
|
||||
- **Code block copy buttons** -- One-click copying with Chroma syntax highlighting.
|
||||
- **Related post suggestions**
|
||||
- **Zero JS build dependencies** -- No webpack, Node.js, or other tooling required.
|
||||
|
||||
| Topic | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||||
| **[Installation guide](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** | Detailed installation and update instructions |
|
||||
| **[Features wiki page](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** | In-depth explanations of all features |
|
||||
| **[FAQ wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** | Common questions and configuration walkthroughs |
|
||||
| **[Icons wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** | Documentation for social icons and share icons |
|
||||
| **[Variables wiki](https://github.com/adityatelange/hugo-PaperMod/wiki/Variables)** | List of all available template variables |
|
||||
| **[Overiding templates](https://github.com/adityatelange/hugo-PaperMod/wiki/Template_Overrides)** | Guide to customizing templates without forking |
|
||||
| **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** | Detailed history of releases |
|
||||
|
||||
---
|
||||
|
||||
## Install/Update 📥
|
||||
## Performance ☄️
|
||||
|
||||
Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)**
|
||||
PaperMod consistently scores near-perfect results on [Pagespeed Insights](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/).
|
||||
|
||||
---
|
||||
|
||||
## FAQs / How To's Guide 🙋
|
||||
|
||||
Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)**
|
||||
|
||||
---
|
||||
|
||||
## Social-Icons/Share-Icons 🖼️
|
||||
|
||||
Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**
|
||||
|
||||
---
|
||||
|
||||
## 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/) 👀
|
||||
<img width="481" height="116" alt="image" src="https://github.com/user-attachments/assets/497d831b-d143-4a46-bc11-b1d7f8ef4a83" />
|
||||
|
||||
---
|
||||
|
||||
## Support 🫶
|
||||
|
||||
- Star 🌟 this repository.
|
||||
- Help spread the word about PaperMod by sharing it on social media and recommending it to your friends. 🗣️
|
||||
- You can also sponsor 🏅 on [Github Sponsors](https://github.com/sponsors/adityatelange) / [Ko-Fi](https://ko-fi.com/adityatelange).
|
||||
- Star this repository to show your support.
|
||||
- Share PaperMod with others who might find it useful.
|
||||
- Sponsor the project on [GitHub Sponsors](https://github.com/sponsors/adityatelange) or [Ko-Fi](https://ko-fi.com/adityatelange).
|
||||
|
||||
---
|
||||
|
||||
## 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 📈
|
||||
|
||||
[](https://starchart.cc/adityatelange/hugo-PaperMod)
|
||||
- [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
|
||||
@@ -23,25 +23,26 @@
|
||||
|
||||
.footer a {
|
||||
color: inherit;
|
||||
border-bottom: 1px solid var(--secondary);
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
border-bottom: 1px solid var(--primary);
|
||||
text-underline-offset: 0.25rem;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.top-link {
|
||||
visibility: hidden;
|
||||
position: fixed;
|
||||
bottom: 60px;
|
||||
right: 30px;
|
||||
bottom: 4rem;
|
||||
right: 2rem;
|
||||
z-index: 99;
|
||||
background: var(--tertiary);
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
padding: 12px;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 10px;
|
||||
border-radius: 64px;
|
||||
transition: visibility 0.5s, opacity 0.8s linear;
|
||||
transition: visibility .3s, opacity .3s cubic-bezier(0.4, 0, 1, 1);
|
||||
}
|
||||
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.top-link,
|
||||
@@ -53,8 +54,3 @@
|
||||
.top-link:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.top-link:focus,
|
||||
#theme-toggle:focus {
|
||||
outline: 0;
|
||||
}
|
||||
@@ -1,93 +1,101 @@
|
||||
.nav {
|
||||
.header-nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
max-width: calc(var(--nav-width) + var(--gap) * 2);
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
margin: auto;
|
||||
line-height: var(--header-height);
|
||||
padding: 0 var(--gap);
|
||||
column-gap: var(--gap);
|
||||
}
|
||||
|
||||
.nav a {
|
||||
.header-nav a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.logo,
|
||||
#menu {
|
||||
.menu {
|
||||
display: flex;
|
||||
margin: auto var(--gap);
|
||||
}
|
||||
|
||||
.logo {
|
||||
flex-wrap: inherit;
|
||||
align-items: center;
|
||||
column-gap: 0.55rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.logo a {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 0.55rem;
|
||||
}
|
||||
|
||||
.logo a img, .logo a svg {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
.logo a img,
|
||||
.logo a svg {
|
||||
pointer-events: none;
|
||||
transform: translate(0, -10%);
|
||||
border-radius: 6px;
|
||||
margin-inline-end: 8px;
|
||||
}
|
||||
|
||||
button#theme-toggle {
|
||||
font-size: 26px;
|
||||
margin: auto 4px;
|
||||
.theme-toggle {
|
||||
padding: 0 0.4rem;
|
||||
}
|
||||
|
||||
body.dark #moon {
|
||||
vertical-align: middle;
|
||||
[data-theme="dark"] .moon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body:not(.dark) #sun {
|
||||
[data-theme="light"] .sun {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#menu {
|
||||
.logo-switches {
|
||||
display: inline-flex;
|
||||
gap: 0.4rem;
|
||||
align-items: inherit;
|
||||
min-height: stretch;
|
||||
flex-wrap: inherit;
|
||||
}
|
||||
|
||||
.logo-switches>* {
|
||||
min-height: inherit;
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.nav-sep {
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.lang-menu * {
|
||||
display: inherit;
|
||||
min-height: inherit;
|
||||
align-items: inherit;
|
||||
}
|
||||
|
||||
.lang-menu a {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
padding: 0 0.4rem;
|
||||
display: inline-flex
|
||||
}
|
||||
|
||||
.menu {
|
||||
list-style: none;
|
||||
word-break: keep-all;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
column-gap: var(--gap);
|
||||
}
|
||||
|
||||
#menu li + li {
|
||||
margin-inline-start: var(--gap);
|
||||
}
|
||||
|
||||
#menu a {
|
||||
.menu a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#menu .active {
|
||||
.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;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.3rem;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
.md-content h3,
|
||||
.md-content h4,
|
||||
.md-content h5,
|
||||
.md-content h6 {
|
||||
margin: 24px 0 16px;
|
||||
}
|
||||
|
||||
.md-content h1 {
|
||||
margin: 40px auto 32px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.md-content h2 {
|
||||
margin: 32px auto 24px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.md-content h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.md-content h4 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.md-content h5 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.md-content h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.md-content a:not(.anchor) {
|
||||
text-underline-offset: 0.3rem;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.md-content del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.md-content dl:not(:last-child),
|
||||
.md-content ol:not(:last-child),
|
||||
.md-content p:not(:last-child),
|
||||
.md-content figure:not(:last-child),
|
||||
.md-content ul:not(:last-child) {
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
.md-content ol,
|
||||
.md-content ul {
|
||||
padding-inline-start: 1.25rem;
|
||||
}
|
||||
|
||||
.md-content li {
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
.md-content li p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.md-content dl {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.md-content dt {
|
||||
width: 25%;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.md-content dd {
|
||||
width: 75%;
|
||||
margin-inline-start: 0;
|
||||
padding-inline-start: 10px;
|
||||
}
|
||||
|
||||
.md-content dd~dd,
|
||||
.md-content dt~dt {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.md-content table {
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
.md-content table th,
|
||||
.md-content table:not(.highlight table, .gist .highlight) td {
|
||||
min-width: 80px;
|
||||
padding: 6px 13px;
|
||||
line-height: 1.5;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.md-content table th {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.md-content table td code:only-child {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.md-content .highlight table {
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.md-content .highlight:not(table) {
|
||||
margin-bottom: var(--content-gap);
|
||||
background: var(--code-block-bg) !important;
|
||||
border-radius: var(--radius);
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.md-content .highlight pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-content code {
|
||||
padding: 0.2rem 0.3rem;
|
||||
font-size: 0.78em;
|
||||
line-height: 1.5;
|
||||
background: var(--code-bg);
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
|
||||
.md-content pre code {
|
||||
display: grid;
|
||||
margin: auto 0;
|
||||
padding: 10px;
|
||||
color: rgb(213, 213, 214);
|
||||
background: var(--code-block-bg) !important;
|
||||
border-radius: var(--radius);
|
||||
overflow-x: auto;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.md-content blockquote {
|
||||
margin: 1rem 0;
|
||||
padding-inline-start: 1rem;
|
||||
border-inline-start: 0.3rem solid var(--content);
|
||||
}
|
||||
|
||||
.md-content hr {
|
||||
margin: 30px 0;
|
||||
height: 2px;
|
||||
background: var(--tertiary);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.md-content iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.md-content img {
|
||||
border-radius: var(--radius);
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.md-content img[src*="#center"] {
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
||||
.md-content figure.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.md-content figure>figcaption {
|
||||
color: var(--primary);
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 8px 0 16px;
|
||||
}
|
||||
|
||||
.md-content figure>figcaption>p {
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.md-content h1:hover .anchor,
|
||||
.md-content h2:hover .anchor,
|
||||
.md-content h3:hover .anchor,
|
||||
.md-content h4:hover .anchor,
|
||||
.md-content h5:hover .anchor,
|
||||
.md-content h6:hover .anchor {
|
||||
display: inline-flex;
|
||||
color: var(--secondary);
|
||||
margin-inline-start: 0.5em;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.anchor:hover {
|
||||
color: var(--content) !important;
|
||||
}
|
||||
|
||||
.md-content img.in-text {
|
||||
display: inline;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
mark {
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
audio {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
overflow: hidden;
|
||||
height: 2.5rem;
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
audio::-webkit-media-controls-enclosure {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
video {
|
||||
border: 1px solid var(--code-bg);
|
||||
border-radius: var(--radius);
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -19,6 +19,10 @@
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.first-entry .entry-header h2 {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.first-entry .entry-content {
|
||||
margin: 14px 0;
|
||||
font-size: 16px;
|
||||
@@ -30,21 +34,30 @@
|
||||
}
|
||||
|
||||
.home-info .entry-content {
|
||||
--content-gap: 0.5rem;
|
||||
-webkit-line-clamp: unset;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.home-info .social-icons a:first-of-type {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
|
||||
|
||||
.post-entry {
|
||||
position: relative;
|
||||
margin-bottom: var(--gap);
|
||||
padding: var(--gap);
|
||||
background: var(--entry);
|
||||
border-radius: var(--radius);
|
||||
transition: transform 0.1s;
|
||||
transition: transform 0.25s ease;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.post-entry:active {
|
||||
transform: scale(0.96);
|
||||
.post-entry:hover,
|
||||
.post-entry:focus-within {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--tertiary);
|
||||
}
|
||||
|
||||
.tag-entry .entry-cover {
|
||||
@@ -67,6 +80,11 @@
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.home-info .entry-content p {
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
}
|
||||
|
||||
.entry-footer {
|
||||
color: var(--secondary);
|
||||
font-size: 13px;
|
||||
@@ -78,6 +96,7 @@
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.entry-hint {
|
||||
@@ -93,16 +112,18 @@
|
||||
font-size: 14px;
|
||||
margin-bottom: var(--gap);
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
.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);
|
||||
text-underline-offset: 0.3rem;
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -4,297 +4,122 @@
|
||||
}
|
||||
|
||||
.post-title {
|
||||
margin-bottom: 2px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.post-description {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
margin-top: 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 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.breadcrumbs a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.post-content {
|
||||
color: var(--content);
|
||||
.breadcrumbs svg {
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
.post-content h3,
|
||||
.post-content h4,
|
||||
.post-content h5,
|
||||
.post-content h6 {
|
||||
margin: 24px 0 16px;
|
||||
.i18n_list {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.post-content h1 {
|
||||
margin: 40px auto 32px;
|
||||
font-size: 40px;
|
||||
.post-meta .i18n_list li {
|
||||
list-style: none;
|
||||
margin: auto 3px;
|
||||
}
|
||||
|
||||
.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,
|
||||
.post-meta a,
|
||||
.toc a:hover {
|
||||
box-shadow: 0 1px 0;
|
||||
box-decoration-break: clone;
|
||||
-webkit-box-decoration-break: clone;
|
||||
text-underline-offset: 0.3rem;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.post-content a code {
|
||||
margin: auto 0;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 -1px 0 var(--primary) inset;
|
||||
}
|
||||
|
||||
.post-content del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.post-content dl,
|
||||
.post-content ol,
|
||||
.post-content p,
|
||||
.post-content figure,
|
||||
.post-content ul {
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
.post-content ol,
|
||||
.post-content ul {
|
||||
padding-inline-start: 20px;
|
||||
}
|
||||
|
||||
.post-content li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.post-content li p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.post-content dl {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-content dt {
|
||||
width: 25%;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.post-content dd {
|
||||
width: 75%;
|
||||
margin-inline-start: 0;
|
||||
padding-inline-start: 10px;
|
||||
}
|
||||
|
||||
.post-content dd ~ dd,
|
||||
.post-content dt ~ dt {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.post-content table {
|
||||
margin-bottom: var(--content-gap);
|
||||
}
|
||||
|
||||
.post-content table th,
|
||||
.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
|
||||
min-width: 80px;
|
||||
padding: 8px 5px;
|
||||
line-height: 1.5;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.post-content table th {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.post-content table:not(.highlighttable) td code:only-child {
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.post-content .highlight table {
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.post-content .highlight:not(table) {
|
||||
margin: 10px auto;
|
||||
background: var(--code-block-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: grid;
|
||||
margin: auto 0;
|
||||
padding: 10px;
|
||||
color: rgb(213, 213, 214);
|
||||
background: var(--code-block-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 {
|
||||
.post-meta a {
|
||||
color: var(--secondary);
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin: 0 2px 40px 2px;
|
||||
border: 1px solid var(--border);
|
||||
details.toc {
|
||||
margin-bottom: var(--content-gap);
|
||||
background: var(--code-bg);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.4em;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.dark .toc {
|
||||
[data-theme="dark"] details.toc {
|
||||
background: var(--entry);
|
||||
}
|
||||
|
||||
.toc details summary {
|
||||
cursor: zoom-in;
|
||||
margin-inline-start: 10px;
|
||||
details.toc summary {
|
||||
padding: 0.3rem 1.2rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
details summary {
|
||||
cursor: pointer;
|
||||
display: list-item;
|
||||
width: 100%;
|
||||
margin-inline-start: 0;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.toc details[open] summary {
|
||||
cursor: zoom-out;
|
||||
}
|
||||
|
||||
.toc .details {
|
||||
details .title {
|
||||
display: inline;
|
||||
font-weight: 500;
|
||||
margin-inline-start: 0.2rem;
|
||||
}
|
||||
|
||||
.toc .inner {
|
||||
margin: 5px 20px 0;
|
||||
padding: 0 10px;
|
||||
opacity: 0.9;
|
||||
details {
|
||||
interpolate-size: allow-keywords;
|
||||
}
|
||||
|
||||
.toc li ul {
|
||||
details::details-content {
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
overflow: clip;
|
||||
transition: height 150ms ease,
|
||||
opacity 150ms ease,
|
||||
content-visibility 150ms allow-discrete;
|
||||
}
|
||||
|
||||
details[open]::details-content {
|
||||
height: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
details .inner {
|
||||
margin: 0 2.4rem;
|
||||
padding-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
details li ul {
|
||||
margin-inline-start: var(--gap);
|
||||
}
|
||||
|
||||
.toc summary:focus {
|
||||
outline: 0;
|
||||
.post-content {
|
||||
color: var(--content);
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
margin-top: 56px;
|
||||
margin-top: var(--content-gap);
|
||||
}
|
||||
|
||||
.post-footer>* {
|
||||
@@ -350,44 +175,30 @@
|
||||
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 {
|
||||
display: flex;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.paginav a {
|
||||
padding-inline-start: 14px;
|
||||
padding-inline-end: 14px;
|
||||
border-radius: var(--radius);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.paginav .title {
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
font-size: small;
|
||||
font-size: 0.8rem;
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
.paginav .prev,
|
||||
.paginav .next {
|
||||
.paginav a {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
padding: 0.8rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.paginav span:hover:not(.title) {
|
||||
box-shadow: 0 1px 0;
|
||||
text-underline-offset: 0.2rem;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.paginav .next {
|
||||
@@ -402,8 +213,3 @@ h6:hover .anchor {
|
||||
h1>a>svg {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
img.in-text {
|
||||
display: inline;
|
||||
margin: auto;
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.profile img {
|
||||
@@ -24,20 +24,11 @@
|
||||
.buttons {
|
||||
flex-wrap: wrap;
|
||||
max-width: 400px;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.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);
|
||||
padding: 0.4rem 0.8rem;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#searchbox input {
|
||||
.searchbox input {
|
||||
padding: 4px 10px;
|
||||
width: 100%;
|
||||
color: var(--primary);
|
||||
@@ -7,39 +7,35 @@
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
#searchbox input:focus {
|
||||
border-color: var(--secondary);
|
||||
}
|
||||
|
||||
#searchResults li {
|
||||
.searchResults li {
|
||||
list-style: none;
|
||||
border-radius: var(--radius);
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: var(--entry);
|
||||
transition: transform .25s ease;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
#searchResults {
|
||||
margin: 10px 0;
|
||||
.searchResults {
|
||||
margin: var(--content-gap) 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#searchResults li:active {
|
||||
transition: transform 0.1s;
|
||||
transform: scale(0.98);
|
||||
.searchResults li:hover,
|
||||
.searchResults li:focus-within {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--tertiary);
|
||||
}
|
||||
|
||||
#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);
|
||||
.searchResults li .entry-link:focus {
|
||||
outline: 2px solid var(--secondary);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
@@ -1,18 +1,19 @@
|
||||
.terms-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1em;
|
||||
margin-top: var(--content-gap);
|
||||
}
|
||||
|
||||
.terms-tags li {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.terms-tags a {
|
||||
display: block;
|
||||
padding: 3px 10px;
|
||||
padding: 4px 10px;
|
||||
background: var(--tertiary);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius);
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.terms-tags a:active {
|
||||
background: var(--tertiary);
|
||||
transform: scale(0.96);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
PaperMod v7
|
||||
PaperMod v8+
|
||||
License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
|
||||
Copyright (c) 2020 nanxiaobei and adityatelange
|
||||
Copyright (c) 2021-2024 adityatelange
|
||||
Copyright (c) 2021-2026 adityatelange
|
||||
*/
|
||||
@@ -15,9 +15,10 @@
|
||||
--code-block-bg: rgb(28, 29, 33);
|
||||
--code-bg: rgb(245, 245, 245);
|
||||
--border: rgb(238, 238, 238);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
.dark {
|
||||
:root[data-theme="dark"] {
|
||||
--theme: rgb(29, 30, 32);
|
||||
--entry: rgb(46, 46, 51);
|
||||
--primary: rgb(218, 218, 219);
|
||||
@@ -27,12 +28,13 @@
|
||||
--code-block-bg: rgb(46, 46, 51);
|
||||
--code-bg: rgb(55, 56, 62);
|
||||
--border: rgb(51, 51, 51);
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
.list {
|
||||
background: var(--code-bg);
|
||||
}
|
||||
|
||||
.dark.list {
|
||||
[data-theme="dark"] .list {
|
||||
background: var(--theme);
|
||||
}
|
||||
@@ -48,8 +48,8 @@
|
||||
.button:active,
|
||||
.post-entry:active,
|
||||
.top-link,
|
||||
#searchResults .focus,
|
||||
#searchResults li:active {
|
||||
.searchResults .focus,
|
||||
.searchResults li:active {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/* from reset */
|
||||
::-webkit-scrollbar-track {
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-track {
|
||||
background: var(--code-bg);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--tertiary);
|
||||
border: 5px solid var(--theme);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||||
border: 5px solid var(--code-bg);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--secondary);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar:not(.highlighttable, .highlight table, .gist .highlight) {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
/* from post-single */
|
||||
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-content :not(table) ::-webkit-scrollbar-thumb {
|
||||
border: 2px solid var(--code-block-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;
|
||||
}
|
||||
}
|
||||
+181
-139
@@ -1,152 +1,194 @@
|
||||
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;
|
||||
const resList = document.getElementById('searchResults');
|
||||
const sInput = document.getElementById('searchInput');
|
||||
const searchBox = document.getElementById('searchbox');
|
||||
|
||||
// load our search index
|
||||
window.onload = function () {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
let data = JSON.parse(xhr.responseText);
|
||||
if (data) {
|
||||
// fuse.js options; check fuse.js website for details
|
||||
let options = {
|
||||
distance: 100,
|
||||
threshold: 0.4,
|
||||
ignoreLocation: true,
|
||||
keys: [
|
||||
'title',
|
||||
'permalink',
|
||||
'summary',
|
||||
'content'
|
||||
]
|
||||
};
|
||||
if (params.fuseOpts) {
|
||||
options = {
|
||||
isCaseSensitive: params.fuseOpts.iscasesensitive ?? false,
|
||||
includeScore: params.fuseOpts.includescore ?? false,
|
||||
includeMatches: params.fuseOpts.includematches ?? false,
|
||||
minMatchCharLength: params.fuseOpts.minmatchcharlength ?? 1,
|
||||
shouldSort: params.fuseOpts.shouldsort ?? true,
|
||||
findAllMatches: params.fuseOpts.findallmatches ?? false,
|
||||
keys: params.fuseOpts.keys ?? ['title', 'permalink', 'summary', 'content'],
|
||||
location: params.fuseOpts.location ?? 0,
|
||||
threshold: params.fuseOpts.threshold ?? 0.4,
|
||||
distance: params.fuseOpts.distance ?? 100,
|
||||
ignoreLocation: params.fuseOpts.ignorelocation ?? true
|
||||
}
|
||||
}
|
||||
fuse = new Fuse(data, options); // build the index from the json file
|
||||
}
|
||||
} else {
|
||||
console.log(xhr.responseText);
|
||||
}
|
||||
}
|
||||
let fuse;
|
||||
let currentElement = null;
|
||||
let firstResult = null;
|
||||
let lastResult = null;
|
||||
|
||||
const defaultFuseOptions = {
|
||||
distance: 100,
|
||||
threshold: 0.4,
|
||||
ignoreLocation: true,
|
||||
keys: ['title', 'permalink', 'summary', 'content']
|
||||
};
|
||||
|
||||
const buildFuseOptions = () => {
|
||||
if (!params.fuseOpts) {
|
||||
return defaultFuseOptions;
|
||||
}
|
||||
|
||||
return {
|
||||
isCaseSensitive: params.fuseOpts.iscasesensitive ?? false,
|
||||
includeScore: params.fuseOpts.includescore ?? false,
|
||||
includeMatches: params.fuseOpts.includematches ?? false,
|
||||
minMatchCharLength: params.fuseOpts.minmatchcharlength ?? 1,
|
||||
shouldSort: params.fuseOpts.shouldsort ?? true,
|
||||
findAllMatches: params.fuseOpts.findallmatches ?? false,
|
||||
keys: params.fuseOpts.keys ?? defaultFuseOptions.keys,
|
||||
location: params.fuseOpts.location ?? 0,
|
||||
threshold: params.fuseOpts.threshold ?? defaultFuseOptions.threshold,
|
||||
distance: params.fuseOpts.distance ?? defaultFuseOptions.distance,
|
||||
ignoreLocation: params.fuseOpts.ignorelocation ?? defaultFuseOptions.ignoreLocation
|
||||
};
|
||||
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")
|
||||
const debounce = (fn, delay) => {
|
||||
let timeout;
|
||||
return (...args) => {
|
||||
clearTimeout(timeout);
|
||||
timeout = window.setTimeout(() => fn(...args), delay);
|
||||
};
|
||||
};
|
||||
|
||||
const reset = () => {
|
||||
currentElement = null;
|
||||
firstResult = null;
|
||||
lastResult = null;
|
||||
resList.innerHTML = '';
|
||||
sInput.value = '';
|
||||
sInput.focus();
|
||||
};
|
||||
|
||||
const setActiveResult = (element) => {
|
||||
document.querySelectorAll('.focus').forEach((item) => item.classList.remove('focus'));
|
||||
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function reset() {
|
||||
resultsAvailable = false;
|
||||
resList.innerHTML = sInput.value = ''; // clear inputbox and searchResults
|
||||
sInput.focus(); // shift focus to input box
|
||||
}
|
||||
element.focus();
|
||||
element.parentElement?.classList.add('focus');
|
||||
currentElement = element;
|
||||
};
|
||||
|
||||
// execute search as each character is typed
|
||||
sInput.onkeyup = function (e) {
|
||||
// run a search query (for "term") every time a letter is typed
|
||||
// in the search box
|
||||
if (fuse) {
|
||||
let results;
|
||||
if (params.fuseOpts) {
|
||||
results = fuse.search(this.value.trim(), {limit: params.fuseOpts.limit}); // the actual query being run using fuse.js along with options
|
||||
} else {
|
||||
results = fuse.search(this.value.trim()); // the actual query being run using fuse.js
|
||||
const renderResults = (results) => {
|
||||
if (!Array.isArray(results) || results.length === 0) {
|
||||
resList.innerHTML = '';
|
||||
firstResult = lastResult = currentElement = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const fragment = document.createDocumentFragment();
|
||||
|
||||
for (const result of results) {
|
||||
const li = document.createElement('li');
|
||||
const titleText = document.createTextNode(result.item.title);
|
||||
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
svg.setAttribute('width', '24');
|
||||
svg.setAttribute('height', '24');
|
||||
svg.setAttribute('viewBox', '0 0 24 24');
|
||||
svg.setAttribute('fill', 'none');
|
||||
svg.setAttribute('stroke', 'currentColor');
|
||||
svg.setAttribute('stroke-width', '2');
|
||||
svg.setAttribute('stroke-linecap', 'round');
|
||||
svg.setAttribute('stroke-linejoin', 'round');
|
||||
svg.classList.add('feather', 'feather-chevrons-right');
|
||||
|
||||
svg.innerHTML = '<polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline>';
|
||||
|
||||
const link = document.createElement('a');
|
||||
link.className = 'entry-link';
|
||||
link.href = result.item.permalink;
|
||||
link.setAttribute('aria-label', result.item.title);
|
||||
|
||||
li.appendChild(titleText);
|
||||
li.appendChild(svg);
|
||||
li.appendChild(link);
|
||||
fragment.appendChild(li);
|
||||
}
|
||||
|
||||
resList.innerHTML = '';
|
||||
resList.appendChild(fragment);
|
||||
firstResult = resList.firstElementChild;
|
||||
lastResult = resList.lastElementChild;
|
||||
};
|
||||
|
||||
const performSearch = () => {
|
||||
if (!fuse) {
|
||||
return;
|
||||
}
|
||||
|
||||
const query = sInput.value.trim();
|
||||
if (!query) {
|
||||
renderResults([]);
|
||||
return;
|
||||
}
|
||||
|
||||
const searchOptions = params.fuseOpts?.limit ? { limit: params.fuseOpts.limit } : undefined;
|
||||
const results = searchOptions ? fuse.search(query, searchOptions) : fuse.search(query);
|
||||
renderResults(results);
|
||||
};
|
||||
|
||||
const initSearch = async () => {
|
||||
if (!sInput || !resList) {
|
||||
return;
|
||||
}
|
||||
|
||||
sInput.disabled = false;
|
||||
sInput.focus();
|
||||
|
||||
try {
|
||||
const response = await fetch('../index.json');
|
||||
if (!response.ok) {
|
||||
throw new Error(`Search index load failed: ${response.status}`);
|
||||
}
|
||||
if (results.length !== 0) {
|
||||
// build our html if result exists
|
||||
let resultSet = ''; // our results bucket
|
||||
|
||||
for (let item in results) {
|
||||
resultSet += `<li class="post-entry"><header class="entry-header">${results[item].item.title} »</header>` +
|
||||
`<a href="${results[item].item.permalink}" aria-label="${results[item].item.title}"></a></li>`
|
||||
}
|
||||
const data = await response.json();
|
||||
if (data) {
|
||||
fuse = new Fuse(data, buildFuseOptions());
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
resList.innerHTML = resultSet;
|
||||
resultsAvailable = true;
|
||||
first = resList.firstChild;
|
||||
last = resList.lastChild;
|
||||
} else {
|
||||
resultsAvailable = false;
|
||||
resList.innerHTML = '';
|
||||
window.addEventListener('load', initSearch);
|
||||
|
||||
sInput?.addEventListener('input', debounce(performSearch, 150));
|
||||
|
||||
sInput?.addEventListener('search', () => {
|
||||
if (!sInput.value) {
|
||||
reset();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', (event) => {
|
||||
const { key } = event;
|
||||
const active = document.activeElement;
|
||||
const isInSearchBox = searchBox?.contains(active);
|
||||
|
||||
if (key === 'Escape') {
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!firstResult || !isInSearchBox) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (key === 'ArrowDown') {
|
||||
event.preventDefault();
|
||||
|
||||
if (active === sInput) {
|
||||
setActiveResult(firstResult.querySelector('.entry-link'));
|
||||
} else if (active?.parentElement !== lastResult) {
|
||||
setActiveResult(active?.parentElement?.nextElementSibling?.querySelector('.entry-link'));
|
||||
}
|
||||
} else if (key === 'ArrowUp') {
|
||||
event.preventDefault();
|
||||
|
||||
if (active?.parentElement === firstResult) {
|
||||
setActiveResult(sInput);
|
||||
} else if (active !== sInput) {
|
||||
setActiveResult(active?.parentElement?.previousElementSibling?.querySelector('.entry-link'));
|
||||
}
|
||||
} else if (key === 'ArrowRight') {
|
||||
if (active?.matches?.('.entry-link')) {
|
||||
active.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 <a> of first <li>
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
PaperMod v7
|
||||
PaperMod v8+
|
||||
License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
|
||||
Copyright (c) 2020 nanxiaobei and adityatelange
|
||||
Copyright (c) 2021-2024 adityatelange
|
||||
Copyright (c) 2021-2026 adityatelange
|
||||
*/
|
||||
@@ -1,3 +1,3 @@
|
||||
module github.com/adityatelange/hugo-PaperMod
|
||||
|
||||
go 1.12
|
||||
go 1.16
|
||||
+16
-2
@@ -6,8 +6,13 @@
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "1 min"
|
||||
other: "{{ .Count }} min"
|
||||
one : "1 minut"
|
||||
other: "{{ .Count }} minuts"
|
||||
|
||||
- id: words
|
||||
translation:
|
||||
one : "paraula"
|
||||
other: "{{ .Count }} paraules"
|
||||
|
||||
- id: toc
|
||||
translation: "Taula de Continguts"
|
||||
@@ -17,3 +22,12 @@
|
||||
|
||||
- id: home
|
||||
translation: "Inici"
|
||||
|
||||
- id: edit_post
|
||||
translation: "Editar"
|
||||
|
||||
- id: code_copy
|
||||
translation: "copiar"
|
||||
|
||||
- id: code_copied
|
||||
translation: "copiat!"
|
||||
@@ -0,0 +1,33 @@
|
||||
- id: prev_page
|
||||
translation: "Edellinen"
|
||||
|
||||
- id: next_page
|
||||
translation: "Seuraava"
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "1 min"
|
||||
other: "{{ .Count }} minuuttia"
|
||||
|
||||
- id: words
|
||||
translation:
|
||||
one : "sana"
|
||||
other: "{{ .Count }} sanaa"
|
||||
|
||||
- id: toc
|
||||
translation: "Sisällysluettelo"
|
||||
|
||||
- id: translations
|
||||
translation: "Käännökset"
|
||||
|
||||
- id: home
|
||||
translation: "Etusivu"
|
||||
|
||||
- id: edit_post
|
||||
translation: "Muokkaa"
|
||||
|
||||
- id: code_copy
|
||||
translation: "Kopioi"
|
||||
|
||||
- id: code_copied
|
||||
translation: "Kopioitu!"
|
||||
+7
-7
@@ -1,21 +1,21 @@
|
||||
- id: prev_page
|
||||
translation: "קודם"
|
||||
translation: "הקודם"
|
||||
|
||||
- id: next_page
|
||||
translation: "הבא"
|
||||
|
||||
- id: read_time
|
||||
translation:
|
||||
one : "דקה אחת"
|
||||
other: "דקות {{ .Count }}"
|
||||
one: "דקה אחת"
|
||||
other: "{{ .Count }} דקות"
|
||||
|
||||
- id: words
|
||||
translation:
|
||||
one : "word"
|
||||
other: "מילים {{ .Count }} "
|
||||
one: "מילה אחת"
|
||||
other: "{{ .Count }} מילים"
|
||||
|
||||
- id: toc
|
||||
translation: "תוכן העניינים"
|
||||
translation: "תוכן עניינים"
|
||||
|
||||
- id: translations
|
||||
translation: "תרגומים"
|
||||
@@ -30,4 +30,4 @@
|
||||
translation: "העתק"
|
||||
|
||||
- id: code_copied
|
||||
translation: "!הועתק"
|
||||
translation: "הועתק!"
|
||||
@@ -1 +0,0 @@
|
||||
<img loading="lazy" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}" {{ end }} />
|
||||
@@ -1,27 +0,0 @@
|
||||
{{- if lt hugo.Version "0.112.4" }}
|
||||
{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }}
|
||||
{{- end -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<body class="
|
||||
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}}
|
||||
{{- print "list" -}}
|
||||
{{- end -}}
|
||||
{{- if eq site.Params.defaultTheme `dark` -}}
|
||||
{{- print " dark" }}
|
||||
{{- end -}}
|
||||
" id="top">
|
||||
{{- partialCached "header.html" . .Page -}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range site.RegularPages -}}
|
||||
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
||||
@@ -1,27 +0,0 @@
|
||||
{{- define "main" }}
|
||||
|
||||
{{- if .Title }}
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- if .Description }}
|
||||
<div class="post-description">
|
||||
{{ .Description }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
{{- end }}
|
||||
|
||||
<ul class="terms-tags">
|
||||
{{- $type := .Type }}
|
||||
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{- $name := .Name }}
|
||||
{{- $count := .Count }}
|
||||
{{- with site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
{{- end }}{{/* end main */ -}}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- $u := urls.Parse .Destination -}}
|
||||
{{- $src := $u.String -}}
|
||||
{{- if not $u.IsAbs -}}
|
||||
{{- $path := strings.TrimPrefix "./" $u.Path }}
|
||||
{{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
|
||||
{{- $src = .RelPermalink -}}
|
||||
{{- with $u.RawQuery -}}
|
||||
{{- $src = printf "%s?%s" $src . -}}
|
||||
{{- end -}}
|
||||
{{- with $u.Fragment -}}
|
||||
{{- $src = printf "%s#%s" $src . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape) "loading" "lazy") -}}
|
||||
<img
|
||||
{{- range $k, $v := $attributes -}}
|
||||
{{- if $v -}}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr -}}
|
||||
{{- end -}}
|
||||
{{- end -}}>
|
||||
{{- /**/ -}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- /* formats .Content headings by adding an anchor */ -}}
|
||||
{{ . | replaceRE
|
||||
"(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)"
|
||||
"${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}"
|
||||
| safeHTML
|
||||
}}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{- 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 -}}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||
<nav class="breadcrumbs" role="navigation" aria-label="Breadcrumb">
|
||||
{{- $ancestors := .Ancestors.Reverse -}}
|
||||
{{- range $i, $bc := $ancestors }}
|
||||
{{- if eq $i 0 }}
|
||||
<a href="{{ $bc.RelPermalink }}">{{ i18n "home" | default "Home" }}</a>
|
||||
{{- else }}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
<a href="{{ $bc.RelPermalink }}">{{ $bc.Title }}</a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</nav>
|
||||
{{- end -}}
|
||||
File renamed without changes.
@@ -0,0 +1,63 @@
|
||||
{{- with .cxt}} {{/* Apply proper context from dict */}}
|
||||
{{- if (and .Params.cover.image (not $.isHidden)) }}
|
||||
<figure class="entry-cover">
|
||||
{{- $loading := cond $.IsSingle "eager" "lazy" }}
|
||||
{{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }}
|
||||
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
|
||||
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
|
||||
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
|
||||
|
||||
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- if not $cover }}
|
||||
{{- $cover = (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- end }}
|
||||
{{- /* We are not using the .Param.cover.relative to decide the location of image */}}
|
||||
{{- /* If we have the image in pageBundle or globalResources we can process the image */}}
|
||||
|
||||
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}}
|
||||
|
||||
{{- $imgdl := (.Params.cover.image) | absURL }}
|
||||
{{- if $cover -}}
|
||||
{{- $imgdl = $cover.Permalink }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $addLink }}
|
||||
<a href="{{ $imgdl }}" target="_blank" rel="noopener noreferrer">
|
||||
{{- end }}
|
||||
|
||||
{{- if $cover -}}
|
||||
{{/* i.e it is present in page bundle */}}
|
||||
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
|
||||
<img loading="{{$loading}}"
|
||||
srcset='{{- range $size := $sizes -}}
|
||||
{{- if (ge $cover.Width $size) }}
|
||||
{{- printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw," $size) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- printf "%s %dw" ($cover.Permalink) ($cover.Width) }}'
|
||||
src="{{ $cover.Permalink }}"
|
||||
sizes="(min-width: 768px) 720px, 100vw"
|
||||
width="{{ $cover.Width }}" height="{{ $cover.Height }}"
|
||||
alt="{{ $alt }}">
|
||||
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
|
||||
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- /* For absolute urls and external links, no img processing here */}}
|
||||
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
|
||||
{{- if $addLink }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Display Caption */}}
|
||||
{{- if $.IsSingle }}
|
||||
{{ with .Params.cover.caption -}}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{- end }}{{/* End image */}}
|
||||
{{- end -}}{{/* End context */ -}}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and (.Param "editPost.URL") (not (.Param "editPost.disabled")) -}}
|
||||
{{- if or (.Param "author") (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}
|
||||
{{- printf " | " | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $editURL := .Param "editPost.URL" }}
|
||||
{{- $appendFilePath := .Param "editPost.appendFilePath" | default false }}
|
||||
{{- $editText := .Param "editPost.Text" | default (i18n "edit_post" ) -}}
|
||||
|
||||
{{- if $appendFilePath -}}
|
||||
{{- $fileUrlPath := path.Join .File.Path }}
|
||||
{{- $editURL = printf "%s/%s" $editURL $fileUrlPath -}}
|
||||
{{- end -}}
|
||||
|
||||
<span>
|
||||
<a href="{{ $editURL }}" rel="noopener noreferrer edit" target="_blank">
|
||||
{{- $editText -}}
|
||||
</a>
|
||||
</span>
|
||||
{{- end }}
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,4 @@
|
||||
{{- /* Post content custom area start */ -}}
|
||||
{{- /* Insert any custom code after post content - it will appear after the post body, before the footer. */ -}}
|
||||
{{- /* Can be overwritten by partial with the same name in the global layouts. */ -}}
|
||||
{{- /* Post content custom area end */ -}}
|
||||
@@ -14,18 +14,27 @@
|
||||
{{- print " · "}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
- The "Powered by Hugo" text is intentionally left at the end of the footer to give it more prominence.
|
||||
- We kindly encourage you to keep this line. Keeping this credit helps open source projects like PaperMod and Hugo reach more people, supports the open source ecosystem, and shows appreciation for the work that goes into these tools.
|
||||
- If you choose to remove it, please consider adding a link to the PaperMod GitHub repository somewhere on your site to give credit to the project and its contributors.
|
||||
- Support us by sponsoring the project on GitHub Sponsors: https://github.com/sponsors/adityatelange
|
||||
*/}}
|
||||
|
||||
<span>
|
||||
Powered by
|
||||
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
|
||||
<a href="https://gohugo.io/?utm_source=papermod" rel="noopener" target="_blank">Hugo</a> &
|
||||
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
|
||||
</span>
|
||||
</footer>
|
||||
{{- end }}
|
||||
|
||||
{{- if (not site.Params.disableScrollToTop) }}
|
||||
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
|
||||
<path d="M12 6H0l6-6z" />
|
||||
<a href="#top" id="top-link" class="top-link hidden" aria-label="go to top" title="Go to Top (Alt + G)" accesskey="g">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-up">
|
||||
<polyline points="17 11 12 6 7 11"></polyline>
|
||||
<polyline points="17 18 12 13 7 18"></polyline>
|
||||
</svg>
|
||||
</a>
|
||||
{{- end }}
|
||||
@@ -33,25 +42,42 @@
|
||||
{{- partial "extend_footer.html" . }}
|
||||
|
||||
<script>
|
||||
let menu = document.getElementById('menu')
|
||||
let menu = document.getElementById('menu');
|
||||
if (menu) {
|
||||
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
|
||||
menu.onscroll = function () {
|
||||
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
|
||||
// Set the scroll position
|
||||
const scrollPosition = localStorage.getItem("menu-scroll-position");
|
||||
if (scrollPosition) {
|
||||
menu.scrollLeft = parseInt(scrollPosition, 10);
|
||||
}
|
||||
|
||||
// Save once scrolling settles, not on every event
|
||||
let menuScrollTimeout;
|
||||
menu.addEventListener("scroll", function () {
|
||||
clearTimeout(menuScrollTimeout);
|
||||
menuScrollTimeout = setTimeout(function () {
|
||||
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
|
||||
}, 150);
|
||||
}, { passive: true });
|
||||
}
|
||||
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
var id = this.getAttribute("href").substr(1);
|
||||
const target = document.querySelector(`[id='${decodeURIComponent(id)}']`);
|
||||
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
|
||||
target.scrollIntoView({
|
||||
behavior: "smooth"
|
||||
});
|
||||
} else {
|
||||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
|
||||
target.scrollIntoView();
|
||||
}
|
||||
// Move keyboard focus to the target like native anchor navigation,
|
||||
// so the next Tab continues from there instead of from this link
|
||||
if (target.tabIndex < 0 && !target.hasAttribute("tabindex")) {
|
||||
target.setAttribute("tabindex", "-1");
|
||||
}
|
||||
target.focus({ preventScroll: true });
|
||||
if (id === "top") {
|
||||
history.replaceState(null, null, " ");
|
||||
} else {
|
||||
@@ -64,16 +90,21 @@
|
||||
|
||||
{{- if (not site.Params.disableScrollToTop) }}
|
||||
<script>
|
||||
var mybutton = document.getElementById("top-link");
|
||||
window.onscroll = function () {
|
||||
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
|
||||
mybutton.style.visibility = "visible";
|
||||
mybutton.style.opacity = "1";
|
||||
} else {
|
||||
mybutton.style.visibility = "hidden";
|
||||
mybutton.style.opacity = "0";
|
||||
var toplink = document.getElementById("top-link");
|
||||
var scrollTicking = false;
|
||||
// At most one check per frame
|
||||
window.addEventListener("scroll", function () {
|
||||
if (scrollTicking) {
|
||||
return;
|
||||
}
|
||||
};
|
||||
scrollTicking = true;
|
||||
requestAnimationFrame(function () {
|
||||
const scrollThreshold = window.innerHeight;
|
||||
const shown = document.body.scrollTop > scrollThreshold || document.documentElement.scrollTop > scrollThreshold;
|
||||
toplink.classList.toggle("hidden", !shown);
|
||||
scrollTicking = false;
|
||||
});
|
||||
}, { passive: true });
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
@@ -81,11 +112,12 @@
|
||||
{{- if (not site.Params.disableThemeToggle) }}
|
||||
<script>
|
||||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||||
if (document.body.className.includes("dark")) {
|
||||
document.body.classList.remove('dark');
|
||||
const html = document.querySelector("html");
|
||||
if (html.dataset.theme === "dark") {
|
||||
html.dataset.theme = 'light';
|
||||
localStorage.setItem("pref-theme", 'light');
|
||||
} else {
|
||||
document.body.classList.add('dark');
|
||||
html.dataset.theme = 'dark';
|
||||
localStorage.setItem("pref-theme", 'dark');
|
||||
}
|
||||
})
|
||||
@@ -42,11 +42,6 @@
|
||||
{{- $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") }}
|
||||
@@ -100,7 +95,7 @@
|
||||
|
||||
{{- /* RSS */}}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}" title="{{ .Name }}">
|
||||
{{ end -}}
|
||||
{{- range .AllTranslations -}}
|
||||
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
|
||||
@@ -127,18 +122,15 @@
|
||||
--code-block-bg: rgb(46, 46, 51);
|
||||
--code-bg: rgb(55, 56, 62);
|
||||
--border: rgb(51, 51, 51);
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
.list {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-track {
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||||
border-color: var(--theme);
|
||||
.toc {
|
||||
background: var(--entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,12 +138,57 @@
|
||||
{{- end }}
|
||||
</noscript>
|
||||
|
||||
{{- /* theme-toggle is enabled */}}
|
||||
{{- if (not site.Params.disableThemeToggle) }}
|
||||
{{- /* theme is light */}}
|
||||
{{- if (eq site.Params.defaultTheme "light") }}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "dark") {
|
||||
document.querySelector("html").dataset.theme = 'dark';
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- /* theme is dark */}}
|
||||
{{- else if (eq site.Params.defaultTheme "dark") }}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "light") {
|
||||
document.querySelector("html").dataset.theme = 'light';
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- else }}
|
||||
{{- /* theme is auto */}}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "dark") {
|
||||
document.querySelector("html").dataset.theme = 'dark';
|
||||
} else if (localStorage.getItem("pref-theme") === "light") {
|
||||
document.querySelector("html").dataset.theme = 'light';
|
||||
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.querySelector("html").dataset.theme = 'dark';
|
||||
} else {
|
||||
document.querySelector("html").dataset.theme = 'light';
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- /* theme-toggle is disabled and theme is auto */}}
|
||||
{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
|
||||
<script>
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.querySelector("html").dataset.theme = 'dark';
|
||||
} else {
|
||||
document.querySelector("html").dataset.theme = 'light';
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- 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" . }}
|
||||
{{- partial "google_analytics.html" . }}
|
||||
{{- partial "templates/opengraph.html" . }}
|
||||
{{- partial "templates/twitter_cards.html" . }}
|
||||
{{- partial "templates/schema_json.html" . }}
|
||||
{{- end -}}
|
||||
@@ -1,46 +1,5 @@
|
||||
{{- /* theme-toggle is enabled */}}
|
||||
{{- if (not site.Params.disableThemeToggle) }}
|
||||
{{- /* theme is light */}}
|
||||
{{- if (eq site.Params.defaultTheme "light") }}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "dark") {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- /* theme is dark */}}
|
||||
{{- else if (eq site.Params.defaultTheme "dark") }}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "light") {
|
||||
document.body.classList.remove('dark')
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- else }}
|
||||
{{- /* theme is auto */}}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") === "dark") {
|
||||
document.body.classList.add('dark');
|
||||
} else if (localStorage.getItem("pref-theme") === "light") {
|
||||
document.body.classList.remove('dark')
|
||||
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- /* theme-toggle is disabled and theme is auto */}}
|
||||
{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
|
||||
<script>
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<nav class="header-nav">
|
||||
<div class="logo">
|
||||
{{- $label_text := (site.Params.label.text | default site.Title) }}
|
||||
{{- if site.Title }}
|
||||
@@ -48,10 +7,7 @@
|
||||
{{- if site.Params.label.icon }}
|
||||
{{- $img := resources.Get site.Params.label.icon }}
|
||||
{{- if $img }}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||
{{- if hugo.IsExtended -}}
|
||||
{{- $processableFormats = $processableFormats | append "webp" -}}
|
||||
{{- end -}}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}}
|
||||
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
|
||||
{{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}}
|
||||
{{- if site.Params.label.iconHeight }}
|
||||
@@ -60,10 +16,10 @@
|
||||
{{- $img = $img.Resize "x30" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<img src="{{ $img.Permalink }}" alt="" aria-label="logo"
|
||||
<img src="{{ $img.Permalink }}" alt=""
|
||||
height="{{- site.Params.label.iconHeight | default "30" -}}">
|
||||
{{- else }}
|
||||
<img src="{{- site.Params.label.icon | absURL -}}" alt="" aria-label="logo"
|
||||
<img src="{{- site.Params.label.icon | absURL -}}" alt=""
|
||||
height="{{- site.Params.label.iconHeight | default "30" -}}">
|
||||
{{- end -}}
|
||||
{{- else if hasPrefix site.Params.label.iconSVG "<svg" }}
|
||||
@@ -72,15 +28,18 @@
|
||||
{{- $label_text -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
{{- $lsenabled := (or (not site.Params.disableThemeToggle) (and (not site.Params.disableLangToggle) (hugo.IsMultilingual))) }}
|
||||
{{- if $lsenabled }}
|
||||
<div class="logo-switches">
|
||||
{{- if (not site.Params.disableThemeToggle) }}
|
||||
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
|
||||
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||||
<button id="theme-toggle" class="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
|
||||
<svg class="moon" xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
||||
</svg>
|
||||
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||||
<svg class="sun" xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
@@ -95,35 +54,37 @@
|
||||
</svg>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{- $lang := .Lang}}
|
||||
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
|
||||
{{- with site.Home.Translations }}
|
||||
<ul class="lang-switch">
|
||||
{{- if $separator }}<li>|</li>{{ end }}
|
||||
{{- range . -}}
|
||||
{{- if ne $lang .Lang }}
|
||||
<li>
|
||||
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
|
||||
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
|
||||
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||
{{- .Language.LanguageName | emojify -}}
|
||||
{{- else }}
|
||||
{{- .Lang | title -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end}}
|
||||
</ul>
|
||||
|
||||
{{- if (not site.Params.disableLangToggle) }}
|
||||
{{- $lang := .Lang}}
|
||||
{{- with site.Home.Translations }}
|
||||
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
|
||||
{{- if $separator }}<span class="nav-sep">|</span>{{ end }}
|
||||
<ul class="lang-menu">
|
||||
{{- range . -}}
|
||||
{{- if ne $lang .Lang }}
|
||||
<li>
|
||||
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.Label | emojify) | default (.Lang | title) }}"
|
||||
aria-label="{{ .Language.Label | default (.Lang | title) }}">
|
||||
{{- if (and site.Params.displayFullLangName (.Language.Label)) }}
|
||||
{{- .Language.Label | emojify -}}
|
||||
{{- else }}
|
||||
{{- .Lang | title -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end}}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- $currentPage := . }}
|
||||
<ul id="menu">
|
||||
{{- $page_url:= .Permalink | absLangURL }}
|
||||
<ul id="menu" class="menu">
|
||||
{{- range site.Menus.main }}
|
||||
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
||||
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
||||
{{- $is_search := eq (site.GetPage .KeyName).Layout `search` }}
|
||||
<li>
|
||||
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
|
||||
@@ -133,7 +94,7 @@
|
||||
{{- .Name -}}
|
||||
{{ .Post -}}
|
||||
</span>
|
||||
{{- if (findRE "://" .URL) }}
|
||||
{{- if (strings.Contains .URL "://") }}
|
||||
<svg fill="none" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2.5" viewBox="0 0 24 24" height="12" width="12">
|
||||
<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path>
|
||||
@@ -3,8 +3,9 @@
|
||||
<header class="entry-header">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
{{ .Content | markdownify }}
|
||||
<div class="entry-content md-content">
|
||||
{{ $opts := dict "display" "block" }}
|
||||
{{ .Content | $.Page.RenderString $opts }}
|
||||
</div>
|
||||
<footer class="entry-footer">
|
||||
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }}
|
||||
@@ -7,10 +7,7 @@
|
||||
{{- $img = resources.Get .imageUrl }}
|
||||
{{- end }}
|
||||
{{- if $img }}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||
{{- if hugo.IsExtended -}}
|
||||
{{- $processableFormats = $processableFormats | append "webp" -}}
|
||||
{{- end -}}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}}
|
||||
{{- $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))) }}
|
||||
File renamed without changes.
@@ -0,0 +1,25 @@
|
||||
{{- $meta := slice }}
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
{{- $meta = $meta | append (printf "<span title='%s'>%s</span>" (.Date | time.Format "2006-01-02T15:04:05-07:00") (.Date | time.Format (default ":date_long" site.Params.DateFormat))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowReadingTime") -}}
|
||||
{{- $meta = $meta | append (printf "<span>%s</span>" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowWordCount") -}}
|
||||
{{- $meta = $meta | append (printf "<span>%s</span>" (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if not (.Param "hideAuthor") -}}
|
||||
{{- with (partial "author.html" .) }}
|
||||
{{- $meta = $meta | append (printf "<span>%s</span>" .) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Combine all meta information into a single string with separators and render it as HTML.*/}}
|
||||
|
||||
{{- with $meta }}
|
||||
{{- delimit . " · " | safeHTML -}}
|
||||
{{- end -}}
|
||||
@@ -4,14 +4,12 @@
|
||||
{{- with $pages.Next . }}
|
||||
<a class="prev" href="{{ .Permalink }}">
|
||||
<span class="title">« {{ i18n "prev_page" }}</span>
|
||||
<br>
|
||||
<span>{{- .Name -}}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- with $pages.Prev . }}
|
||||
<a class="next" href="{{ .Permalink }}">
|
||||
<span class="title">{{ i18n "next_page" }} »</span>
|
||||
<br>
|
||||
<span>{{- .Name -}}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
@@ -1,12 +1,12 @@
|
||||
{{- $pageurl := .Permalink }}
|
||||
{{- $title := .Title }}
|
||||
|
||||
{{- $.Scratch.Set "tags" ""}}
|
||||
{{- $tags := ""}}
|
||||
|
||||
{{- with .Params.Tags }}
|
||||
{{- $hashtags := newScratch}}
|
||||
{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
|
||||
{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
|
||||
{{- $hashtags := slice }}
|
||||
{{- range . }}{{ $hashtags = $hashtags | append (replaceRE "(\\s)" "" . ) }}{{end}}
|
||||
{{- $tags = delimit $hashtags "," }}
|
||||
{{- end -}}
|
||||
|
||||
{{- $custom := false }}
|
||||
@@ -17,7 +17,7 @@
|
||||
{{- if (or (cond ($custom) (in $ShareButtons "x") (true)) (cond ($custom) (in $ShareButtons "twitter") (true))) }}
|
||||
<li>
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on x"
|
||||
href="https://x.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}&hashtags={{- $.Scratch.Get "tags" -}}">
|
||||
href="https://x.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}&hashtags={{- $tags -}}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
d="M512 62.554 L 512 449.446 C 512 483.97 483.97 512 449.446 512 L 62.554 512 C 28.03 512 0 483.97 0 449.446 L 0 62.554 C 0 28.03 28.029 0 62.554 0 L 449.446 0 C 483.971 0 512 28.03 512 62.554 Z M 269.951 190.75 L 182.567 75.216 L 56 75.216 L 207.216 272.95 L 63.9 436.783 L 125.266 436.783 L 235.9 310.383 L 332.567 436.783 L 456 436.783 L 298.367 228.367 L 432.367 75.216 L 371.033 75.216 Z M 127.633 110 L 164.101 110 L 383.481 400.065 L 349.5 400.065 Z" />
|
||||
File renamed without changes.
@@ -69,10 +69,15 @@
|
||||
d="M23.638 14.904c-1.602 6.43-8.113 10.34-14.542 8.736C2.67 22.05-1.244 15.525.362 9.105 1.962 2.67 8.475-1.243 14.9.358c6.43 1.605 10.342 8.115 8.738 14.548v-.002zm-6.35-4.613c.24-1.59-.974-2.45-2.64-3.03l.54-2.153-1.315-.33-.525 2.107c-.345-.087-.705-.167-1.064-.25l.526-2.127-1.32-.33-.54 2.165c-.285-.067-.565-.132-.84-.2l-1.815-.45-.35 1.407s.975.225.955.236c.535.136.63.486.615.766l-1.477 5.92c-.075.166-.24.406-.614.314.015.02-.96-.24-.96-.24l-.66 1.51 1.71.426.93.242-.54 2.19 1.32.327.54-2.17c.36.1.705.19 1.05.273l-.51 2.154 1.32.33.545-2.19c2.24.427 3.93.257 4.64-1.774.57-1.637-.03-2.58-1.217-3.196.854-.193 1.5-.76 1.68-1.93h.01zm-3.01 4.22c-.404 1.64-3.157.75-4.05.53l.72-2.9c.896.23 3.757.67 3.33 2.37zm.41-4.24c-.37 1.49-2.662.735-3.405.55l.654-2.64c.744.18 3.137.524 2.75 2.084v.006z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "bluesky") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 320" fill="currentColor">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-25 0 400 320" fill="none" stroke="currentColor" stroke-width="30">
|
||||
<path
|
||||
d="M180 141.964C163.699 110.262 119.308 51.1817 78.0347 22.044C38.4971 -5.86834 23.414 -1.03207 13.526 3.43594C2.08093 8.60755 0 26.1785 0 36.5164C0 46.8542 5.66748 121.272 9.36416 133.694C21.5786 174.738 65.0603 188.607 105.104 184.156C107.151 183.852 109.227 183.572 111.329 183.312C109.267 183.642 107.19 183.924 105.104 184.156C46.4204 192.847 -5.69621 214.233 62.6582 290.33C137.848 368.18 165.705 273.637 180 225.702C194.295 273.637 210.76 364.771 295.995 290.33C360 225.702 313.58 192.85 254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158C294.94 188.61 338.421 174.74 350.636 133.697C354.333 121.275 360 46.8568 360 36.519C360 26.1811 357.919 8.61012 346.474 3.43851C336.586 -1.02949 321.503 -5.86576 281.965 22.0466C240.692 51.1843 196.301 110.262 180 141.964Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "bookwyrm") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="m8.3359 0.0078125c-2.0069 0.073882-3.9461 1.339-5.1719 3.1055-1.2258 1.7665-1.686 4.04-0.90234 6.2734 0.7201 2.0524 2.301 3.6839 4.377 4.3066l-0.40234 2.5547c-0.61924-0.29743-1.2854-0.52634-1.9707-0.55078-1.0699-0.03816-2.6915 0.27366-3.707 2.0703-0.69877 1.2362-0.81095 2.9826 0.10555 4.4707 0.61159 0.99303 1.7053 1.9179 4.2929 1.4745 1.4845-0.25433 2.2237-1.3456 2.9082-2.9727 0.37179-0.88378 0.65101-2.0921 1.1895-2.8398 0.73644-1.0227 2.285-1.5902 3.2578-1.6113-0.93782-0.45256-3.7855-1.1922-5.584 1.8008-0.48715 0.8107-1.0605 2.4179-1.9609 2.9531-0.2998 0.1782-0.76718 0.0994-1.0781-0.13477-0.20088-0.15128-0.95922-1.0342-0.16016-1.9395 0.21799-0.24696 0.54865-0.3631 0.93555-0.33398 0.26333 0.01982 0.55734 0.12268 0.88477 0.35352 0.21582-0.44651 0.44063-0.88851 0.68359-1.3204 0.19226-0.34173 0.49358-0.75049 0.88086-1.1426l0.87305-5.3652c-0.24381 0.10022-0.52508 0.15616-0.76367 0.18559-0.41295 0.05094-0.81717 0.02605-1.1895-0.08789-0.48449-0.14828-0.99894-0.41785-1.2695-0.93554-0.086172-0.16486-0.024184-0.37016 0.13477-0.4668 0.17373-0.10562 0.37573-0.028092 0.5 0.13281 0.41046 0.53144 1.1723 0.85969 2.0879 0.58794 1.2598-0.3318 2.1585-0.89477 2.7973-0.94823 0.62644-0.052424 0.9395 0.63646 1.1998 1.2859 0.08927-0.40702 0.33679-1.217 1-0.30078 0.020069-0.7907 0.48358-0.94364 0.93945-0.37895-1.2259-2.9496-3.6999-1.7628-5.0589-1.4148-0.63799 0.1634-1.8432 0.2286-2.5441-1.5549-0.19205-1.9238 0.832-3.0815 1.9497-3.6181 1.11-0.5329 2.4759-0.33316 3.4043 0.23242-0.36121 0.71072-0.96917 0.66041-1.7031 0.73633 0.97044 0.57933 1.6654 0.51691 2.4707 0.23438 0.05017 0.64643-0.27301 0.94594-0.66797 1.4023 1.1363 0.014693 1.7281-0.12865 1.9199-0.2207-0.06996-0.12068-0.13737-0.24477-0.20117-0.375-0.15114-0.30851-0.20068-1.0047-0.10742-1.7402 0.2535 0.25256 0.66781 0.50633 1.0586 0.54492-0.13923-0.55326 0.04953-1.4041 0.36523-1.9453 0.17929 0.22031 0.65534 0.48341 1.0664 0.51758-0.03367-0.13937-0.01471-0.38143 0.01758-0.63672-0.9214-0.25345-1.2388-0.43896-1.8164-0.75195-0.73954-0.40078-3.2824-1.7015-5.041-1.6367zm11.457 1.4355-0.50391 1.0195c-0.6186-0.30447-1.3497 0.099697-1.4238 0.78516 0 0-1.575-0.59615-1.7793-1.3223-0.25838 0.42041-0.34228 1.2928-0.10156 1.9375-0.25368 0.056883-1.3427-0.18224-1.5254-0.42578-0.17662 0.4343-0.06096 1.5935 0.38086 1.9824-0.70463-0.029033-1.2107-0.10404-1.6016-0.47266 0.05528 0.65482 1.1567 2.5058 3.0605 2.4473 1.8859-0.057961 5.3416-2.0444 5.1172 0.77734l0.76367-0.91406 0.44922 1.082 0.12891-1.502 0.62891 0.10352-0.01563-0.86719c-1.0878 0.21766-2.216 0.15404-3.2715-0.1875 0 0 0.81541-1.2247 3.2109-0.62695 0 0 1.0704-0.18142 0.54492-1.0547-0.52548-0.87327-1.0156 0.42383-1.0156 0.42383-0.45143-0.28472-0.85656-0.63336-1.291-0.94336-0.79444-0.56687-1.4356-1.3204-1.7559-2.2422zm-0.8418 1.2695c0.75216-0.00879 1.4355 0.46302 1.7031 1.166 0.04186 0.10996 0.15236 0.15844 0.26758 0.13477 0.1635-0.033594 0.32277 0.073435 0.36719 0.23438 0.04852 0.17581-0.05737 0.35656-0.23437 0.40039-0.43572 0.1079-0.84051-0.14952-1.002-0.56836-0.02156-0.055928-0.27308-0.7224-1.1016-0.70117-0.187 0.00479-0.33205-0.14489-0.33203-0.33203 0-0.18715 0.14489-0.3318 0.33203-0.33398zm0.25781 1.0957c0.26687 0.00108 0.48296 0.21751 0.48242 0.48438-5.37e-4 0.26611-0.21632 0.48135-0.48242 0.48242-0.26763 0.00108-0.48579-0.21479-0.48633-0.48242-5.41e-4 -0.2684 0.21793-0.48546 0.48633-0.48438zm-10.809 3.0397c-0.34991 0.22367-0.78824 0.66637-0.87563 1.2212l-0.02322 0.14744c0.11372 0.12466 0.70444-9.118e-4 0.7719-0.043257 0.072919-0.44812 0.27343-0.56586 0.52734-0.7258 0.23894-0.15051 0.51638-0.15096 0.6371-0.12959l8.1113 1.4355-1.5332 9.2793-4.498-0.7793c-0.90219 0.26905-1.5466 0.74872-1.8106 1.1153-0.23032 0.31978-0.45999 0.95271-0.64258 1.457h0.00195l5.6465 0.94531 0.10547-0.60938 0.26172-1.5273c2e-3 -0.0014 0.0039-0.0025 0.0059-0.0039l1.4961 0.27148 0.60547-3.5977c0.53943 0.80503 0.83125 1.8162 0.69727 2.6641-0.14 0.88552-0.69613 1.6056-1.9375 1.9688-0.12433 0.03633-0.24744 0.06753-0.36914 0.0957l-0.19727 1.2051c-0.03115 0.20643-0.23137 0.34436-0.43555 0.30078l-6.1348-1.0312-0.4043 0.97656c1.464 1.0792 3.2449 2.1812 5.5723 2.2578 1.1718 0.03857 2.7611-0.13523 4.207-0.83594 1.4459-0.7007 2.7188-1.9524 3.2031-3.9375 0.35588-1.4586 0.21674-3.049-0.29883-4.4395-0.7975-2.1508-2.4648-3.307-3.1621-3.625l0.45703-2.7188-1.0625-0.19141c-1.0515 0.21674-2.1447 0.13408-3.1035-0.5625l-4.6797-0.84768c-0.15388-0.027874-0.67134-0.034627-1.1391 0.26435zm1.2523 3.6087-0.00195 0.0039-0.8125 4.8438c0.78057-0.26418 1.5395-0.2905 2.2051-0.20898l0.64636-3.8533c-0.23318 0.2305-0.41364 0.22022-0.48214 0.21007-0.51767-0.07669-0.62748-0.99295-0.98846-1.1614-0.11104-0.05182-0.29544-0.02624-0.56639 0.16594z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "bugcrowd") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
@@ -242,7 +247,13 @@
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "dzen") -}}
|
||||
<svg viewBox="0 0 166 167" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M83.3295 166.23H82.6705C49.7081 166.23 30.436 162.915 17.0154 149.754C3.1854 135.664 0 116.522 0 83.6996V82.7709C0 49.9484 3.1854 30.6762 17.0154 16.7164C30.5658 3.56543 49.7081 0.240234 82.6605 0.240234H83.3295C116.152 0.240234 135.424 3.56543 148.985 16.7164C162.815 30.806 166 49.9484 166 82.7709V83.6996C166 116.532 162.805 135.804 148.985 149.754C135.424 162.905 116.292 166.23 83.3295 166.23ZM145.84 80.771C146.48 80.801 147 81.3308 147 81.9706H146.99V84.6498C146.99 85.2996 146.47 85.8294 145.83 85.8494C122.868 86.7191 108.902 89.6382 99.115 99.4252C89.338 109.202 86.4189 123.148 85.5392 146.071C85.5092 146.71 84.9794 147.23 84.3396 147.23H81.6504C81.0006 147.23 80.4708 146.71 80.4508 146.071C79.5711 123.148 76.652 109.202 66.875 99.4252C57.0981 89.6482 43.1225 86.7191 20.1596 85.8494C19.5198 85.8194 19 85.2896 19 84.6498V81.9706C19 81.3208 19.5198 80.791 20.1596 80.771C43.1225 79.9013 57.0881 76.9822 66.875 67.1952C76.672 57.3983 79.5911 43.4027 80.4608 20.3999C80.4908 19.7601 81.0206 19.2402 81.6604 19.2402H84.3396C84.9894 19.2402 85.5192 19.7601 85.5392 20.3999C86.4089 43.4127 89.328 57.3983 99.125 67.1952C108.902 76.9722 122.878 79.9013 145.84 80.771Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M83.3295 166.23H82.6705C49.7081 166.23 30.436 162.915 17.0154 149.754C3.1854 135.664 0 116.522 0 83.6996V82.7709C0 49.9484 3.1854 30.6762 17.0154 16.7164C30.5658 3.56543 49.7081 0.240234 82.6605 0.240234H83.3295C116.152 0.240234 135.424 3.56543 148.985 16.7164C162.815 30.806 166 49.9484 166 82.7709V83.6996C166 116.532 162.805 135.804 148.985 149.754C135.424 162.905 116.292 166.23 83.3295 166.23ZM145.84 80.771C146.48 80.801 147 81.3308 147 81.9706H146.99V84.6498C146.99 85.2996 146.47 85.8294 145.83 85.8494C122.868 86.7191 108.902 89.6382 99.115 99.4252C89.338 109.202 86.4189 123.148 85.5392 146.071C85.5092 146.71 84.9794 147.23 84.3396 147.23H81.6504C81.0006 147.23 80.4708 146.71 80.4508 146.071C79.5711 123.148 76.652 109.202 66.875 99.4252C57.0981 89.6482 43.1225 86.7191 20.1596 85.8494C19.5198 85.8194 19 85.2896 19 84.6498V81.9706C19 81.3208 19.5198 80.791 20.1596 80.771C43.1225 79.9013 57.0881 76.9822 66.875 67.1952C76.672 57.3983 79.5911 43.4027 80.4608 20.3999C80.4908 19.7601 81.0206 19.2402 81.6604 19.2402H84.3396C84.9894 19.2402 85.5192 19.7601 85.5392 20.3999C86.4089 43.4127 89.328 57.3983 99.125 67.1952C108.902 76.9722 122.878 79.9013 145.84 80.771Z"
|
||||
fill="currentColor" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "ebird") -}}
|
||||
<svg viewBox="-1 16 32 33" fill="currentColor" stroke-width="1" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 7.49767,34.8739 c 0.25042,2.2508 1.12391,4.0007 2.62343,5.2498 1.4995,1.2491 3.3121,1.8752 5.4377,1.8752 1.8751,0 3.4462,-0.3846 4.7162,-1.1567 1.27,-0.7692 2.385,-1.738 3.3449,-2.9067 l 5.3751,4.0634 c -1.75,2.1673 -3.7086,3.7086 -5.8759,4.6238 -2.1674,0.9182 -4.439,1.3743 -6.812,1.3743 -2.2478,0 -4.3734,-0.3756 -6.3738,-1.1239 C 7.93292,46.1219 6.20384,45.0606 4.74604,43.6862 3.28824,42.3119 2.13154,40.6544 1.27893,38.7166 0.426309,36.7788 0,34.6234 0,32.2474 0,29.8714 0.426309,27.716 1.27893,25.7783 2.13154,23.8405 3.28824,22.186 4.74604,20.8116 6.20384,19.4373 7.93292,18.373 9.9333,17.6247 c 2.0004,-0.7512 4.126,-1.1268 6.3738,-1.1268 2.0838,0 3.9888,0.3666 5.7179,1.0941 1.7291,0.7303 3.2077,1.7827 4.4389,3.157 1.2283,1.3744 2.1882,3.0736 2.8739,5.0919 0.6887,2.0242 1.0315,4.3436 1.0315,6.97 v 2.063 z M 22.8716,29.2514 c -0.0417,-2.2091 -0.7304,-3.9471 -2.063,-5.2201 -1.3325,-1.27 -3.1868,-1.905 -5.5628,-1.905 -2.2508,0 -4.0306,0.6469 -5.34232,1.9378 -1.31172,1.2909 -2.11365,3.0229 -2.40581,5.1873 z"/>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "email") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 21" fill="none" stroke="currentColor" stroke-width="2"
|
||||
@@ -278,6 +289,16 @@
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "farcaster") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" fill="currentColor" stroke="currentColor"
|
||||
stroke-width="2">
|
||||
<path
|
||||
d="M257.778 155.556H742.222V844.445H671.111V528.889H670.414C662.554 441.677 589.258 373.333 500 373.333C410.742 373.333 337.446 441.677 329.586 528.889H328.889V844.445H257.778V155.556Z" />
|
||||
<path
|
||||
d="M128.889 253.333L157.778 351.111H182.222V746.667C169.949 746.667 160 756.616 160 768.889V795.556H155.556C143.283 795.556 133.333 805.505 133.333 817.778V844.445H382.222V817.778C382.222 805.505 372.273 795.556 360 795.556H355.556V768.889C355.556 756.616 345.606 746.667 333.333 746.667H306.667V253.333H128.889Z" />
|
||||
<path
|
||||
d="M675.556 746.667C663.283 746.667 653.333 756.616 653.333 768.889V795.556H648.889C636.616 795.556 626.667 805.505 626.667 817.778V844.445H875.556V817.778C875.556 805.505 865.606 795.556 853.333 795.556H848.889V768.889C848.889 756.616 838.94 746.667 826.667 746.667V351.111H851.111L880 253.333H702.222V746.667H675.556Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "fediverse") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
@@ -301,6 +322,11 @@
|
||||
<path
|
||||
d="M5.334 6.666C2.3884 6.666 0 9.055 0 12c0 2.9456 2.3884 5.334 5.334 5.334 2.9456 0 5.332-2.3884 5.332-5.334 0-2.945-2.3864-5.334-5.332-5.334zm13.332 0c-2.9456 0-5.332 2.389-5.332 5.334 0 2.9456 2.3864 5.334 5.332 5.334C21.6116 17.334 24 14.9456 24 12c0-2.945-2.3884-5.334-5.334-5.334Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "forgejo") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M16.7773 0c1.6018 0 2.9004 1.2986 2.9004 2.9005s-1.2986 2.9004-2.9004 2.9004c-1.0854 0-2.0315-.596-2.5288-1.4787H12.91c-2.3322 0-4.2272 1.8718-4.2649 4.195l-.0007 2.1175a7.0759 7.0759 0 0 1 4.148-1.4205l.1176-.001 1.3385.0002c.4973-.8827 1.4434-1.4788 2.5288-1.4788 1.6018 0 2.9004 1.2986 2.9004 2.9005s-1.2986 2.9004-2.9004 2.9004c-1.0854 0-2.0315-.596-2.5288-1.4787H12.91c-2.3322 0-4.2272 1.8718-4.2649 4.195l-.0007 2.319c.8827.4973 1.4788 1.4434 1.4788 2.5287 0 1.602-1.2986 2.9005-2.9005 2.9005-1.6018 0-2.9004-1.2986-2.9004-2.9005 0-1.0853.596-2.0314 1.4788-2.5287l-.0002-9.9831c0-3.887 3.1195-7.0453 6.9915-7.108l.1176-.001h1.3385C14.7458.5962 15.692 0 16.7773 0ZM7.2227 19.9052c-.6596 0-1.1943.5347-1.1943 1.1943s.5347 1.1943 1.1943 1.1943 1.1944-.5347 1.1944-1.1943-.5348-1.1943-1.1944-1.1943Zm9.5546-10.4644c-.6596 0-1.1944.5347-1.1944 1.1943s.5348 1.1943 1.1944 1.1943c.6596 0 1.1943-.5347 1.1943-1.1943s-.5347-1.1943-1.1943-1.1943Zm0-7.7346c-.6596 0-1.1944.5347-1.1944 1.1943s.5348 1.1943 1.1944 1.1943c.6596 0 1.1943-.5347 1.1943-1.1943s-.5347-1.1943-1.1943-1.1943Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "freepik") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
@@ -457,10 +483,9 @@
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "kofi") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -3 23 27" preserveAspectRatio="xMidYMid meet" fill="none"
|
||||
stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963c1.904.82 1.832 3.011.723 4.311zm6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015z" />
|
||||
d="M11.351 2.715c-2.7 0-4.986.025-6.83.26C2.078 3.285 0 5.154 0 8.61c0 3.506.182 6.13 1.585 8.493 1.584 2.701 4.233 4.182 7.662 4.182h.83c4.209 0 6.494-2.234 7.637-4a9.5 9.5 0 0 0 1.091-2.338C21.792 14.688 24 12.22 24 9.208v-.415c0-3.247-2.13-5.507-5.792-5.87-1.558-.156-2.65-.208-6.857-.208m0 1.947c4.208 0 5.09.052 6.571.182 2.624.311 4.13 1.584 4.13 4v.39c0 2.156-1.792 3.844-3.87 3.844h-.935l-.156.649c-.208 1.013-.597 1.818-1.039 2.546-.909 1.428-2.545 3.064-5.922 3.064h-.805c-2.571 0-4.831-.883-6.078-3.195-1.09-2-1.298-4.155-1.298-7.506 0-2.181.857-3.402 3.012-3.714 1.533-.233 3.559-.26 6.39-.26m6.547 2.287c-.416 0-.65.234-.65.546v2.935c0 .311.234.545.65.545 1.324 0 2.051-.754 2.051-2s-.727-2.026-2.052-2.026m-10.39.182c-1.818 0-3.013 1.48-3.013 3.142 0 1.533.858 2.857 1.949 3.897.727.701 1.87 1.429 2.649 1.896a1.47 1.47 0 0 0 1.507 0c.78-.467 1.922-1.195 2.623-1.896 1.117-1.039 1.974-2.364 1.974-3.897 0-1.662-1.247-3.142-3.039-3.142-1.065 0-1.792.545-2.338 1.298-.493-.753-1.246-1.298-2.312-1.298" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "komoot") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
@@ -505,6 +530,11 @@
|
||||
<rect x="2" y="9" width="4" height="12"></rect>
|
||||
<circle cx="4" cy="4" r="2"></circle>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "linktree") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="m13.73635 5.85251 4.00467-4.11665 2.3248 2.3808-4.20064 4.00466h5.9085v3.30473h-5.9365l4.22865 4.10766-2.3248 2.3338L12.0005 12.099l-5.74052 5.76852-2.3248-2.3248 4.22864-4.10766h-5.9375V8.12132h5.9085L3.93417 4.11666l2.3248-2.3808 4.00468 4.11665V0h3.4727zm-3.4727 10.30614h3.4727V24h-3.4727z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "mastodon") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
@@ -553,6 +583,16 @@
|
||||
<path
|
||||
d="M10.98,23.65c-2.69,0-5.26-1.05-7.24-2.95C1.59,18.63,.35,15.72,.35,12.73,.35,8.21,3.21,4.11,7.46,2.52c.15-.05,.3-.08,.45-.08,.42,0,.78,.21,.93,.55,.12,.26,.13,.51,.03,.75-.12,.28-.38,.52-.7,.64-3.48,1.3-5.82,4.66-5.82,8.36,0,2.46,1.02,4.84,2.79,6.54,1.6,1.54,3.68,2.39,5.85,2.39,.1,0,.2,0,.29,0,3.49-.12,6.22-1.91,7.47-4.89,.08-.2,2.01-4.93-2.59-7.9-.41-.27-.89-.46-1.42-.58l-.6-.14,.18,.58c.21,.68,.78,2.52,.84,2.93,.07,.46,.07,.51,.1,.92v.18c0,2.3-1.89,4.19-4.22,4.19-2.2,0-3.97-1.73-4.23-4.1-.25-2.35,.74-4.4,2.73-5.61,.53-.32,1.11-.57,1.73-.75l.33-.1-.48-1.74c-.16-.54-.53-2.38,1.5-3.72,.57-.38,1.22-.57,1.91-.57,1.38,0,2.62,.74,3.12,1.23,.22,.22,.36,.56,.36,.9,0,.26-.08,.48-.23,.63-.15,.15-.37,.23-.63,.23-.33,0-.67-.13-.89-.35-.06-.05-.85-.66-1.7-.66-.31,0-.59,.08-.82,.24-.04,.03-.08,.05-.12,.08-.23,.19-.71,.73-.47,1.82l.09,.34,.02,.07h0s.35,1.29,.35,1.29h.25c1.24,.08,2.39,.42,3.32,1.01l.05,.03c4.82,3.12,4.29,8.12,3.34,10.33-1.54,3.67-4.99,5.95-9.23,6.1-.12,0-.25,0-.37,0Zm.82-15.26c-.43,.13-.84,.31-1.2,.53-.94,.57-2.01,1.68-1.79,3.71,.12,1.12,.87,2.33,2.24,2.33,1.23,0,2.24-1,2.24-2.22h0s.03-.21-.05-.71c-.07-.46-.91-3.1-1-3.4l-.1-.33-.33,.1Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "nextcloud") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="M12.018 6.537c-2.5 0-4.6 1.712-5.241 4.015-.56-1.232-1.793-2.105-3.225-2.105A3.569 3.569 0 0 0 0 12a3.569 3.569 0 0 0 3.552 3.553c1.432 0 2.664-.874 3.224-2.106.641 2.304 2.742 4.016 5.242 4.016 2.487 0 4.576-1.693 5.231-3.977.569 1.21 1.783 2.067 3.198 2.067A3.568 3.568 0 0 0 24 12a3.569 3.569 0 0 0-3.553-3.553c-1.416 0-2.63.858-3.199 2.067-.654-2.284-2.743-3.978-5.23-3.977zm0 2.085c1.878 0 3.378 1.5 3.378 3.378 0 1.878-1.5 3.378-3.378 3.378A3.362 3.362 0 0 1 8.641 12c0-1.878 1.5-3.378 3.377-3.378zm-8.466 1.91c.822 0 1.467.645 1.467 1.468s-.644 1.467-1.467 1.468A1.452 1.452 0 0 1 2.085 12c0-.823.644-1.467 1.467-1.467zm16.895 0c.823 0 1.468.645 1.468 1.468s-.645 1.468-1.468 1.468A1.452 1.452 0 0 1 18.98 12c0-.823.644-1.467 1.467-1.467z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "nostr") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path
|
||||
d="m 23.991133,23.041317 c 0,0.468008 -0.376673,0.861815 -0.861814,0.861815 H 12.861481 c -0.468008,0 -0.861814,-0.376673 -0.861814,-0.861815 v -2.340105 c 0.04667,-2.870848 0.348005,-5.616161 0.981683,-6.871848 0.376673,-0.753346 1.010217,-1.164286 1.735095,-1.37549 1.37549,-0.40534 3.761263,-0.137335 4.788613,-0.182669 0,0 3.082052,0.120002 3.082052,-1.615227 0,-1.7350292 -1.375556,-1.3013553 -1.375556,-1.3013553 C 19.699128,9.4012901 18.540442,9.2946217 17.798497,8.9892833 16.542876,8.4926083 16.497208,7.6023935 16.497208,7.2998551 16.437207,3.812597 11.286255,3.3902566 6.7545122,4.2634712 1.8003629,5.1994868 6.8145132,12.311072 6.8145132,21.796897 v 1.267087 c 0,0.468008 -0.3940066,0.844681 -0.8618144,0.844681 H 0.86161395 c -0.4680078,0 -0.86181435741,-0.376673 -0.86181435741,-0.861814 V 1.3013551 c 0,-0.46800778 0.37667293741,-0.86181434 0.86181435741,-0.86181434 H 5.6502271 c 0.4680078,0 0.8618144,0.37667294 0.8618144,0.86181434 0,0.7076785 0.7876131,1.0901515 1.3583559,0.6791447 1.7236954,-1.23848733 3.9267996,-1.88916484 6.4038406,-1.88916484 5.524892,0 9.725562,3.23038714 9.725562,10.37623904 V 23.029717 Z M 14.80778,7.9278656 c 0,-1.0102835 -0.816213,-1.8263638 -1.82643,-1.8263638 -1.010217,0 -1.826364,0.8161469 -1.826364,1.8263638 0,1.0102835 0.816147,1.8264304 1.826364,1.8264304 1.010217,0 1.82643,-0.8161469 1.82643,-1.8264304 z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "nuget") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" stroke-width="2">
|
||||
<g>
|
||||
@@ -638,11 +678,6 @@
|
||||
<path
|
||||
d="M12,0C5.372,0,0,5.372,0,12c0,6.628,5.372,12,12,12c6.628,0,12-5.372,12-12 C24,5.372,18.628,0,12,0z M15.564,12c0-1.968-1.596-3.564-3.564-3.564c-1.968,0-3.564,1.595-3.564,3.564 c0,1.968,1.595,3.564,3.564,3.564V17.6c-3.093,0-5.6-2.507-5.6-5.6c0-3.093,2.507-5.6,5.6-5.6c3.093,0,5.6,2.507,5.6,5.6H15.564z M19,12c0-3.866-3.134-7-7-7c-3.866,0-7,3.134-7,7c0,3.866,3.134,7,7,7v2.333c-5.155,0-9.333-4.179-9.333-9.333 c0-5.155,4.179-9.333,9.333-9.333c5.155,0,9.333,4.179,9.333,9.333H19z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "polywork") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M19.125 0H4.875A4.865 4.865 0 0 0 0 4.875v14.25C0 21.825 2.175 24 4.875 24h6.6c2.7 0 4.875-2.175 4.875-4.875V16.65h2.775c2.7 0 4.875-2.175 4.875-4.875v-6.9C24 2.175 21.825 0 19.125 0zM16.5 1.275h2.625a3.6 3.6 0 0 1 3.6 3.6v2.7H16.5v-6.3zM15.075 9v6.45H8.85V9h6.225zM8.85 1.2h6.225v6.375H8.85V1.2zM1.275 4.8a3.6 3.6 0 0 1 3.6-3.6H7.5v6.375H1.275V4.8zM7.5 9v6.45H1.2V9h6.3zm0 13.725H4.8a3.6 3.6 0 0 1-3.6-3.6V16.8h6.3v5.925zm7.575-3.525a3.6 3.6 0 0 1-3.6 3.6H8.85v-5.925h6.225V19.2zm7.65-7.35a3.6 3.6 0 0 1-3.6 3.6H16.5V9h6.225v2.85z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "printables") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M3.678 4.8 12 9.6v9.6l8.322-4.8V4.8L12 0ZM12 19.2l-8.322-4.8V24Z" />
|
||||
@@ -781,7 +816,6 @@
|
||||
<path
|
||||
d="M15.387 17.944l-2.089-4.116h-3.065L15.387 24l5.15-10.172h-3.066m-7.008-5.599l2.836 5.598h4.172L10.463 0l-7 13.828h4.169" />
|
||||
</svg>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "substack") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke-width="2">
|
||||
<path
|
||||
@@ -856,6 +890,11 @@
|
||||
d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "unity") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor">
|
||||
<path
|
||||
d="M15 11.2V3.733L8.61 0v2.867l2.503 1.466c.099.067.099.2 0 .234L8.148 6.3c-.099.067-.197.033-.263 0L4.92 4.567c-.099-.034-.099-.2 0-.234l2.504-1.466V0L1 3.733V11.2v-.033.033l2.438-1.433V6.833c0-.1.131-.166.197-.133L6.6 8.433c.099.067.132.134.132.234v3.466c0 .1-.132.167-.198.134L4.031 10.8l-2.438 1.433L7.983 16l6.391-3.733-2.438-1.434L9.434 12.3c-.099.067-.198 0-.198-.133V8.7c0-.1.066-.2.132-.233l2.965-1.734c.099-.066.197 0 .197.134V9.8z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "unsplash") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 40">
|
||||
<path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="4"
|
||||
@@ -886,10 +925,18 @@
|
||||
<path
|
||||
d="M10.7657 15.5978C10.033 15.8089 9.24728 15.9231 8.43285 15.9231C7.4893 15.9251 6.55199 15.7679 5.65934 15.4578L3.12367 17V13.9835C1.81018 12.8183 1 11.2223 1 9.46154C1 5.89262 4.3278 3 8.43285 3C12.4487 3 15.7202 5.76769 15.8657 9.23V9.48092M9.49469 7.30769H9.50531M6.30918 7.30769H6.3198M14.8039 13.7692H14.8145M17.9894 13.7692H18" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "whatsapp") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 380" fill="currentColor">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M307.546 52.5655C273.709 18.685 228.706 0.0171895 180.756 0C81.951 0 1.53846 80.404 1.50408 179.235C1.48689 210.829 9.74646 241.667 25.4319 268.844L0 361.736L95.0236 336.811C121.203 351.096 150.683 358.616 180.679 358.625H180.756C279.544 358.625 359.966 278.212 360 179.381C360.017 131.483 341.392 86.4547 307.546 52.5741V52.5655ZM180.756 328.354H180.696C153.966 328.346 127.744 321.16 104.865 307.589L99.4242 304.358L43.034 319.149L58.0834 264.168L54.5423 258.53C39.6304 234.809 31.749 207.391 31.7662 179.244C31.8006 97.1036 98.6334 30.2707 180.817 30.2707C220.61 30.2879 258.015 45.8015 286.145 73.9665C314.276 102.123 329.755 139.562 329.738 179.364C329.703 261.513 262.871 328.346 180.756 328.346V328.354ZM262.475 216.777C257.997 214.534 235.978 203.704 231.869 202.209C227.761 200.713 224.779 199.966 221.796 204.452C218.814 208.939 210.228 219.029 207.615 222.011C205.002 225.002 202.389 225.372 197.911 223.128C193.434 220.885 179.003 216.158 161.891 200.902C148.578 189.024 139.587 174.362 136.975 169.875C134.362 165.389 136.7 162.965 138.934 160.739C140.945 158.728 143.412 155.505 145.655 152.892C147.899 150.279 148.638 148.406 150.133 145.423C151.629 142.432 150.881 139.82 149.764 137.576C148.646 135.333 139.691 113.287 135.952 104.323C132.316 95.5909 128.621 96.777 125.879 96.6309C123.266 96.5019 120.284 96.4762 117.293 96.4762C114.302 96.4762 109.454 97.5935 105.346 102.08C101.238 106.566 89.6691 117.404 89.6691 139.441C89.6691 161.478 105.716 182.785 107.959 185.776C110.202 188.767 139.544 234.001 184.469 253.408C195.153 258.023 203.498 260.782 210.004 262.845C220.731 266.257 230.494 265.776 238.212 264.624C246.816 263.335 264.71 253.786 268.44 243.326C272.17 232.866 272.17 223.893 271.053 222.028C269.936 220.163 266.945 219.037 262.467 216.794L262.475 216.777Z">
|
||||
</path>
|
||||
</svg>
|
||||
{{- else if or (eq $icon_name "wikipedia") (eq $icon_name "wiki") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80" fill="currentColor">
|
||||
<path d="M93.868704,0.909104 L93.868704,3.048056 C91.047359,3.549147 88.911824,4.435559 87.462095,5.707293 C85.385249,7.595808 82.936537,10.486281 81.33006,14.378719 L48.644587,81.09089 L46.469872,81.09089 L13.656938,13.511576 C12.12874,10.043075 10.051174,7.923395 9.424242,7.152531 C8.444628,5.957874 7.2397099,5.023288 5.8095009,4.34877 C4.3792666,3.674401 2.449446,3.24083 0.0200327,3.048056 L0.0200327,0.909104 L31.947914,0.909104 L31.947914,3.048056 C28.26456,3.394989 26.508521,4.011623 25.411397,4.89796 C24.31421,5.784446 23.765632,6.921365 23.765658,8.308721 C23.765632,10.235773 24.666866,13.241865 26.469366,17.327004 L50.70176,63.285559 L74.394451,17.905099 C76.236043,13.434562 77.763937,10.332122 77.764,8.597768 C77.763937,7.48019 77.195762,6.410715 76.059496,5.389341 C74.923078,4.368114 73.637249,3.645496 70.933604,3.221484 C70.737619,3.183021 70.404566,3.125211 69.934406,3.048056 L69.934406,0.909104 L93.868704,0.909104 Z" />
|
||||
<path d="M121.979968,0.909104 L121.979968,3.048056 C119.158628,3.549147 117.023098,4.435559 115.573368,5.707293 C113.496518,7.595808 111.047808,10.486281 109.441328,14.378719 L80.755855,81.09089 L78.581141,81.09089 L48.268207,13.511576 C46.740008,10.043075 44.662443,7.923395 44.035511,7.152531 C43.055896,5.957874 41.850979,5.023288 40.42077,4.34877 C38.990535,3.674401 37.694909,3.24083 35.265495,3.048056 L35.265495,0.909104 L66.559183,0.909104 L66.559183,3.048056 C62.875829,3.394989 61.11979,4.011623 60.022666,4.89796 C58.925479,5.784446 58.376901,6.921365 58.376926,8.308721 C58.376901,10.235773 59.278135,13.241865 61.080635,17.327004 L82.813029,63.285559 L102.505718,17.905099 C104.347308,13.434562 105.875208,10.332122 105.875268,8.597768 C105.875208,7.48019 105.307028,6.410715 104.170768,5.389341 C103.034348,4.368114 101.114328,3.645496 98.410678,3.221484 C98.214698,3.183021 97.881638,3.125211 97.411478,3.048056 L97.411478,0.909104 L121.979968,0.909104 Z" />
|
||||
<path
|
||||
d="M93.868704,0.909104 L93.868704,3.048056 C91.047359,3.549147 88.911824,4.435559 87.462095,5.707293 C85.385249,7.595808 82.936537,10.486281 81.33006,14.378719 L48.644587,81.09089 L46.469872,81.09089 L13.656938,13.511576 C12.12874,10.043075 10.051174,7.923395 9.424242,7.152531 C8.444628,5.957874 7.2397099,5.023288 5.8095009,4.34877 C4.3792666,3.674401 2.449446,3.24083 0.0200327,3.048056 L0.0200327,0.909104 L31.947914,0.909104 L31.947914,3.048056 C28.26456,3.394989 26.508521,4.011623 25.411397,4.89796 C24.31421,5.784446 23.765632,6.921365 23.765658,8.308721 C23.765632,10.235773 24.666866,13.241865 26.469366,17.327004 L50.70176,63.285559 L74.394451,17.905099 C76.236043,13.434562 77.763937,10.332122 77.764,8.597768 C77.763937,7.48019 77.195762,6.410715 76.059496,5.389341 C74.923078,4.368114 73.637249,3.645496 70.933604,3.221484 C70.737619,3.183021 70.404566,3.125211 69.934406,3.048056 L69.934406,0.909104 L93.868704,0.909104 Z" />
|
||||
<path
|
||||
d="M121.979968,0.909104 L121.979968,3.048056 C119.158628,3.549147 117.023098,4.435559 115.573368,5.707293 C113.496518,7.595808 111.047808,10.486281 109.441328,14.378719 L80.755855,81.09089 L78.581141,81.09089 L48.268207,13.511576 C46.740008,10.043075 44.662443,7.923395 44.035511,7.152531 C43.055896,5.957874 41.850979,5.023288 40.42077,4.34877 C38.990535,3.674401 37.694909,3.24083 35.265495,3.048056 L35.265495,0.909104 L66.559183,0.909104 L66.559183,3.048056 C62.875829,3.394989 61.11979,4.011623 60.022666,4.89796 C58.925479,5.784446 58.376901,6.921365 58.376926,8.308721 C58.376901,10.235773 59.278135,13.241865 61.080635,17.327004 L82.813029,63.285559 L102.505718,17.905099 C104.347308,13.434562 105.875208,10.332122 105.875268,8.597768 C105.875208,7.48019 105.307028,6.410715 104.170768,5.389341 C103.034348,4.368114 101.114328,3.645496 98.410678,3.221484 C98.214698,3.183021 97.881638,3.125211 97.411478,3.048056 L97.411478,0.909104 L121.979968,0.909104 Z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "wordpress") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
@@ -926,6 +973,13 @@
|
||||
<path
|
||||
d="M0 24V0h24v24H0zM6.951 5.896l4.112 7.708v5.064h1.583v-4.972l4.148-7.799h-1.749l-2.457 4.875c-.372.745-.688 1.434-.688 1.434s-.297-.708-.651-1.434L8.831 5.896h-1.88z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "yeswehack") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1300" fill="currentColor" stroke="none">
|
||||
<path
|
||||
d="M405 551l-397 -338c-5,-4 -8,-11 -8,-18l0 -171c0,-13 11,-24 24,-24l154 0c14,0 24,11 24,24l0 89 304 258 303 -258 0 -89c0,-13 11,-24 24,-24l155 0c13,0 23,11 23,24l0 171c0,7 -2,14 -8,18l-396 338 0 90c0,13 -11,24 -24,24l-155 0c-13,0 -23,-11 -23,-24l0 -90z" />
|
||||
<path
|
||||
d="M202 1052l203 -172 0 -90c0,-13 10,-24 23,-24l155 0c13,0 24,11 24,24l0 90 202 172 0 -505c0,-8 3,-14 9,-18l154 -132c7,-6 17,-8 26,-4 8,4 13,13 13,22l0 876c0,13 -10,24 -23,24l-174 0c-6,0 -11,-2 -15,-6l-293 -249 -293 249c-5,4 -10,6 -16,6l-173 0c-13,0 -24,-11 -24,-24l0 -876c0,-9 5,-18 14,-22 9,-4 18,-2 25,4l155 131c5,5 8,11 8,19l0 505z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "youtube") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
@@ -934,12 +988,26 @@
|
||||
</path>
|
||||
<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "zcal") -}}
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none" stroke-width="2">
|
||||
<path
|
||||
d="M 6.3361243,0.07808093 C 5.8180004,0.26764401 5.5778938,0.65939444 5.5778938,1.3291631 v 0.657135 L 4.0993445,2.0368425 C 2.8735383,2.0747533 2.5196977,2.137941 2.0773961,2.3654147 1.4328997,2.7066112 0.81367829,3.4395676 0.63675749,4.0587918 0.5609351,4.3620871 0.52302343,7.71094 0.54829756,13.347115 c 0.0379117,7.923511 0.0631858,8.858662 0.25274319,9.199865 0.24010655,0.442301 0.65713395,0.947789 0.79614215,0.947789 0.050549,0 0.22747,0.113734 0.4043899,0.252743 0.3159299,0.252744 0.5181249,0.252744 10.0339192,0.252744 h 9.692714 l 0.556036,-0.417027 C 22.587534,23.35576 22.96665,22.913458 23.14357,22.610167 L 23.4595,22.041494 V 13.069097 4.0967026 L 23.168845,3.565943 C 23.004562,3.275291 22.688632,2.8961743 22.461163,2.7192545 22.031499,2.3906822 21.121622,1.9862981 20.919428,2.0242088 c -0.06319,0.012634 -0.581311,0.012634 -1.149984,0 L 18.720559,2.011575 V 1.506083 c 0,-1.18789452 -0.909878,-1.83238624 -1.88294,-1.3395374 -0.417027,0.22746432 -0.644496,0.68240244 -0.644496,1.3395374 V 2.011575 H 12.149226 8.1053295 V 1.53136 c 0,-1.02360844 -0.8972396,-1.76920805 -1.7692052,-1.45327907 z M 5.5778938,4.7159268 c 0,0.9477869 0.2780183,1.4153683 0.9225148,1.5291004 C 7.4355589,6.4219471 8.1053295,5.7269014 8.1053295,4.5642839 V 3.907149 h 4.0438965 4.043897 v 0.7835008 c 0.01264,0.8340548 0.176921,1.1752608 0.720319,1.478556 0.568673,0.3032858 1.326903,0.063178 1.630196,-0.5054921 0.101097,-0.2021968 0.176921,-0.6697687 0.176921,-1.0615191 V 3.907149 h 0.985699 c 0.89724,0 1.023611,0.025277 1.415364,0.3664734 l 0.442301,0.3664829 0.03791,3.5384066 0.03791,3.5510451 -0.417028,0.126371 c -0.227469,0.06319 -0.644495,0.202195 -0.922514,0.315929 -0.480212,0.176921 -3.829064,1.377453 -4.486197,1.604922 -0.176921,0.05055 -0.796142,0.278019 -1.39009,0.480214 l -1.07416,0.379114 -0.06319,-2.641169 -0.06318,-2.6538124 -0.40439,-0.4043842 C 12.275598,8.3933386 11.808022,8.4059819 10.190464,9.0125629 9.4954189,9.2653042 8.5349935,9.6065101 8.0421437,9.78343 c -0.859328,0.290652 -2.9065504,1.023608 -3.9175251,1.402725 -0.2780173,0.1011 -0.7329564,0.265384 -1.0109737,0.353844 -0.2780183,0.101097 -0.6065848,0.214832 -0.7203198,0.26538 -0.2148315,0.08846 -0.227469,-0.126371 -0.227469,-3.3362094 0,-2.8054559 0.037912,-3.5005015 0.1895583,-3.8037873 C 2.6839809,4.0208811 2.9872724,3.907149 4.3394511,3.907149 h 1.2384427 z m 5.3076142,9.5410662 c 0,2.577983 0.01264,2.666443 0.290655,2.982373 0.429665,0.518124 1.175258,0.556036 2.363153,0.126372 1.630196,-0.581311 4.423012,-1.579648 6.065845,-2.173595 0.871965,-0.303292 1.680745,-0.593947 1.807117,-0.631859 0.214831,-0.06319 0.227469,0.101097 0.189557,3.437313 l -0.03791,3.500498 -0.35384,0.303292 -0.353842,0.303292 H 11.90912 2.9619982 L 2.6207951,21.763475 C 2.4438743,21.586554 2.2543169,21.308537 2.2164053,21.169528 c -0.025274,-0.151646 -0.037912,-1.680744 -0.025274,-3.3994 l 0.037911,-3.146658 0.4423016,-0.151646 c 0.429664,-0.151646 2.3126032,-0.821416 5.3076145,-1.882939 0.7961422,-0.278018 1.7439301,-0.606585 2.0851336,-0.732957 0.353841,-0.126371 0.669772,-0.227469 0.732956,-0.227469 0.05055,-0.01264 0.08846,1.175257 0.08846,2.628534 z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "zhihu") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path
|
||||
d="m13.3334,3.60098l0,17.1471l1.79582,0l0.75424,2.13703l3.18459,-2.13703l3.93584,0l0,-17.1471l-9.6705,0zm7.41375,14.87538l-1.79283,0l-2.24777,1.50849l-0.53276,-1.50849l-0.53875,0l0,-12.53483l5.10911,0l0,12.53483l0.00299,0zm-8.56906,-7.18927l-3.97475,0c0.06285,-1.34387 0.1287,-3.12174 0.19754,-5.17496l3.91788,0l-0.00299,-0.24244c0,-0.01796 -0.00599,-0.43998 -0.06884,-0.87097c-0.06285,-0.44896 -0.19754,-1.04457 -0.62854,-1.04457l-6.5727,0c0.13169,-0.61657 0.46991,-2.08615 0.87995,-2.80747l0.19155,-0.33522l-0.3861,-0.02095c-0.02394,0 -0.58663,-0.02694 -1.23912,0.31726c-1.06851,0.56868 -1.5474,1.68807 -1.75691,2.52612c-0.55072,2.18791 -1.33489,3.70837 -1.66712,4.35786c-0.09877,0.19155 -0.15863,0.30529 -0.18557,0.38311c-0.05387,0.14666 -0.02394,0.29332 0.0838,0.38909c0.31427,0.28434 1.14334,-0.0868 1.15232,-0.08979c0.01796,-0.00898 0.03891,-0.01796 0.06585,-0.02993c0.41603,-0.18856 1.64916,-0.74826 2.08914,-2.52911l1.69705,0c0.02095,0.96376 0.09278,4.14236 0.0868,5.17496l-4.22018,0l-0.06285,0.0449c-0.69139,0.50582 -0.91288,1.8916 -0.92185,1.95146l-0.0419,0.27536l4.99837,0c-0.36814,2.34355 -0.79315,3.3941 -1.01763,3.81313c-0.11074,0.20951 -0.21849,0.41902 -0.32025,0.62255c-0.63752,1.26306 -1.29898,2.56802 -3.7802,4.5973c-0.10775,0.0838 -0.20951,0.23944 -0.14367,0.41005c0.07183,0.18856 0.27835,0.27237 0.73629,0.27237c0.16162,0 0.35318,-0.00898 0.58065,-0.02993c1.49352,-0.13169 3.01698,-0.53875 4.04359,-2.6219c0.50882,-1.05056 0.94879,-2.14601 1.31394,-3.25941l4.08549,4.78886l0.14965,-0.35916c0.02394,-0.05687 0.56868,-1.38578 0.15264,-2.87032l-0.01497,-0.05387l-3.23547,-3.68143l-0.65847,0.49684c0.19155,-0.78118 0.31726,-1.49352 0.37413,-2.12805l4.74995,0l0,-0.23944c0,-1.20021 -0.55371,-1.91255 -0.57466,-1.94248l-0.07183,-0.08979z" />
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "jamendo") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.3">
|
||||
<path style="stroke-width:1.7"
|
||||
d="M 11.953964,1.9577206 C 8.9486891,3.6582881 5.9434143,5.3588555 2.9381394,7.059423 c 0,3.325368 0,6.650735 0,9.976103 2.9643942,1.765865 5.9287884,3.531729 8.8931826,5.297594 3.002478,-1.73905 6.004955,-3.478101 9.007433,-5.217151 0,-3.360254 0,-6.720509 0,-10.0807628 C 17.877158,5.342711 14.915561,3.6502158 11.953964,1.9577206 Z" />
|
||||
<path d="M 6.7394985,14.712082 8.3520207,11.408709" />
|
||||
<path d="M 9.2716212,14.767353 11.902927,9.4304828" />
|
||||
<path d="M 13.170768,11.935987 14.59425,9.3677519" />
|
||||
<path d="M 14.54983,14.574583 17.177574,9.4459113" />
|
||||
</svg>
|
||||
{{- else if $icon_name -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
File renamed without changes.
@@ -0,0 +1,86 @@
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
|
||||
{{- with or site.Title site.Params.title | plainify }}
|
||||
<meta property="og:site_name" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Title site.Title site.Params.title | plainify }}
|
||||
<meta property="og:title" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
|
||||
<meta property="og:description" content="{{ trim . "\n\r\t " }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Params.locale site.Language.Locale }}
|
||||
<meta property="og:locale" content="{{ replace . `-` `_` }}">
|
||||
{{- end }}
|
||||
|
||||
{{- if .IsPage }}
|
||||
<meta property="og:type" content="article">
|
||||
{{- with .Section }}
|
||||
<meta property="article:section" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||
{{- with .PublishDate }}
|
||||
<meta property="article:published_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{- end }}
|
||||
{{- with .Lastmod }}
|
||||
<meta property="article:modified_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{- end }}
|
||||
{{- range .GetTerms "tags" | first 6 }}
|
||||
<meta property="article:tag" content="{{ .Page.Title | plainify }}">
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
<meta property="og:type" content="website">
|
||||
{{- end }}
|
||||
|
||||
{{- if .Params.cover.image -}}
|
||||
{{- if (ne .Params.cover.relative true) }}
|
||||
<meta property="og:image" content="{{ .Params.cover.image | absURL }}">
|
||||
{{- else}}
|
||||
<meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
{{- with partial "_funcs/get-page-images" . }}
|
||||
{{- range . | first 6 }}
|
||||
<meta property="og:image" content="{{ .Permalink }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Params.audio }}
|
||||
{{- range . | first 6 }}
|
||||
<meta property="og:audio" content="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Params.videos }}
|
||||
{{- range . | first 6 }}
|
||||
<meta property="og:video" content="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- range .GetTerms "series" }}
|
||||
{{- range .Pages | first 7 }}
|
||||
{{- if ne $ . }}
|
||||
<meta property="og:see_also" content="{{ .Permalink }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .facebook_app_id }}
|
||||
<meta property="fb:app_id" content="{{ . }}">
|
||||
{{- else }}
|
||||
{{- with .facebook_admin }}
|
||||
<meta property="fb:admins" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with (.Param "social.fediverse_creator") }}
|
||||
<meta name="fediverse:creator" content="{{ . }}">
|
||||
{{- end }}
|
||||
+10
-6
@@ -6,7 +6,11 @@
|
||||
"name": {{ site.Title }},
|
||||
"url": {{ site.Home.Permalink }},
|
||||
"description": {{ site.Params.description | plainify | truncate 180 | safeHTML }},
|
||||
"thumbnailUrl": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
||||
{{- if (eq site.Params.schema.publisherType "Person") }}
|
||||
"image": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
||||
{{- else }}
|
||||
"logo": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
||||
{{- end }}
|
||||
"sameAs": [
|
||||
{{- if site.Params.schema.sameAs }}
|
||||
{{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
|
||||
@@ -22,7 +26,7 @@
|
||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||
{{- $bc_list := (split $lang_url "/")}}
|
||||
|
||||
{{- $scratch := newScratch }}
|
||||
{{- $path := "" }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
@@ -30,8 +34,8 @@
|
||||
"itemListElement": [
|
||||
{{- range $index, $element := $bc_list }}
|
||||
|
||||
{{- $scratch.Add "path" (printf "%s/" $element ) | safeJS }}
|
||||
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||
{{- $path = printf "%s%s/" $path $element }}
|
||||
{{- $bc_pg := site.GetPage $path -}}
|
||||
|
||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||
{{- if (and $index)}}, {{end }}
|
||||
@@ -72,7 +76,7 @@
|
||||
],
|
||||
"articleBody": {{ .Content | safeJS | htmlUnescape | plainify }},
|
||||
"wordCount" : "{{ .WordCount }}",
|
||||
"inLanguage": {{ .Language.Lang | default "en-us" }},
|
||||
"inLanguage": {{ .Language.Name | default "en-us" }},
|
||||
{{ if .Params.cover.image -}}
|
||||
"image":
|
||||
{{- if (ne .Params.cover.relative true) -}}
|
||||
@@ -81,7 +85,7 @@
|
||||
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
|
||||
{{- $images := partial "templates/_funcs/get-page-images" . -}}
|
||||
{{- with index $images 0 -}}
|
||||
"image": {{ .Permalink }},
|
||||
{{- end }}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{- if .Params.cover.image -}}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
{{- if (ne $.Params.cover.relative true) }}
|
||||
<meta name="twitter:image" content="{{ .Params.cover.image | absURL }}">
|
||||
{{- else }}
|
||||
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
{{- $images := partial "templates/_funcs/get-page-images" . }}
|
||||
{{- with index $images 0 }}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{{ .Permalink }}">
|
||||
{{- else }}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Title site.Title site.Params.title | plainify }}
|
||||
<meta name="twitter:title" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
|
||||
<meta name="twitter:description" content="{{ trim . "\n\r\t " }}">
|
||||
{{- end }}
|
||||
|
||||
{{- $twitterSite := "" }}
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .twitter }}
|
||||
{{- $content := . }}
|
||||
{{- if not (strings.HasPrefix . "@") }}
|
||||
{{- $content = printf "@%v" . }}
|
||||
{{- end }}
|
||||
<meta name="twitter:site" content="{{ $content }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,90 @@
|
||||
{{- $headers := findRE "<h[1-6].*?>(.|\n)+?</h[1-6]>" .Content -}}
|
||||
{{- $has_headers := ge (len $headers) 1 -}}
|
||||
{{- if $has_headers -}}
|
||||
<details class="toc" {{if (.Param "TocOpen") }} open{{ end }}>
|
||||
<summary accesskey="c" title="(Alt + C)">
|
||||
<span class="title">{{- i18n "toc" | default "Table of Contents" }}</span>
|
||||
</summary>
|
||||
|
||||
<div class="inner">
|
||||
{{- 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)) -}}
|
||||
|
||||
{{- $bareul := slice -}}
|
||||
<ul>
|
||||
{{- range seq (sub $firstHeaderLevel $largest) -}}
|
||||
<ul>
|
||||
{{- $bareul = $bareul | append (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 "<h[1-6].*?>((.|\n)+?)</h[1-6]>" "$1" $header | strings.TrimSpace -}}
|
||||
|
||||
{{- 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) -}}
|
||||
<ul>
|
||||
{{/* the first should not be recorded */}}
|
||||
{{- if ne $prevHeaderLevel . -}}
|
||||
{{- $bareul = $bareul | append . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
</li>
|
||||
{{- if lt $headerLevel $prevHeaderLevel -}}
|
||||
{{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
|
||||
{{- if in $bareul . -}}
|
||||
</ul>
|
||||
{{/* manually do pop item */}}
|
||||
{{- $bareul = first (sub (len $bareul) 1) $bareul -}}
|
||||
{{- else -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify | safeHTML -}}">{{- $header | plainify | safeHTML -}}</a>
|
||||
{{- else }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify | safeHTML -}}">{{- $header | plainify | safeHTML -}}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} -->
|
||||
{{- $firstHeaderLevel := $largest }}
|
||||
{{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }}
|
||||
</li>
|
||||
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
||||
{{- if in $bareul (add . $firstHeaderLevel) }}
|
||||
</ul>
|
||||
{{- else }}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</div>
|
||||
</details>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- if .IsTranslated -}}
|
||||
{{- if (ne .Layout "search") }}
|
||||
{{- if or (.Param "author") (.Param "ShowReadingTime") (not .Date.IsZero) }}
|
||||
{{- printf " | " | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<span>{{- i18n "translations" | default "Translations" }}:</span>
|
||||
<ul class="i18n_list">
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if (and site.Params.displayFullLangName (.Language.Label)) }}
|
||||
{{- .Language.Label | emojify -}}
|
||||
{{- else }}
|
||||
{{- .Lang | title -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,2 @@
|
||||
{{ $src := (.Get "src") }}
|
||||
<audio src="{{ $src }}" controls muted loading="lazy"></audio>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,13 +1,13 @@
|
||||
{{ $.Scratch.Set "md" false }}
|
||||
{{ $md := false }}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "md" (.Get "md") }}
|
||||
{{ $md = .Get "md" }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "md" (.Get 0) }}
|
||||
{{ $md = .Get 0 }}
|
||||
{{ end }}
|
||||
|
||||
<div dir="ltr">
|
||||
{{ if eq ($.Scratch.Get "md") false }}
|
||||
{{ if eq $md false }}
|
||||
{{ .Inner }}
|
||||
{{ else }}
|
||||
{{ .Inner | markdownify }}
|
||||
File renamed without changes.
@@ -1,13 +1,13 @@
|
||||
{{ $.Scratch.Set "md" false }}
|
||||
{{ $md := false }}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "md" (.Get "md") }}
|
||||
{{ $md = .Get "md" }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "md" (.Get 0) }}
|
||||
{{ $md = .Get 0 }}
|
||||
{{ end }}
|
||||
|
||||
<div dir="rtl">
|
||||
{{ if eq ($.Scratch.Get "md") false }}
|
||||
{{ if eq $md false }}
|
||||
{{ .Inner }}
|
||||
{{ else }}
|
||||
{{ .Inner | markdownify }}
|
||||
@@ -0,0 +1,2 @@
|
||||
{{ $src := (.Get "src") }}
|
||||
<video src="{{ $src }}" controls muted></video>
|
||||
File renamed without changes.
@@ -0,0 +1,31 @@
|
||||
{{- if lt hugo.Version "0.158.0" }}
|
||||
{{- errorf "=> hugo v0.158.0 or greater is required for hugo-PaperMod to build " }}
|
||||
{{- end -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
{{- $theme := site.Params.defaultTheme | default "auto" }}
|
||||
{{- if eq $theme "dark" }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.Direction | default "auto" }}" data-theme="dark">
|
||||
{{- else if eq $theme "light" }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.Direction | default "auto" }}" data-theme="light">
|
||||
{{- else }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.Direction | default "auto" }}" data-theme="auto">
|
||||
{{- end }}
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) }}
|
||||
<body class="list" id="top">
|
||||
{{- else }}
|
||||
<body id="top">
|
||||
{{- end }}
|
||||
{{ partialCached "header.html" . .Page -}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- $index := slice -}}
|
||||
{{- range site.RegularPages -}}
|
||||
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
|
||||
{{- $index = $index | append (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- $index | jsonify -}}
|
||||
@@ -31,7 +31,7 @@
|
||||
{{- end }}
|
||||
|
||||
{{- if .Content }}
|
||||
<div class="post-content">
|
||||
<div class="post-content md-content">
|
||||
{{- if not (.Param "disableAnchoredHeadings") }}
|
||||
{{- partial "anchored_headings.html" .Content -}}
|
||||
{{- else }}{{ .Content }}{{ end }}
|
||||
@@ -0,0 +1,41 @@
|
||||
{{- /* Recursive printer for sections */ -}}
|
||||
{{- define "llms_print_section" -}}
|
||||
{{- $section := .section -}}
|
||||
{{- $depth := .depth -}}
|
||||
{{- if or (gt (len $section.RegularPages) 0) (gt (len $section.Sections) 0) -}}
|
||||
{{- $hashes := strings.Repeat (add $depth 1) "#" }}
|
||||
|
||||
{{ printf "%s %s" $hashes $section.Title }}
|
||||
|
||||
{{- /* Pages in this section */ -}}
|
||||
{{- range $p := $section.RegularPages }}
|
||||
{{- if and (not $p.Params.searchHidden) (ne $p.Layout `archives`) (ne $p.Layout `search`) }}
|
||||
- [{{ $p.Title }}]({{ $p.Permalink }})
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Recurse into subsections */ -}}
|
||||
{{- range $s := $section.Sections -}}
|
||||
{{- template "llms_print_section" (dict "section" $s "depth" (add $depth 1)) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Main template starts here */ -}}
|
||||
# {{ site.Title }}
|
||||
|
||||
{{- /* Pages not in any section */ -}}
|
||||
{{- $orphans := where site.RegularPages "Section" "" -}}
|
||||
{{ if gt (len $orphans) 0 }}
|
||||
|
||||
{{- range $p := $orphans -}}
|
||||
{{ if and (not $p.Params.searchHidden) (ne $p.Layout `archives`) (ne $p.Layout `search`) (not $p.IsHome) }}
|
||||
- [{{ $p.Title }}]({{ $p.Permalink }})
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- range site.Sections -}}
|
||||
{{- template "llms_print_section" (dict "section" . "depth" 1) -}}
|
||||
{{- end }}
|
||||
@@ -1,2 +0,0 @@
|
||||
{{- /* formats .Content headings by adding an anchor */ -}}
|
||||
{{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }}
|
||||
@@ -1,9 +0,0 @@
|
||||
{{- 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 -}}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||
<div class="breadcrumbs">
|
||||
{{- $url := replace .Parent.Permalink (printf "%s" site.Home.Permalink) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
||||
|
||||
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>
|
||||
{{- $scratch := newScratch }}
|
||||
{{- range $index, $element := split $lang_url "/" }}
|
||||
|
||||
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
||||
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||
|
||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
||||
{{- end }}
|
||||
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -1,43 +0,0 @@
|
||||
{{- with .cxt}} {{/* Apply proper context from dict */}}
|
||||
{{- if (and .Params.cover.image (not $.isHidden)) }}
|
||||
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
|
||||
{{- $loading := cond $.IsSingle "eager" "lazy" }}
|
||||
<figure class="entry-cover">
|
||||
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
|
||||
{{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }}
|
||||
{{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- $cover := (or $pageBundleCover $globalResourcesCover)}}
|
||||
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
|
||||
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
|
||||
rel="noopener noreferrer">{{ 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)) }}
|
||||
<img loading="{{$loading}}" srcset="{{- range $size := $sizes -}}
|
||||
{{- if (ge $cover.Width $size) -}}
|
||||
{{ printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw ," $size) -}}
|
||||
{{ end }}
|
||||
{{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
|
||||
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
|
||||
width="{{ $cover.Width }}" height="{{ $cover.Height }}">
|
||||
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
|
||||
<img loading="{{$loading}}" src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
{{- else }}{{/* For absolute urls and external links, no img processing here */}}
|
||||
{{- if $addLink }}<a href="{{ (.Params.cover.image) | absURL }}" target="_blank"
|
||||
rel="noopener noreferrer">{{ end -}}
|
||||
<img loading="{{$loading}}" src="{{ (.Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
{{- if $addLink }}</a>{{ end -}}
|
||||
{{/* Display Caption */}}
|
||||
{{- if $.IsSingle }}
|
||||
{{ with .Params.cover.caption }}<p>{{ . | markdownify }}</p>{{- end }}
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{- end }}{{/* End image */}}
|
||||
{{- end -}}{{/* End context */ -}}
|
||||
@@ -1,8 +0,0 @@
|
||||
{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
|
||||
{{- $fileUrlPath := path.Join .File.Path }}
|
||||
|
||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
||||
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
|
||||
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
@@ -1,23 +0,0 @@
|
||||
{{- $scratch := newScratch }}
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowReadingTime") -}}
|
||||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowWordCount") -}}
|
||||
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if not (.Param "hideAuthor") -}}
|
||||
{{- with (partial "author.html" .) }}
|
||||
{{- $scratch.Add "meta" (slice .) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with ($scratch.Get "meta") }}
|
||||
{{- delimit . " · " | safeHTML -}}
|
||||
{{- end -}}
|
||||
@@ -1,59 +0,0 @@
|
||||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
{{- if .Params.cover.image -}}
|
||||
{{- if (ne .Params.cover.relative true) }}
|
||||
<meta property="og:image" content="{{ .Params.cover.image | absURL }}" />
|
||||
{{- else}}
|
||||
<meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" />
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
|
||||
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
|
||||
{{- range first 6 $images }}
|
||||
<meta property="og:image" content="{{ .Permalink }}" />
|
||||
{{ end -}}
|
||||
{{- end }}
|
||||
|
||||
{{- if .IsPage }}
|
||||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||
<meta property="article:section" content="{{ .Section }}" />
|
||||
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
|
||||
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
|
||||
{{- with site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
|
||||
{{- with .Params.videos }}{{- range . }}
|
||||
<meta property="og:video" content="{{ . | absURL }}" />
|
||||
{{ end }}{{ end }}
|
||||
|
||||
{{- /* If it is part of a series, link to related articles */}}
|
||||
{{- $permalink := .Permalink }}
|
||||
{{- $siteSeries := site.Taxonomies.series }}
|
||||
{{- if $siteSeries }}
|
||||
{{ with .Params.series }}{{- range $name := . }}
|
||||
{{- $series := index $siteSeries ($name | urlize) }}
|
||||
{{- range $page := first 6 $series.Pages }}
|
||||
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
|
||||
{{- end }}
|
||||
{{ end }}{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
|
||||
{{- $facebookAdmin := "" }}
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- $facebookAdmin = .facebook_admin }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Social.facebook_admin }}
|
||||
{{- $facebookAdmin = . }}
|
||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
||||
{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
||||
@@ -1,38 +0,0 @@
|
||||
{{- if .Params.cover.image -}}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
{{- if (ne $.Params.cover.relative true) }}
|
||||
<meta name="twitter:image" content="{{ .Params.cover.image | absURL }}" />
|
||||
{{- else }}
|
||||
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" />
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
|
||||
{{- with index $images 0 -}}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:image" content="{{ .Permalink }}" />
|
||||
{{- else -}}
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<meta name="twitter:title" content="{{ .Title }}"/>
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
||||
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
|
||||
{{- $twitterSite := "" }}
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- $twitterSite = .twitter }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Social.twitter }}
|
||||
{{- $twitterSite = . }}
|
||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with $twitterSite }}
|
||||
{{- $content := . }}
|
||||
{{- if not (strings.HasPrefix . "@") }}
|
||||
{{- $content = printf "@%v" $twitterSite }}
|
||||
{{- end }}
|
||||
<meta name="twitter:site" content="{{ $content }}"/>
|
||||
{{- end }}
|
||||
@@ -1,97 +0,0 @@
|
||||
{{- $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content -}}
|
||||
{{- $has_headers := ge (len $headers) 1 -}}
|
||||
{{- if $has_headers -}}
|
||||
<div class="toc">
|
||||
<details {{if (.Param "TocOpen") }} open{{ end }}>
|
||||
<summary accesskey="c" title="(Alt + C)">
|
||||
<span class="details">{{- i18n "toc" | default "Table of Contents" }}</span>
|
||||
</summary>
|
||||
|
||||
<div class="inner">
|
||||
{{- 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 -}}
|
||||
<ul>
|
||||
{{- range seq (sub $firstHeaderLevel $largest) -}}
|
||||
<ul>
|
||||
{{- $.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 "<h[1-6].*?>((.|\n])+?)</h[1-6]>" "$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) -}}
|
||||
<ul>
|
||||
{{/* the first should not be recorded */}}
|
||||
{{- if ne $prevHeaderLevel . -}}
|
||||
{{- $.Scratch.Add "bareul" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
</li>
|
||||
{{- if lt $headerLevel $prevHeaderLevel -}}
|
||||
{{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
|
||||
{{- if in ($.Scratch.Get "bareul") . -}}
|
||||
</ul>
|
||||
{{/* 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 -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify | safeHTML -}}">{{- $header | plainify | safeHTML -}}</a>
|
||||
{{- else }}
|
||||
<li>
|
||||
<a href="#{{- $cleanedID -}}" aria-label="{{- $header | plainify | safeHTML -}}">{{- $header | plainify | safeHTML -}}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<!-- {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} -->
|
||||
{{- $firstHeaderLevel := $largest }}
|
||||
{{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }}
|
||||
</li>
|
||||
{{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
|
||||
{{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }}
|
||||
</ul>
|
||||
{{- else }}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if .IsTranslated -}}
|
||||
{{- if (ne .Layout "search") }}
|
||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||
{{- end }}
|
||||
{{- i18n "translations" | default "Translations" }}:
|
||||
<ul class="i18n_list">
|
||||
{{- range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||
{{- .Language.LanguageName | emojify -}}
|
||||
{{- else }}
|
||||
{{- .Lang | title -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
@@ -1,4 +1,3 @@
|
||||
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
||||
{{- $authorEmail := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
@@ -6,14 +5,8 @@
|
||||
{{- $authorEmail = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||
{{- $authorName := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
@@ -23,11 +16,6 @@
|
||||
{{- else }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.name }}
|
||||
{{- $authorName = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $pctx := . }}
|
||||
@@ -38,6 +26,7 @@
|
||||
{{- else }}
|
||||
{{- $pages = $pctx.Pages }}
|
||||
{{- end }}
|
||||
{{- $pages = where $pages "Params.hiddenInRss" "!=" true -}}
|
||||
{{- $limit := site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $pages = $pages | first $limit }}
|
||||
@@ -55,8 +44,8 @@
|
||||
<link>{{ index . 0 | absURL }}</link>
|
||||
</image>
|
||||
{{- end }}
|
||||
<generator>Hugo -- {{ hugo.Version }}</generator>
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
||||
<generator>Hugo</generator>
|
||||
<language>{{ site.Language.Locale }}</language>{{ with $authorEmail }}
|
||||
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
||||
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
|
||||
<copyright>{{ . | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
@@ -20,10 +20,10 @@
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
<div id="searchbox">
|
||||
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s ↵" .Title) }}"
|
||||
<div id="searchbox" class="searchbox">
|
||||
<input id="searchInput" disabled placeholder="{{ .Params.placeholder | default (printf "%s ↵" .Title) }}"
|
||||
aria-label="search" type="search" autocomplete="off" maxlength="64">
|
||||
<ul id="searchResults" aria-label="search results"></ul>
|
||||
<ul id="searchResults" class="searchResults" aria-label="search results"></ul>
|
||||
</div>
|
||||
|
||||
{{- end }}{{/* end main */}}
|
||||
@@ -35,13 +35,15 @@
|
||||
{{- end }}
|
||||
|
||||
{{- if .Content }}
|
||||
<div class="post-content">
|
||||
<div class="post-content md-content">
|
||||
{{- if not (.Param "disableAnchoredHeadings") }}
|
||||
{{- partial "anchored_headings.html" .Content -}}
|
||||
{{- else }}{{ .Content }}{{ end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- partial "extend_post_content.html" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
|
||||
<ul class="post-tags">
|
||||
@@ -0,0 +1,27 @@
|
||||
{{- define "main" }}
|
||||
|
||||
{{- if .Title }}
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- if .Description }}
|
||||
<div class="post-description">
|
||||
{{ .Description }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
{{- end }}
|
||||
|
||||
<ul class="terms-tags">
|
||||
{{- $type := .Type }}
|
||||
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{- $name := .Name }}
|
||||
{{- $count := .Count }}
|
||||
{{- with site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
{{- end }}{{/* end main */ -}}
|
||||
+27
-10
@@ -5,17 +5,21 @@ 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/"
|
||||
homepage = "https://github.com/adityatelange/hugo-PaperMod/"
|
||||
demosite = "https://adityatelange.github.io/hugo-PaperMod/"
|
||||
tags = [
|
||||
"responsive",
|
||||
"simple",
|
||||
"blog",
|
||||
"clean",
|
||||
"minimal",
|
||||
"light",
|
||||
"dark",
|
||||
"blog",
|
||||
"minimalist",
|
||||
"highlight.js",
|
||||
"search"
|
||||
"fast",
|
||||
"multilingual",
|
||||
"search",
|
||||
"seo",
|
||||
"chroma",
|
||||
"personal"
|
||||
]
|
||||
features = [
|
||||
"responsive",
|
||||
@@ -24,7 +28,7 @@ features = [
|
||||
"cover-image",
|
||||
"table-of-contents",
|
||||
"opengraph",
|
||||
"highlight.js",
|
||||
"twitter-cards",
|
||||
"favicon",
|
||||
"archive",
|
||||
"share-icons",
|
||||
@@ -35,13 +39,26 @@ features = [
|
||||
"theme-toggle",
|
||||
"menu-location-indicator",
|
||||
"scroll-to-top",
|
||||
"search"
|
||||
"search",
|
||||
"breadcrumbs",
|
||||
"reading-time",
|
||||
"word-count",
|
||||
"code-copy",
|
||||
"comments",
|
||||
"edit-post",
|
||||
"canonical-link",
|
||||
"profile-mode",
|
||||
"home-info-mode",
|
||||
"related-posts",
|
||||
"rss",
|
||||
"multiple-authors",
|
||||
"post-nav-links"
|
||||
]
|
||||
min_version = "0.112.4"
|
||||
min_version = "0.158.0"
|
||||
|
||||
[author]
|
||||
name = "Aditya Telange"
|
||||
homepage = "https://github.com/adityatelange/"
|
||||
homepage = "https://github.com/adityatelange"
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
|
||||
Reference in new issue
Block a user