Merge base to develop

This commit is contained in:
Daniil Krymov 2022-01-15 20:31:58 +04:00
commit b65fe6de6b
No known key found for this signature in database
GPG Key ID: 49FF57C32BD36752
51 changed files with 743 additions and 337 deletions

View File

@ -26,7 +26,7 @@ Please fill the template below
- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- Hugo Version [ >=0.82.0 expected]:
- Hugo Version [ >=0.83.0 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:**

View File

@ -37,7 +37,8 @@ is closed automatically when this PR is merged.
- [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-).
- [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [ ] This change **does not** any CDN resources/links.
- [ ] This change **does not** include any CDN resources/links.
- [ ] This change **does not** include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository.

View File

@ -26,7 +26,7 @@ jobs:
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
hugo-version: '0.83.0'
- name: Build
run: hugo --buildDrafts --gc --verbose --minify

View File

@ -30,7 +30,7 @@ jobs:
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
hugo-version: '0.83.0'
- name: Build
run: hugo --buildDrafts --gc --verbose --minify

View File

@ -4,16 +4,16 @@
<br>
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper).
> The goal of this project is to add more Features and customization to the og theme.
> The goal of this project is to add more features and customization to the og theme.
The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with few more stuff. Make sure you visit it, to get the awesome hands-on experience and get known about the features ...
The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with a few more stuff. Make sure you visit it, to get an awesome hands-on experience and get to know about the features ...
**ExampleSite** can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source.
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.82.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.82.0)
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.83.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.83.0)
[![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)](https://github.com/adityatelange/hugo-PaperMod/deployments/activity_log?environment=github-pages)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/)
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod)
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)
@ -35,19 +35,19 @@ The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of doc
- Table of Content Generation (newer implementation).
- Archive of posts.
- Social Icons (home-info and profile-mode)
- Social-Media Share buttons on post.
- 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.
- Muliple Author support.
- Multiple Author support.
- Search Page with Fuse.js
- Other Posts suggestion below a post
- BreadCrumb Navigation
- Breadcrumb Navigation
- Code Block Copy buttons
- No webpack, nodejs and other depedencies required to edit the theme.
- No webpack, nodejs and other dependencies are required to edit the theme.
Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**
@ -77,7 +77,7 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad
---
## [LightHouse Report (100% ?)](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F)
## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/)
---
@ -86,4 +86,5 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad
- [**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**

View File

@ -7,5 +7,5 @@
justify-content: center;
height: 80%;
font-size: 160px;
font-weight: 700
font-weight: 700;
}

View File

@ -1,44 +1,44 @@
.archive-posts {
width: 100%;
font-size: 16px
font-size: 16px;
}
.archive-year {
margin-top: 40px
margin-top: 40px;
}
.archive-year:not(:last-of-type) {
border-bottom: 2px solid var(--border)
border-bottom: 2px solid var(--border);
}
.archive-month {
display: flex;
align-items: flex-start;
padding: 10px 0
padding: 10px 0;
}
.archive-month-header {
margin: 25px 0;
width: 200px
width: 200px;
}
.archive-month:not(:last-of-type) {
border-bottom: 1px solid var(--border)
border-bottom: 1px solid var(--border);
}
.archive-entry {
position: relative;
padding: 5px;
margin: 10px 0
margin: 10px 0;
}
.archive-entry-title {
margin: 5px 0;
font-weight: 400
font-weight: 400;
}
.archive-count,
.archive-meta {
color: var(--secondary);
font-size: 14px
font-size: 14px;
}

View File

@ -1,7 +1,7 @@
.footer,
.top-link {
font-size: 12px;
color: var(--secondary)
color: var(--secondary);
}
.footer {
@ -9,12 +9,12 @@
margin: auto;
padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap);
text-align: center;
line-height: 24px
line-height: 24px;
}
.footer span {
margin-inline-start: 1px;
margin-inline-end: 1px
margin-inline-end: 1px;
}
.footer span:last-child {
@ -23,11 +23,11 @@
.footer a {
color: inherit;
border-bottom: 1px solid var(--secondary)
border-bottom: 1px solid var(--secondary);
}
.footer a:hover {
border-bottom: 1px solid var(--primary)
border-bottom: 1px solid var(--primary);
}
.top-link {
@ -41,7 +41,7 @@
height: 42px;
padding: 12px;
border-radius: 64px;
transition: visibility .5s, opacity .8s linear
transition: visibility 0.5s, opacity 0.8s linear;
}
.top-link,
@ -51,10 +51,10 @@
.footer a:hover,
.top-link:hover {
color: var(--primary)
color: var(--primary);
}
.top-link:focus,
#theme-toggle:focus {
outline: 0
outline: 0;
}

View File

@ -5,11 +5,11 @@
max-width: calc(var(--nav-width) + var(--gap) * 2);
margin-inline-start: auto;
margin-inline-end: auto;
line-height: var(--header-height)
line-height: var(--header-height);
}
.nav a {
display: block
display: block;
}
.logo,
@ -19,7 +19,7 @@
}
.logo {
flex-wrap: inherit
flex-wrap: inherit;
}
.logo a {
@ -33,7 +33,7 @@
pointer-events: none;
transform: translate(0, -10%);
border-radius: 6px;
margin-inline-end: 8px
margin-inline-end: 8px;
}
#theme-toggle svg {
@ -42,36 +42,36 @@
button#theme-toggle {
font-size: 26px;
margin: auto 4px
margin: auto 4px;
}
body.dark #moon {
vertical-align: middle;
display: none
display: none;
}
body:not(.dark) #sun {
display: none
display: none;
}
#menu {
list-style: none;
word-break: keep-all;
overflow-x: auto;
white-space: nowrap
white-space: nowrap;
}
#menu li + li {
margin-inline-start: var(--gap)
margin-inline-start: var(--gap);
}
#menu a {
font-size: 16px
font-size: 16px;
}
#menu .active {
font-weight: 500;
border-bottom: 2px solid currentColor
border-bottom: 2px solid currentColor;
}
.lang-switch li,
@ -83,7 +83,7 @@ body:not(.dark) #sun {
.lang-switch {
display: flex;
flex-wrap: inherit
flex-wrap: inherit;
}
.lang-switch a {
@ -93,5 +93,5 @@ body:not(.dark) #sun {
}
.logo-switches {
flex-wrap: inherit
flex-wrap: inherit;
}

View File

@ -3,15 +3,15 @@
min-height: calc(100vh - var(--header-height) - var(--footer-height));
max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto;
padding: var(--gap)
padding: var(--gap);
}
.page-header h1 {
font-size: 40px
font-size: 40px;
}
.pagination {
display: flex
display: flex;
}
.pagination a {
@ -20,31 +20,32 @@
line-height: 36px;
background: var(--primary);
border-radius: calc(36px / 2);
padding: 0 16px
padding: 0 16px;
}
.pagination .next {
margin-inline-start: auto
margin-inline-start: auto;
}
.social-icons {
padding: 12px 0
padding: 12px 0;
}
.social-icons a:not(:last-of-type) {
margin-inline-end: 12px
margin-inline-end: 12px;
}
.social-icons a svg {
height: 26px;
width: 26px
width: 26px;
}
code {
direction: ltr;
}
div.highlight, pre {
div.highlight,
pre {
position: relative;
}
@ -58,6 +59,7 @@ div.highlight, pre {
border-radius: var(--radius);
padding: 0 5px;
font-size: 14px;
user-select: none;
}
div.highlight:hover .copy-code,

View File

@ -4,33 +4,33 @@
flex-direction: column;
justify-content: center;
min-height: 320px;
margin: var(--gap) 0 calc(var(--gap) * 2) 0
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}
.first-entry .entry-header {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3
-webkit-line-clamp: 3;
}
.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3
line-height: 1.3;
}
.first-entry .entry-content {
margin: 14px 0;
font-size: 16px;
-webkit-line-clamp: 3
-webkit-line-clamp: 3;
}
.first-entry .entry-footer {
font-size: 14px
font-size: 14px;
}
.home-info .entry-content {
-webkit-line-clamp: unset
-webkit-line-clamp: unset;
}
.post-entry {
@ -39,20 +39,21 @@
padding: var(--gap);
background: var(--entry);
border-radius: var(--radius);
transition: transform .1s;
transition: transform 0.1s;
border: 1px solid var(--border);
}
.post-entry:active {
transform: scale(.96)
transform: scale(0.96);
}
.tag-entry .entry-cover {
display: none
display: none;
}
.entry-header h2 {
font-size: 24px
font-size: 24px;
line-height: 1.3;
}
.entry-content {
@ -63,12 +64,12 @@
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2
-webkit-line-clamp: 2;
}
.entry-footer {
color: var(--secondary);
font-size: 13px
font-size: 13px;
}
.entry-link {
@ -76,31 +77,28 @@
left: 0;
right: 0;
top: 0;
bottom: 0
bottom: 0;
}
.entry-cover,
.entry-isdraft {
font-size: 14px;
color: var(--secondary)
}
.entry-isdraft {
display: inline
color: var(--secondary);
}
.entry-cover {
margin-bottom: var(--gap);
text-align: center
text-align: center;
}
.entry-cover img {
border-radius: var(--radius);
pointer-events: none;
width: 100%
width: 100%;
height: auto;
}
.entry-cover a {
color: var(--secondary);
box-shadow: 0 1px 0 var(--primary)
box-shadow: 0 1px 0 var(--primary);
}

View File

@ -1,11 +1,11 @@
.page-header,
.post-header {
margin: 24px auto var(--content-gap) auto
margin: 24px auto var(--content-gap) auto;
}
.post-title {
margin-bottom: 2px;
font-size: 40px
font-size: 40px;
}
.post-description {
@ -18,14 +18,14 @@
color: var(--secondary);
font-size: 14px;
display: flex;
flex-wrap: wrap
flex-wrap: wrap;
}
.post-meta .i18n_list li {
display: inline-flex;
list-style: none;
margin: auto 3px;
box-shadow: 0 1px 0 var(--secondary)
box-shadow: 0 1px 0 var(--secondary);
}
.breadcrumbs a {
@ -33,56 +33,56 @@
}
.post-content {
color: var(--content)
color: var(--content);
}
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin: 24px 0 16px
margin: 24px 0 16px;
}
.post-content h1 {
margin: 40px auto 32px;
font-size: 40px
font-size: 40px;
}
.post-content h2 {
margin: 32px auto 24px;
font-size: 32px
font-size: 32px;
}
.post-content h3 {
font-size: 24px
font-size: 24px;
}
.post-content h4 {
font-size: 16px
font-size: 16px;
}
.post-content h5 {
font-size: 14px
font-size: 14px;
}
.post-content h6 {
font-size: 12px
font-size: 12px;
}
.post-content a,
.toc a:hover {
box-shadow: 0 1px 0
box-shadow: 0 1px 0;
}
.post-content a code {
margin: auto 0;
border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset
box-shadow: 0 -1px 0 var(--primary) inset;
}
.post-content del {
text-decoration: none;
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50%/1px 1px repeat-x
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50%/1px 1px repeat-x;
}
.post-content dl,
@ -90,46 +90,46 @@
.post-content p,
.post-content figure,
.post-content ul {
margin-bottom: var(--content-gap)
margin-bottom: var(--content-gap);
}
.post-content ol,
.post-content ul {
padding-inline-start: 20px
padding-inline-start: 20px;
}
.post-content li {
margin-top: 5px
margin-top: 5px;
}
.post-content li p {
margin-bottom: 0
margin-bottom: 0;
}
.post-content dl {
display: flex;
flex-wrap: wrap;
margin: 0
margin: 0;
}
.post-content dt {
width: 25%;
font-weight: 700
font-weight: 700;
}
.post-content dd {
width: 75%;
margin-inline-start: 0;
padding-inline-start: 10px
padding-inline-start: 10px;
}
.post-content dd ~ dd,
.post-content dt ~ dt {
margin-top: 10px
margin-top: 10px;
}
.post-content table {
margin-bottom: 32px
margin-bottom: 32px;
}
.post-content table th,
@ -137,81 +137,76 @@
min-width: 80px;
padding: 12px 8px;
line-height: 1.5;
border-bottom: 1px solid var(--border)
border-bottom: 1px solid var(--border);
}
.post-content table th {
font-size: 14px;
text-align: start
text-align: start;
}
.post-content table:not(.highlighttable) td code:only-child {
margin: auto 0
margin: auto 0;
}
.post-content .highlight table {
border-radius: var(--radius)
border-radius: var(--radius);
}
.post-content .highlight:not(table),
.post-content pre {
margin: 10px auto;
background: var(--hljs-bg) !important;
border-radius: var(--radius)
border-radius: var(--radius);
}
.post-content li > .highlight {
margin-inline-end: 0
margin-inline-end: 0;
}
.post-content ul pre {
margin-inline-start: calc(var(--gap) * -2)
margin-inline-start: calc(var(--gap) * -2);
}
.post-content .highlight pre {
margin: 0
margin: 0;
}
.post-content .highlighttable {
table-layout: fixed
table-layout: fixed;
}
.post-content .highlighttable td:first-child {
width: 40px
width: 40px;
}
.post-content .highlighttable td .linenodiv {
padding-inline-end: 0 !important
padding-inline-end: 0 !important;
}
.post-content .highlighttable td .highlight,
.post-content .highlighttable td .linenodiv pre {
margin-bottom: 0
margin-bottom: 0;
}
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
display: none
}
.post-content .highlight span {
background: 0 0 !important
display: none;
}
.post-content code {
margin: auto 4px;
padding: 4px 6px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: .78em;
font-size: 0.78em;
line-height: 1.5;
background: var(--code-bg);
border-radius: 2px
border-radius: 2px;
}
.post-content pre code {
display: block;
margin: auto 0;
padding: 10px;
color: rgba(255, 255, 255, .8);
color: rgb(213, 213, 214);
background: 0 0;
border-radius: 0;
overflow-x: auto;
@ -221,7 +216,7 @@
.post-content blockquote {
margin: 20px 0;
padding: 0 14px;
border-inline-start: 3px solid var(--primary)
border-inline-start: 3px solid var(--primary);
}
.post-content hr {
@ -229,19 +224,20 @@
height: 2px;
background: var(--tertiary);
border-top: 0;
border-bottom: 0
border-bottom: 0;
}
.post-content iframe {
max-width: 100%
max-width: 100%;
}
.post-content img {
border-radius: 4px
border-radius: 4px;
margin: 1rem 0;
}
.post-content img[src*='#center'] {
margin: auto
.post-content img[src*="#center"] {
margin: 1rem auto;
}
.post-content figure.align-center {
@ -266,7 +262,7 @@
border: 1px solid var(--border);
background: var(--code-bg);
border-radius: var(--radius);
padding: .4em
padding: 0.4em;
}
.dark .toc {
@ -275,39 +271,39 @@
.toc details summary {
cursor: zoom-in;
margin-inline-start: 20px
margin-inline-start: 20px;
}
.toc details[open] summary {
cursor: zoom-out
cursor: zoom-out;
}
.toc .details {
display: inline;
font-weight: 500
font-weight: 500;
}
.toc .inner {
margin: 0 20px;
padding: 10px 20px
padding: 10px 20px;
}
.toc li ul {
margin-inline-start: var(--gap)
margin-inline-start: var(--gap);
}
.toc summary:focus {
outline: 0
outline: 0;
}
.post-footer {
margin-top: 56px
margin-top: 56px;
}
.post-tags li {
display: inline-block;
margin-inline-end: 3px;
margin-bottom: 5px
margin-bottom: 5px;
}
.post-tags a,
@ -315,7 +311,7 @@
.paginav {
border-radius: var(--radius);
background: var(--code-bg);
border: 1px solid var(--border)
border: 1px solid var(--border);
}
.post-tags a {
@ -325,12 +321,12 @@
color: var(--secondary);
font-size: 14px;
line-height: 34px;
background: var(--code-bg)
background: var(--code-bg);
}
.post-tags a:hover,
.paginav a:hover {
background: var(--border)
background: var(--border);
}
.share-buttons {
@ -338,26 +334,26 @@
padding-inline-start: var(--radius);
display: flex;
justify-content: center;
overflow-x: auto
overflow-x: auto;
}
.share-buttons a {
margin-top: 10px
margin-top: 10px;
}
.share-buttons a:not(:last-of-type) {
margin-inline-end: 12px
margin-inline-end: 12px;
}
.share-buttons a svg {
height: 30px;
width: 30px;
fill: currentColor;
transition: transform .1s
transition: transform 0.1s;
}
.share-buttons svg:active {
transform: scale(.96)
transform: scale(0.96);
}
h1:hover .anchor,
@ -369,25 +365,26 @@ h6:hover .anchor {
display: inline-flex;
color: var(--secondary);
margin-inline-start: 8px;
font-weight: 500
font-weight: 500;
user-select: none;
}
.post-content :not(table) ::-webkit-scrollbar-thumb {
border: 2px solid var(--hljs-bg);
background: rgba(255, 255, 255, 0.32)
background: rgb(113, 113, 117);
}
.post-content :not(table) ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.56)
background: rgb(163, 163, 165);
}
.gist table::-webkit-scrollbar-thumb {
border: 2px solid rgb(255, 255, 255);
background: rgba(0, 0, 0, 0.32)
background: rgb(173, 173, 173);
}
.gist table::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.56)
background: rgb(112, 112, 112);
}
.post-content table::-webkit-scrollbar-thumb {

View File

@ -1,42 +1,39 @@
.buttons,
.main .profile {
display: flex;
justify-content: center
justify-content: center;
}
.main .profile {
position: absolute;
left: 0;
right: 0;
align-items: center;
height: 80%;
text-align: center
min-height: calc(100vh - var(--header-height) - var(--footer-height) - (var(--gap) * 2));
text-align: center;
}
.profile .profile_inner h1 {
padding: 12px 0
padding: 12px 0;
}
.profile .profile_inner span {
padding: 10px 0;
font-size: 18px
font-size: 18px;
}
.profile .profile_inner span a {
text-decoration: underline
text-decoration: underline;
}
.profile img {
display: inline-table;
border-radius: 50%;
pointer-events: none;
border: 3px #ffffff solid
border: 3px #ffffff solid;
}
.buttons {
flex-wrap: wrap;
max-width: 400px;
margin: 0 auto
margin: 0 auto;
}
.button {
@ -44,13 +41,13 @@
border-radius: var(--radius);
margin: 8px;
padding: 6px;
transition: transform .1s
transition: transform 0.1s;
}
.button-inner {
padding: 0 8px
padding: 0 8px;
}
.button:active {
transform: scale(.96)
transform: scale(0.96);
}

View File

@ -26,8 +26,8 @@
}
#searchResults li:active {
transition: transform .1s;
transform: scale(.98);
transition: transform 0.1s;
transform: scale(0.98);
}
#searchResults a {
@ -40,6 +40,6 @@
}
#searchResults .focus {
transform: scale(.98);
border: 2px solid var(--tertiary)
transform: scale(0.98);
border: 2px solid var(--tertiary);
}

View File

@ -1,7 +1,7 @@
.terms-tags li {
display: inline-block;
margin: 10px;
font-weight: 500
font-weight: 500;
}
.terms-tags a {
@ -9,10 +9,10 @@
padding: 3px 10px;
background: var(--tertiary);
border-radius: 6px;
transition: transform .1s
transition: transform 0.1s;
}
.terms-tags a:active {
background: var(--tertiary);
transform: scale(.96)
transform: scale(0.96);
}

View File

@ -1,7 +1,7 @@
*,
::after,
::before {
box-sizing: border-box
box-sizing: border-box;
}
html {
@ -18,7 +18,7 @@ h3,
h4,
h5,
h6 {
color: var(--primary)
color: var(--primary);
}
body {
@ -26,7 +26,7 @@ body {
font-size: 18px;
line-height: 1.6;
word-break: break-word;
background: var(--theme)
background: var(--theme);
}
article,
@ -40,7 +40,7 @@ main,
nav,
section,
table {
display: block
display: block;
}
h1,
@ -49,7 +49,7 @@ h3,
h4,
h5,
h6 {
line-height: 1.2
line-height: 1.2;
}
h1,
@ -60,21 +60,21 @@ h5,
h6,
p {
margin-top: 0;
margin-bottom: 0
margin-bottom: 0;
}
ul {
padding: 0
padding: 0;
}
a {
text-decoration: none
text-decoration: none;
}
body,
figure,
ul {
margin: 0
margin: 0;
}
table {
@ -82,7 +82,7 @@ table {
border-collapse: collapse;
border-spacing: 0;
overflow-x: auto;
word-break: keep-all
word-break: keep-all;
}
button,
@ -96,43 +96,43 @@ textarea {
input,
textarea {
outline: 0
outline: 0;
}
button,
input[type=button],
input[type=submit] {
cursor: pointer
cursor: pointer;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 50px var(--theme) inset
box-shadow: 0 0 0 50px var(--theme) inset;
}
img {
display: block;
max-width: 100%
max-width: 100%;
}
::-webkit-scrollbar-track {
background: 0 0
background: 0 0;
}
.list:not(.dark)::-webkit-scrollbar-track {
background: var(--code-bg)
background: var(--code-bg);
}
::-webkit-scrollbar-thumb {
background: var(--tertiary);
border: 5px solid var(--theme);
border-radius: var(--radius)
border-radius: var(--radius);
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border: 5px solid var(--code-bg)
border: 5px solid var(--code-bg);
}
::-webkit-scrollbar-thumb:hover {
background: var(--secondary)
background: var(--secondary);
}

View File

@ -6,27 +6,27 @@
--header-height: 60px;
--footer-height: 60px;
--radius: 8px;
--theme: #fff;
--entry: #fff;
--primary: rgba(0, 0, 0, 0.88);
--secondary: rgba(0, 0, 0, 0.56);
--tertiary: rgba(0, 0, 0, 0.16);
--content: rgba(0, 0, 0, 0.88);
--hljs-bg: #1c1d21;
--code-bg: #f5f5f5;
--border: #eee;
--theme: rgb(255, 255, 255);
--entry: rgb(255, 255, 255);
--primary: rgb(30, 30, 30);
--secondary: rgb(108, 108, 108);
--tertiary: rgb(214, 214, 214);
--content: rgb(31, 31, 31);
--hljs-bg: rgb(28, 29, 33);
--code-bg: rgb(245, 245, 245);
--border: rgb(238, 238, 238);
}
.dark {
--theme: #1d1e20;
--entry: #2e2e33;
--primary: rgba(255, 255, 255, 0.84);
--secondary: rgba(255, 255, 255, 0.56);
--tertiary: rgba(255, 255, 255, 0.16);
--content: rgba(255, 255, 255, 0.74);
--hljs-bg: #2e2e33;
--code-bg: #37383e;
--border: #333;
--theme: rgb(29, 30, 32);
--entry: rgb(46, 46, 51);
--primary: rgb(218, 218, 219);
--secondary: rgb(155, 156, 157);
--tertiary: rgb(65, 66, 68);
--content: rgb(196, 196, 197);
--hljs-bg: rgb(46, 46, 51);
--code-bg: rgb(55, 56, 62);
--border: rgb(51, 51, 51);
}
.list {

View File

@ -22,6 +22,11 @@
.archive-year {
margin-top: 20px;
}
/* footer */
.footer {
padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap);
}
}
@media screen and (min-width: 768px) {

View File

@ -1,6 +1,6 @@
.hljs-comment,
.hljs-quote {
color: #b6b18b
color: #b6b18b;
}
.hljs-deletion,
@ -11,7 +11,7 @@
.hljs-tag,
.hljs-template-variable,
.hljs-variable {
color: #eb3c54
color: #eb3c54;
}
.hljs-built_in,
@ -22,28 +22,28 @@
.hljs-number,
.hljs-params,
.hljs-type {
color: #e7ce56
color: #e7ce56;
}
.hljs-attribute {
color: #ee7c2b
color: #ee7c2b;
}
.hljs-addition,
.hljs-bullet,
.hljs-string,
.hljs-symbol {
color: #4fb4d7
color: #4fb4d7;
}
.hljs-section,
.hljs-title {
color: #78bb65
color: #78bb65;
}
.hljs-keyword,
.hljs-selector-tag {
color: #b45ea4
color: #b45ea4;
}
.hljs {
@ -51,13 +51,13 @@
overflow-x: auto;
background: #1c1d21;
color: #c0c5ce;
padding: .5em
padding: .5em;
}
.hljs-emphasis {
font-style: italic
font-style: italic;
}
.hljs-strong {
font-weight: 700
font-weight: 700;
}

View File

@ -26,7 +26,21 @@ window.onload = function () {
'content'
]
};
if (params.fuseOpts) options = params.fuseOpts;
if (params.fuseOpts) {
options = {
isCaseSensitive: params.fuseOpts.iscasesensitive ? params.fuseOpts.iscasesensitive : false,
includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false,
includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false,
minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1,
shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true,
findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false,
keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'],
location: params.fuseOpts.location ? params.fuseOpts.location : 0,
threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4,
distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100,
ignoreLocation: params.fuseOpts.ignorelocation ? params.fuseOpts.ignorelocation : true
}
}
fuse = new Fuse(data, options); // build the index from the json file
}
} else {
@ -103,31 +117,31 @@ document.onkeydown = function (e) {
}
} else if (current_elem) ae = current_elem;
if (key === "ArrowDown" && resultsAvailable && inbox) {
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) {
} else if (ae.parentElement != last) {
// if the currently focused element's parent is last, do nothing
} else {
// otherwise select the next search result
activeToggle(ae.parentElement.nextSibling.lastChild);
}
} else if (key === "ArrowUp" && resultsAvailable && inbox) {
} else if (key === "ArrowUp") {
e.preventDefault();
if (ae == sInput) {
// if the currently focused element is input box, do nothing
} else if (ae.parentElement == first) {
if (ae.parentElement == first) {
// if the currently focused element is first item, go to input box
activeToggle(sInput);
} else {
} 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" && resultsAvailable && inbox) {
} else if (key === "ArrowRight") {
ae.click(); // click on active link
} else if (key === "Escape") {
reset()
}
}

28
i18n/bn.yaml Normal file
View File

@ -0,0 +1,28 @@
- id: prev_page
translation: "পূর্বের পাতা"
- id: next_page
translation: "পরবর্তী পাতা"
- id: read_time
translation:
one : "১ মিনিট"
other: "{{ .Count }} মিনিট"
- id: toc
translation: "সূচিপত্র"
- id: translations
translation: "অনুবাদসমূহ"
- id: home
translation: "হোম"
- id: edit_post
translation: "সম্পাদনা করুন"
- id: code_copy
translation: "কপি করুন"
- id: code_copied
translation: "কপি হয়েছে!"

25
i18n/ckb.yaml Normal file
View File

@ -0,0 +1,25 @@
- id: prev_page
translation: "پەڕەی پێشتر"
- id: next_page
translation: "پەڕەی دواتر"
- id: read_time
translation:
one : "1 خولەک"
other: "{{ .Count }} خولەک"
- id: toc
translation: "پێڕست"
- id: translations
translation: "وەرگێڕانەکان"
- id: home
translation: "ماڵەوە"
- id: code_copy
translation: "لەبەری بگرەوە"
- id: code_copied
translation: "لەبەر گیرایەوە!"

28
i18n/da.yaml Normal file
View File

@ -0,0 +1,28 @@
- id: prev_page
translation: "Forrige Side"
- id: next_page
translation: "Næste Side"
- id: read_time
translation:
one: "1 min"
other: "{{ .Count }} min"
- id: toc
translation: "Indholdsfortegnelse"
- id: translations
translation: "Oversættelser"
- id: home
translation: "Start"
- id: edit_post
translation: "Rediger"
- id: code_copy
translation: "kopier"
- id: code_copied
translation: "kopieret!"

View File

@ -6,8 +6,8 @@
- id: read_time
translation:
one: "1 min"
other: "{{ .Count }} min"
one: "1 Minute"
other: "{{ .Count }} Minuten"
- id: toc
translation: "Inhaltsverzeichnis"
@ -15,5 +15,14 @@
- id: translations
translation: "Übersetzungen"
- id: home
translation: "Home"
- id: edit_post
translation: "Bearbeiten"
- id: code_copy
translation: "Kopieren"
- id: code_copied
translation: "Kopiert!"

View File

@ -18,6 +18,9 @@
- id: home
translation: "Home"
- id: edit_post
translation: "Edit"
- id: code_copy
translation: "copy"

View File

@ -14,3 +14,15 @@
- id: translations
translation: "Traducciones"
- id: home
translation: "Inicio"
- id: edit_post
translation: "Editar"
- id: code_copy
translation: "copiar"
- id: code_copied
translation: "¡copiado!"

View File

@ -1,16 +1,28 @@
- id: prev_page
translation: "صفحهٔ قبل"
translation: "صفحه قبلی"
- id: next_page
translation: "صفحهٔ بعد"
translation: "صفحه بعدی"
- id: read_time
translation:
one : "1 دقیقه"
one: "۱ دقیقه"
other: "{{ .Count }} دقیقه"
- id: toc
translation: "فهرست مطالب"
- id: translations
translation: "ترجمه‌ها"
translation: "ترجمه ها"
- id: home
translation: "خانه"
- id: edit_post
translation: "ویرایش"
- id: code_copy
translation: "کپی"
- id: code_copied
translation: "کپی شد!"

View File

@ -3,3 +3,26 @@
- id: next_page
translation: "Page Suivante"
- id: read_time
translation:
one : "1 min"
other: "{{ .Count }} min"
- id: toc
translation: "Table des Matières"
- id: translations
translation: "Traductions"
- id: home
translation: "Accueil"
- id: edit_post
translation: "Modifier"
- id: code_copy
translation: "copier"
- id: code_copied
translation: "copié!"

View File

@ -14,3 +14,9 @@
- id: translations
translation: "Traduzioni"
- id: code_copy
translation: "copia"
- id: code_copied
translation: "copiato!"

View File

@ -3,3 +3,23 @@
- id: next_page
translation: "다음 페이지"
- id: read_time
translation:
one : "1 분"
other: "{{ .Count }} 분"
- id: toc
translation: "목차"
- id: translations
translation: "번역"
- id: home
translation: "홈페이지"
- id: code_copy
translation: "복사"
- id: code_copied
translation: "복사완료!"

25
i18n/ku.yaml Normal file
View File

@ -0,0 +1,25 @@
- id: prev_page
translation: "Rêpela Berê"
- id: next_page
translation: "Rûpela Bê"
- id: read_time
translation:
one : "1 xulek"
other: "{{ .Count }} xulek"
- id: toc
translation: "Pêrist"
- id: translations
translation: "Wergêranan"
- id: home
translation: "Xanî"
- id: code_copy
translation: "Jê bigre"
- id: code_copied
translation: "Hat jê girtin!"

28
i18n/nl.yaml Normal file
View File

@ -0,0 +1,28 @@
- id: prev_page
translation: "Vorige"
- id: next_page
translation: "Volgende"
- id: read_time
translation:
one: "1 min"
other: "{{ .Count }} min"
- id: toc
translation: "Inhoudsopgave"
- id: translations
translation: "Vertalingen"
- id: home
translation: "Startpagina"
- id: edit_post
translation: "Bewerk"
- id: code_copy
translation: "kopieer"
- id: code_copied
translation: "gekopieerd!"

25
i18n/zh-tw.yaml Normal file
View File

@ -0,0 +1,25 @@
- id: prev_page
translation: "上一篇"
- id: next_page
translation: "下一篇"
- id: read_time
translation:
one : "1 分鐘"
other: "{{ .Count }} 分鐘"
- id: toc
translation: "目錄"
- id: translations
translation: "語言"
- id: home
translation: "首頁"
- id: code_copy
translation: "複製"
- id: code_copied
translation: "已複製!"

View File

@ -14,3 +14,12 @@
- id: translations
translation: "语言"
- id: home
translation: "主页"
- id: code_copy
translation: "复制"
- id: code_copied
translation: "已复制!"

View File

@ -10,6 +10,11 @@
</header>
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- if .Site.Params.ShowAllPagesInArchive }}
{{- $pages = site.RegularPages }}
{{- end }}
{{- range $pages.GroupByPublishDate "2006" }}
{{- if ne .Key "0001" }}
<div class="archive-year">
@ -25,6 +30,7 @@
<div class="archive-entry">
<h3 class="archive-entry-title">
{{- .Title | markdownify }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h3>
<div class="archive-meta">
{{- partial "post_meta.html" . -}}

View File

@ -17,7 +17,7 @@
<main class="main">
{{- block "main" . }}{{ end }}
</main>
{{ partialCached "footer.html" . .Layout .Kind -}}
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
</body>
</html>

View File

@ -10,12 +10,20 @@
<h1>{{ .Title }}</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
{{ .Description | markdownify }}
</div>
{{- end }}
</header>
{{- end }}
{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}
{{- $pages := union .RegularPages .Sections }}
{{- if .IsHome }}
@ -46,7 +54,7 @@
<header class="entry-header">
<h2>
{{- .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{ end -}}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h2>
</header>
{{- if (ne (.Param "hideSummary") true) }}

View File

@ -1,7 +1,7 @@
{{- define "main" }}
<header class="page-header">
<h1>{{ .Title }}&nbsp;
<h1>{{- (printf "%s&nbsp;" .Title ) | htmlUnescape -}}
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
@ -21,7 +21,8 @@
</header>
<div id="searchbox">
<input id="searchInput" autofocus placeholder="{{ .Title }} ↵" aria-label="search" type="search">
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}"
aria-label="search" type="search" autocomplete="off">
<ul id="searchResults" aria-label="search results"></ul>
</div>

View File

@ -5,7 +5,7 @@
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
@ -17,6 +17,7 @@
{{- partial "post_meta.html" . -}}
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
{{- end }}
</header>
@ -25,9 +26,15 @@
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}
<footer class="post-footer">
{{- if .Params.tags }}
<ul class="post-tags">

View File

@ -2,21 +2,26 @@
{{- if (and .Params.cover.image (not $.isHidden)) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
<figure class="entry-cover">
{{- $responsiveImages := (.Params.cover.responsiveImages | default .Site.Params.cover.responsiveImages) | default true }}
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}
{{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- 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") }}
{{- $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) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }}
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
<img loading="lazy" 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 }}" />
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="lazy" src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
{{- end }}

View File

@ -1,3 +1,4 @@
{{- if not (.Param "hideFooter") }}
<footer class="footer">
{{- if .Site.Copyright }}
<span>{{ .Site.Copyright | markdownify }}</span>
@ -12,14 +13,13 @@
</span>
{{- end }}
</footer>
{{- end }}
{{- if (not .Site.Params.disableScrollToTop) }}
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)">
<button class="top-link" id="top-link" type="button" accesskey="g">
<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" />
</svg>
</button>
</a>
{{- end }}
@ -27,10 +27,12 @@
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
@ -84,7 +86,7 @@
</script>
{{- end }}
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Site.Params.ShowCodeCopyButtons)) }}
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
<script>
document.querySelectorAll('pre > code').forEach((codeblock) => {
const container = codeblock.parentNode.parentNode;

View File

@ -18,7 +18,7 @@
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" />
{{- end }}
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if or .IsPage .IsSection}}
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
<meta name="author" content="{{ (partial "author.html" . ) }}">
@ -59,7 +59,7 @@
{{- end }}
{{- with .Site.Params.profileMode }}
{{- if and .enabled .imageUrl }}
{{- if and .enabled .imageUrl $.IsHome }}
<link rel="preload" href="{{ .imageUrl }}" as="image">
{{- end }}
{{- end }}
@ -101,8 +101,8 @@
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ .Site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" href="{{ .Site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<meta name="theme-color" content="{{ .Site.Params.assets.theme_color | default "#2e2e33" }}">
<meta name="msapplication-TileColor" content="{{ .Site.Params.assets.msapplication_TileColor | default "#2e2e33" }}">
{{- /* Generator */}}
{{ hugo.Generator }}
@ -113,13 +113,53 @@
{{ end -}}
{{- range .AllTranslations -}}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
{{ end }}
{{ end -}}
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
{{- if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark")) }}
<style>
@media (prefers-color-scheme: dark) {
:root {
--theme: rgb(29, 30, 32);
--entry: rgb(46, 46, 51);
--primary: rgb(218, 218, 219);
--secondary: rgb(155, 156, 157);
--tertiary: rgb(65, 66, 68);
--content: rgb(196, 196, 197);
--hljs-bg: rgb(46, 46, 51);
--code-bg: rgb(55, 56, 62);
--border: rgb(51, 51, 51);
}
.list {
background: var(--theme);
}
.list:not(.dark)::-webkit-scrollbar-track {
background: 0 0;
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border-color: var(--theme);
}
}
</style>
{{- end }}
</noscript>
{{- partial "extend_head.html" . -}}
{{- /* Misc */}}
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
{{- template "_internal/google_analytics.html" . }}
{{- template "_internal/google_news.html" . }}
{{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }}
{{- template "partials/templates/schema_json.html" . }}

View File

@ -38,45 +38,6 @@
</script>
{{- end }}
<noscript>
<style type="text/css">
#theme-toggle,
.top-link {
display: none;
}
</style>
{{- if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark")) }}
<style>
@media (prefers-color-scheme: dark) {
:root {
--theme: #1d1e20;
--entry: #2e2e33;
--primary: rgba(255, 255, 255, 0.84);
--secondary: rgba(255, 255, 255, 0.56);
--tertiary: rgba(255, 255, 255, 0.16);
--content: rgba(255, 255, 255, 0.74);
--hljs-bg: #2e2e33;
--code-bg: #37383e;
--border: #333;
}
.list {
background: var(--theme);
}
.list:not(.dark)::-webkit-scrollbar-track {
background: 0 0;
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border-color: var(--theme);
}
}
</style>
{{- end }}
</noscript>
<header class="header">
<nav class="nav">
@ -85,7 +46,7 @@
{{- if .Site.Title }}
<a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)">
{{- if .Site.Params.label.icon }}
<img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo"
<img src="{{- .Site.Params.label.icon | absURL -}}" alt="logo" aria-label="logo"
height="{{- .Site.Params.label.iconHeight | default " 30px" -}}">
{{- end -}}
{{- $label_text -}}
@ -148,7 +109,9 @@
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{- .Pre }}
{{- .Name -}}
{{ .Post -}}
</span>
</a>
</li>

View File

@ -2,7 +2,7 @@
{{- with .Site.Params.profileMode }}
<div class="profile_inner">
{{- if .imageUrl -}}
<img src="{{ .imageUrl }}" alt="{{ .imageTitle | default "profile image" }}"
<img src="{{ .imageUrl | absURL }}" alt="{{ .imageTitle | default "profile image" }}"
height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" />
{{- end }}
<h1>{{ .title | default $.Site.Title | markdownify }}</h1>

View File

@ -0,0 +1,9 @@
{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}}
{{ $url := urls.Parse .Params.canonicalURL }}
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL .Site.Params.editPost.URL) }}&nbsp;|&nbsp;{{- end -}}
<span>
{{- (.Site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
&nbsp;<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" target="_blank" rel="noopener noreferrer">{{ $url.Host }}</a>
</span>
{{- end }}

View File

@ -1,11 +1,11 @@
{{- $scratch := newScratch }}
{{- if not .Date.IsZero -}}
{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }}
{{- $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 "%s min" .ReadingTime))) }}
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
{{- end }}
{{- with (partial "author.html" .) }}

View File

@ -4,12 +4,17 @@
{{- $.Scratch.Set "tags" ""}}
{{- with .Params.Tags }}
{{ $hashtags := newScratch}}
{{- $hashtags := newScratch}}
{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
{{- end -}}
{{- $custom := false }}
{{- $ShareButtons := (.Param "ShareButtons")}}
{{- with $ShareButtons }}{{ $custom = true }}{{ end }}
<div class="share-buttons">
{{- if (cond ($custom) (in $ShareButtons "twitter") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter"
href="https://twitter.com/intent/tweet/?text={{ $title }}&amp;url={{ $pageurl }}&amp;hashtags={{- $.Scratch.Get "tags" -}}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
@ -17,6 +22,8 @@
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-253.927,424.544c135.939,0 210.268,-112.643 210.268,-210.268c0,-3.218 0,-6.437 -0.153,-9.502c14.406,-10.421 26.973,-23.448 36.935,-38.314c-13.18,5.824 -27.433,9.809 -42.452,11.648c15.326,-9.196 26.973,-23.602 32.49,-40.92c-14.252,8.429 -30.038,14.56 -46.896,17.931c-13.487,-14.406 -32.644,-23.295 -53.946,-23.295c-40.767,0 -73.87,33.104 -73.87,73.87c0,5.824 0.613,11.494 1.992,16.858c-61.456,-3.065 -115.862,-32.49 -152.337,-77.241c-6.284,10.881 -9.962,23.601 -9.962,37.088c0,25.594 13.027,48.276 32.95,61.456c-12.107,-0.307 -23.448,-3.678 -33.41,-9.196l0,0.92c0,35.862 25.441,65.594 59.311,72.49c-6.13,1.686 -12.72,2.606 -19.464,2.606c-4.751,0 -9.348,-0.46 -13.946,-1.38c9.349,29.426 36.628,50.728 68.965,51.341c-25.287,19.771 -57.164,31.571 -91.8,31.571c-5.977,0 -11.801,-0.306 -17.625,-1.073c32.337,21.15 71.264,33.41 112.95,33.41Z" />
</svg>
</a>
{{- end }}
{{- if (cond ($custom) (in $ShareButtons "linkedin") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on linkedin"
href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ $pageurl }}&amp;title={{ $title }}&amp;summary={{ $title }}&amp;source={{ $pageurl }}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
@ -24,6 +31,8 @@
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-288.985,423.278l0,-225.717l-75.04,0l0,225.717l75.04,0Zm270.539,0l0,-129.439c0,-69.333 -37.018,-101.586 -86.381,-101.586c-39.804,0 -57.634,21.891 -67.617,37.266l0,-31.958l-75.021,0c0.995,21.181 0,225.717 0,225.717l75.02,0l0,-126.056c0,-6.748 0.486,-13.492 2.474,-18.315c5.414,-13.475 17.767,-27.434 38.494,-27.434c27.135,0 38.007,20.707 38.007,51.037l0,120.768l75.024,0Zm-307.552,-334.556c-25.674,0 -42.448,16.879 -42.448,39.002c0,21.658 16.264,39.002 41.455,39.002l0.484,0c26.165,0 42.452,-17.344 42.452,-39.002c-0.485,-22.092 -16.241,-38.954 -41.943,-39.002Z" />
</svg>
</a>
{{- end }}
{{- if (cond ($custom) (in $ShareButtons "reddit") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on reddit"
href="https://reddit.com/submit?url={{ $pageurl }}&title={{ $title }}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
@ -31,6 +40,8 @@
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-3.446,265.638c0,-22.964 -18.616,-41.58 -41.58,-41.58c-11.211,0 -21.361,4.457 -28.841,11.666c-28.424,-20.508 -67.586,-33.757 -111.204,-35.278l18.941,-89.121l61.884,13.157c0.756,15.734 13.642,28.29 29.56,28.29c16.407,0 29.706,-13.299 29.706,-29.701c0,-16.403 -13.299,-29.702 -29.706,-29.702c-11.666,0 -21.657,6.792 -26.515,16.578l-69.105,-14.69c-1.922,-0.418 -3.939,-0.042 -5.585,1.036c-1.658,1.073 -2.811,2.761 -3.224,4.686l-21.152,99.438c-44.258,1.228 -84.046,14.494 -112.837,35.232c-7.468,-7.164 -17.589,-11.591 -28.757,-11.591c-22.965,0 -41.585,18.616 -41.585,41.58c0,16.896 10.095,31.41 24.568,37.918c-0.639,4.135 -0.99,8.328 -0.99,12.576c0,63.977 74.469,115.836 166.33,115.836c91.861,0 166.334,-51.859 166.334,-115.836c0,-4.218 -0.347,-8.387 -0.977,-12.493c14.564,-6.47 24.735,-21.034 24.735,-38.001Zm-119.474,108.193c-20.27,20.241 -59.115,21.816 -70.534,21.816c-11.428,0 -50.277,-1.575 -70.522,-21.82c-3.007,-3.008 -3.007,-7.882 0,-10.889c3.003,-2.999 7.882,-3.003 10.885,0c12.777,12.781 40.11,17.317 59.637,17.317c19.522,0 46.86,-4.536 59.657,-17.321c3.016,-2.999 7.886,-2.995 10.885,0.008c3.008,3.011 3.003,7.882 -0.008,10.889Zm-5.23,-48.781c-16.373,0 -29.701,-13.324 -29.701,-29.698c0,-16.381 13.328,-29.714 29.701,-29.714c16.378,0 29.706,13.333 29.706,29.714c0,16.374 -13.328,29.698 -29.706,29.698Zm-160.386,-29.702c0,-16.381 13.328,-29.71 29.714,-29.71c16.369,0 29.689,13.329 29.689,29.71c0,16.373 -13.32,29.693 -29.689,29.693c-16.386,0 -29.714,-13.32 -29.714,-29.693Z" />
</svg>
</a>
{{- end }}
{{- if (cond ($custom) (in $ShareButtons "facebook") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on facebook"
href="https://facebook.com/sharer/sharer.php?u={{ $pageurl }}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
@ -38,6 +49,8 @@
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-106.468,0l0,-192.915l66.6,0l12.672,-82.621l-79.272,0l0,-53.617c0,-22.603 11.073,-44.636 46.58,-44.636l36.042,0l0,-70.34c0,0 -32.71,-5.582 -63.982,-5.582c-65.288,0 -107.96,39.569 -107.96,111.204l0,62.971l-72.573,0l0,82.621l72.573,0l0,192.915l-191.104,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Z" />
</svg>
</a>
{{- end }}
{{- if (cond ($custom) (in $ShareButtons "whatsapp") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on whatsapp"
href="https://api.whatsapp.com/send?text={{ $title }}%20-%20{{ $pageurl }}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve">
@ -45,6 +58,8 @@
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-58.673,127.703c-33.842,-33.881 -78.847,-52.548 -126.798,-52.568c-98.799,0 -179.21,80.405 -179.249,179.234c-0.013,31.593 8.241,62.428 23.927,89.612l-25.429,92.884l95.021,-24.925c26.181,14.28 55.659,21.807 85.658,21.816l0.074,0c98.789,0 179.206,-80.413 179.247,-179.243c0.018,-47.895 -18.61,-92.93 -52.451,-126.81Zm-126.797,275.782l-0.06,0c-26.734,-0.01 -52.954,-7.193 -75.828,-20.767l-5.441,-3.229l-56.386,14.792l15.05,-54.977l-3.542,-5.637c-14.913,-23.72 -22.791,-51.136 -22.779,-79.287c0.033,-82.142 66.867,-148.971 149.046,-148.971c39.793,0.014 77.199,15.531 105.329,43.692c28.128,28.16 43.609,65.592 43.594,105.4c-0.034,82.149 -66.866,148.983 -148.983,148.984Zm81.721,-111.581c-4.479,-2.242 -26.499,-13.075 -30.604,-14.571c-4.105,-1.495 -7.091,-2.241 -10.077,2.241c-2.986,4.483 -11.569,14.572 -14.182,17.562c-2.612,2.988 -5.225,3.364 -9.703,1.12c-4.479,-2.241 -18.91,-6.97 -36.017,-22.23c-13.314,-11.876 -22.304,-26.542 -24.916,-31.026c-2.612,-4.484 -0.279,-6.908 1.963,-9.14c2.016,-2.007 4.48,-5.232 6.719,-7.847c2.24,-2.615 2.986,-4.484 4.479,-7.472c1.493,-2.99 0.747,-5.604 -0.374,-7.846c-1.119,-2.241 -10.077,-24.288 -13.809,-33.256c-3.635,-8.733 -7.327,-7.55 -10.077,-7.688c-2.609,-0.13 -5.598,-0.158 -8.583,-0.158c-2.986,0 -7.839,1.121 -11.944,5.604c-4.105,4.484 -15.675,15.32 -15.675,37.364c0,22.046 16.048,43.342 18.287,46.332c2.24,2.99 31.582,48.227 76.511,67.627c10.685,4.615 19.028,7.371 25.533,9.434c10.728,3.41 20.492,2.929 28.209,1.775c8.605,-1.285 26.499,-10.833 30.231,-21.295c3.732,-10.464 3.732,-19.431 2.612,-21.298c-1.119,-1.869 -4.105,-2.99 -8.583,-5.232Z" />
</svg>
</a>
{{- end }}
{{- if (cond ($custom) (in $ShareButtons "telegram") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on telegram"
href="https://telegram.me/share/url?text={{ $title }}&amp;url={{ $pageurl }}">
<svg version="1.1" xml:space="preserve" viewBox="2 2 28 28">
@ -52,4 +67,5 @@
d="M26.49,29.86H5.5a3.37,3.37,0,0,1-2.47-1,3.35,3.35,0,0,1-1-2.47V5.48A3.36,3.36,0,0,1,3,3,3.37,3.37,0,0,1,5.5,2h21A3.38,3.38,0,0,1,29,3a3.36,3.36,0,0,1,1,2.46V26.37a3.35,3.35,0,0,1-1,2.47A3.38,3.38,0,0,1,26.49,29.86Zm-5.38-6.71a.79.79,0,0,0,.85-.66L24.73,9.24a.55.55,0,0,0-.18-.46.62.62,0,0,0-.41-.17q-.08,0-16.53,6.11a.59.59,0,0,0-.41.59.57.57,0,0,0,.43.52l4,1.24,1.61,4.83a.62.62,0,0,0,.63.43.56.56,0,0,0,.4-.17L16.54,20l4.09,3A.9.9,0,0,0,21.11,23.15ZM13.8,20.71l-1.21-4q8.72-5.55,8.78-5.55c.15,0,.23,0,.23.16a.18.18,0,0,1,0,.06s-2.51,2.3-7.52,6.8Z" />
</svg>
</a>
{{- end }}
</div>

View File

@ -91,6 +91,15 @@
-28 26 -27 27 65 66 65 66 -100 101 c-55 55 -100 99 -100 97z" />
</g>
</svg>
{{- else if (eq $icon_name "cv") -}}
<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">
<path
d="M4 4v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.342a2 2 0 0 0-.602-1.43l-4.44-4.342A2 2 0 0 0 13.56 2H6a2 2 0 0 0-2 2z" />
<path d="M9 13h6" />
<path d="M9 17h3" />
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
</svg>
{{- else if (eq $icon_name "dev") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
<path
@ -136,6 +145,11 @@
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 "flickr") -}}
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<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 "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">
@ -167,6 +181,17 @@
d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z">
</path>
</svg>
{{- else if (eq $icon_name "goodreads") -}}
<svg xmlns="http://www.w3.org/2000/svg" role="img" fill="currentColor" viewBox="0 0 24 24">
<path
d="M11.43 23.995c-3.608-.208-6.274-2.077-6.448-5.078.695.007 1.375-.013 2.07-.006.224 1.342 1.065 2.43 2.683 3.026 1.583.496 3.737.46 5.082-.174 1.351-.636 2.145-1.822 2.503-3.577.212-1.042.236-1.734.231-2.92l-.005-1.631h-.059c-1.245 2.564-3.315 3.53-5.59 3.475-5.74-.054-7.68-4.534-7.528-8.606.01-5.241 3.22-8.537 7.557-8.495 2.354-.14 4.605 1.362 5.554 3.37l.059.002.002-2.918 2.099.004-.002 15.717c-.193 7.04-4.376 7.89-8.209 7.811zm6.1-15.633c-.096-3.26-1.601-6.62-5.503-6.645-3.954-.017-5.625 3.592-5.604 6.85-.013 3.439 1.643 6.305 4.703 6.762 4.532.591 6.551-3.411 6.404-6.967z" />
</svg>
{{- else if (eq $icon_name "googlescholar") -}}
<svg role="img" viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path
d="M5.242 13.769L0 9.5 12 0l12 9.5-5.242 4.269C17.548 11.249 14.978 9.5 12 9.5c-2.977 0-5.548 1.748-6.758 4.269zM12 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14z" />
</svg>
{{- else if (eq $icon_name "hackerone") -}}
<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path
@ -234,6 +259,15 @@
<path
d="M10.599 17.211l-.881-2.393s-1.433 1.596-3.579 1.596c-1.9 0-3.249-1.652-3.249-4.296 0-3.385 1.708-4.596 3.388-4.596 2.418 0 3.184 1.568 3.845 3.578l.871 2.751c.871 2.672 2.523 4.818 7.285 4.818 3.41 0 5.722-1.045 5.722-3.801 0-2.227-1.276-3.383-3.635-3.935l-1.757-.384c-1.217-.274-1.577-.771-1.577-1.597 0-.936.736-1.487 1.952-1.487 1.323 0 2.028.495 2.147 1.679l2.749-.33c-.225-2.479-1.937-3.494-4.745-3.494-2.479 0-4.897.936-4.897 3.934 0 1.873.902 3.058 3.185 3.605l1.862.443c1.397.33 1.863.916 1.863 1.713 0 1.021-.992 1.441-2.869 1.441-2.779 0-3.936-1.457-4.597-3.469l-.901-2.75c-1.156-3.574-3.004-4.896-6.669-4.896C2.147 5.327 0 7.879 0 12.235c0 4.179 2.147 6.445 6.003 6.445 3.108 0 4.596-1.457 4.596-1.457v-.012z" />
</svg>
{{- else if (eq $icon_name "liberapay") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" fill="currentColor">
<g transform="translate(-78.37-208.06)">
<path
d="m104.28 271.1c-3.571 0-6.373-.466-8.41-1.396-2.037-.93-3.495-2.199-4.375-3.809-.88-1.609-1.308-3.457-1.282-5.544.025-2.086.313-4.311.868-6.675l9.579-40.05 11.69-1.81-10.484 43.44c-.202.905-.314 1.735-.339 2.489-.026.754.113 1.421.415 1.999.302.579.817 1.044 1.546 1.395.729.353 1.747.579 3.055.679l-2.263 9.278" />
<path
d="m146.52 246.14c0 3.671-.604 7.03-1.811 10.07-1.207 3.043-2.879 5.669-5.01 7.881-2.138 2.213-4.702 3.935-7.693 5.167-2.992 1.231-6.248 1.848-9.767 1.848-1.71 0-3.42-.151-5.129-.453l-3.394 13.651h-11.162l12.52-52.19c2.01-.603 4.311-1.143 6.901-1.622 2.589-.477 5.393-.716 8.41-.716 2.815 0 5.242.428 7.278 1.282 2.037.855 3.708 2.024 5.02 3.507 1.307 1.484 2.274 3.219 2.904 5.205.627 1.987.942 4.11.942 6.373m-27.378 15.461c.854.202 1.91.302 3.167.302 1.961 0 3.746-.364 5.355-1.094 1.609-.728 2.979-1.747 4.111-3.055 1.131-1.307 2.01-2.877 2.64-4.714.628-1.835.943-3.858.943-6.071 0-2.161-.479-3.998-1.433-5.506-.956-1.508-2.615-2.263-4.978-2.263-1.61 0-3.118.151-4.525.453l-5.28 21.948" />
</g>
</svg>
{{- else if (eq $icon_name "linkedin") -}}
<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">
@ -251,6 +285,11 @@
d="M17.832 8.633v5h-1.978V8.78c0-1.023-.43-1.542-1.29-1.542-.95 0-1.427.616-1.427 1.834v2.655H11.17V9.072c0-1.218-.476-1.834-1.427-1.834-.86 0-1.29.52-1.29 1.542v4.852H6.475V8.633c0-1.022.26-1.834.782-2.434.538-.6 1.243-.909 2.118-.909 1.012 0 1.779.39 2.286 1.169l.492.827.493-.827c.507-.78 1.274-1.169 2.286-1.169.875 0 1.58.308 2.118.909.522.6.782 1.412.782 2.434"
fill="currentColor" stroke="none" />
</svg>
{{- else if (eq $icon_name "matrix") -}}
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.433-.245.936-.365 1.5-.365.54 0 1.033.107 1.481.314.448.208.785.582 1.02 1.108.254-.374.6-.706 1.034-.992.434-.287.95-.43 1.546-.43.453 0 .872.056 1.26.167.388.11.716.286.993.53.276.245.489.559.646.951.152.392.23.863.23 1.417v5.728h-2.349V11.52c0-.286-.01-.559-.032-.812a1.755 1.755 0 0 0-.18-.66 1.106 1.106 0 0 0-.438-.448c-.194-.11-.457-.166-.785-.166-.332 0-.6.064-.803.189a1.38 1.38 0 0 0-.48.499 1.946 1.946 0 0 0-.231.696 5.56 5.56 0 0 0-.06.785v4.768h-2.35v-4.8c0-.254-.004-.503-.018-.752a2.074 2.074 0 0 0-.143-.688 1.052 1.052 0 0 0-.415-.503c-.194-.125-.476-.19-.854-.19-.111 0-.259.024-.439.074-.18.051-.36.143-.53.282-.171.138-.319.337-.439.595-.12.259-.18.6-.18 1.02v4.966H5.46V7.81zm15.693 15.64V.55H21.72V0H24v24h-2.28v-.55z" />
</svg>
{{- else if (eq $icon_name "medium") -}}
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke-width="2"
viewBox="0 0 76.000000 76.000000" preserveAspectRatio="xMidYMid meet">
@ -283,6 +322,18 @@
d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018"
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" />
</svg>
{{- else if (eq $icon_name "phone") -}}
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="9" y="4" width="6" height="1" rx="0.5" fill="currentColor"/>
<path d="M12 20C12.2652 20 12.5196 19.8946 12.7071 19.7071C12.8946 19.5196 13 19.2652 13 19C13 18.7348 12.8946 18.4804 12.7071 18.2929C12.5196 18.1054 12.2652 18 12 18C11.7348 18 11.4804 18.1054 11.2929 18.2929C11.1054 18.4804 11 18.7348 11 19C11 19.2652 11.1054 19.5196 11.2929 19.7071C11.4804 19.8946 11.7348 20 12 20Z" fill="currentColor"/>
<rect x="5" y="1" width="14" height="22" rx="2" stroke="currentColor" stroke-width="2"/>
</svg>
{{- else if (eq $icon_name "polywork") -}}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
fill="currentColor" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
<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 "qq") -}}
<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">
@ -295,6 +346,12 @@
<path
d="M24 11.779c0-1.459-1.192-2.645-2.657-2.645-.715 0-1.363.286-1.84.746-1.81-1.191-4.259-1.949-6.971-2.046l1.483-4.669 4.016.941-.006.058c0 1.193.975 2.163 2.174 2.163 1.198 0 2.172-.97 2.172-2.163s-.975-2.164-2.172-2.164c-.92 0-1.704.574-2.021 1.379l-4.329-1.015c-.189-.046-.381.063-.44.249l-1.654 5.207c-2.838.034-5.409.798-7.3 2.025-.474-.438-1.103-.712-1.799-.712-1.465 0-2.656 1.187-2.656 2.646 0 .97.533 1.811 1.317 2.271-.052.282-.086.567-.086.857 0 3.911 4.808 7.093 10.719 7.093s10.72-3.182 10.72-7.093c0-.274-.029-.544-.075-.81.832-.447 1.405-1.312 1.405-2.318zm-17.224 1.816c0-.868.71-1.575 1.582-1.575.872 0 1.581.707 1.581 1.575s-.709 1.574-1.581 1.574-1.582-.706-1.582-1.574zm9.061 4.669c-.797.793-2.048 1.179-3.824 1.179l-.013-.003-.013.003c-1.777 0-3.028-.386-3.824-1.179-.145-.144-.145-.379 0-.523.145-.145.381-.145.526 0 .65.647 1.729.961 3.298.961l.013.003.013-.003c1.569 0 2.648-.315 3.298-.962.145-.145.381-.144.526 0 .145.145.145.379 0 .524zm-.189-3.095c-.872 0-1.581-.706-1.581-1.574 0-.868.709-1.575 1.581-1.575s1.581.707 1.581 1.575-.709 1.574-1.581 1.574z" />
</svg>
{{- else if (eq $icon_name "researchgate") -}}
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path
d="M19.586 0c-.818 0-1.508.19-2.073.565-.563.377-.97.936-1.213 1.68a3.193 3.193 0 0 0-.112.437 8.365 8.365 0 0 0-.078.53 9 9 0 0 0-.05.727c-.01.282-.013.621-.013 1.016a31.121 31.123 0 0 0 .014 1.017 9 9 0 0 0 .05.727 7.946 7.946 0 0 0 .077.53h-.005a3.334 3.334 0 0 0 .113.438c.245.743.65 1.303 1.214 1.68.565.376 1.256.564 2.075.564.8 0 1.536-.213 2.105-.603.57-.39.94-.916 1.175-1.65.076-.235.135-.558.177-.93a10.9 10.9 0 0 0 .043-1.207v-.82c0-.095-.047-.142-.14-.142h-3.064c-.094 0-.14.047-.14.141v.956c0 .094.046.14.14.14h1.666c.056 0 .084.03.084.086 0 .36 0 .62-.036.865-.038.244-.1.447-.147.606-.108.385-.348.664-.638.876-.29.212-.738.35-1.227.35-.545 0-.901-.15-1.21-.353-.306-.203-.517-.454-.67-.915a3.136 3.136 0 0 1-.147-.762 17.366 17.367 0 0 1-.034-.656c-.01-.26-.014-.572-.014-.939a26.401 26.403 0 0 1 .014-.938 15.821 15.822 0 0 1 .035-.656 3.19 3.19 0 0 1 .148-.76 1.89 1.89 0 0 1 .742-1.01c.344-.244.593-.352 1.137-.352.508 0 .815.096 1.144.303.33.207.528.492.764.925.047.094.111.118.198.07l1.044-.43c.075-.048.09-.115.042-.199a3.549 3.549 0 0 0-.466-.742 3 3 0 0 0-.679-.607 3.313 3.313 0 0 0-.903-.41A4.068 4.068 0 0 0 19.586 0zM8.217 5.836c-1.69 0-3.036.086-4.297.086-1.146 0-2.291 0-3.007-.029v.831l1.088.2c.744.144 1.174.488 1.174 2.264v11.288c0 1.777-.43 2.12-1.174 2.263l-1.088.2v.832c.773-.029 2.12-.086 3.465-.086 1.29 0 2.951.057 3.667.086v-.831l-1.49-.2c-.773-.115-1.174-.487-1.174-2.264v-4.784c.688.057 1.29.057 2.206.057 1.748 3.123 3.41 5.472 4.355 6.56.86 1.032 2.177 1.691 3.839 1.691.487 0 1.003-.086 1.318-.23v-.744c-1.031 0-2.063-.716-2.808-1.518-1.26-1.376-2.95-3.582-4.355-6.074 2.32-.545 4.04-2.722 4.04-4.9 0-3.208-2.492-4.698-5.758-4.698zm-.515 1.29c2.406 0 3.839 1.26 3.839 3.552 0 2.263-1.547 3.782-4.097 3.782-.974 0-1.404-.03-2.063-.086v-7.19c.66-.059 1.547-.059 2.32-.059z" />
</svg>
{{- else if (eq $icon_name "rss") -}}
<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">
@ -302,6 +359,11 @@
<path d="M4 4a16 16 0 0 1 16 16" />
<circle cx="5" cy="19" r="1" />
</svg>
{{- else if (eq $icon_name "serverfault") -}}
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="M24 18.185v2.274h-4.89v-2.274H24zm-24-.106h11.505v2.274H0v-2.279.005zm12.89 0h4.89v2.274h-4.89v-2.279.005zm6.221-3.607H24v2.274h-4.89l.001-2.274zM0 14.367h11.505v2.274H0v-2.274zm12.89 0h4.89v2.274h-4.89v-2.274zm6.221-3.346H24v2.273h-4.89l.001-2.273zM0 10.916h11.505v2.271H0v-2.271zm12.89 0h4.89v2.271h-4.89v-2.271zm6.22-3.609H24v2.279h-4.89V7.307zM0 7.206h11.505V9.48H0V7.201v.005zm12.89 0h4.89V9.48h-4.89V7.201v.005zm6.221-3.556H24v2.276h-4.89v-2.28l.001.004zM0 3.541h11.505v2.274H0V3.541zm12.89 0h4.89v2.274h-4.89V3.541z" />
</svg>
{{- else if (eq $icon_name "soundcloud") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
<path
@ -350,6 +412,11 @@
d="M826 319 c-42 -33 -56 -71 -56 -149 0 -121 36 -170 125 -170 90 0 128 49 129 165 0 118 -43 175 -132 175 -25 0 -49 -8 -66 -21z m99 -63 c27 -19 34 -126 11 -161 -18 -27 -56 -34 -74 -12 -28 34 -26 142 4 172 19 19 35 19 59 1z" />
</g>
</svg>
{{- else if (eq $icon_name "spotify") -}}
<svg fill="currentColor" stoke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z" />
</svg>
{{- else if (eq $icon_name "stackoverflow") -}}
<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">
@ -385,6 +452,24 @@
d="M37.892,13.5h-4.486 l-1.143-3.306C31.707,8.581,30.189,7.5,28.483,7.5h-9.045c-1.706,0-3.224,1.081-3.781,2.694L14.515,13.5H9.108 c-2.545,0-4.608,2.063-4.608,4.608v16.785c0,2.545,2.063,4.608,4.608,4.608h28.785c2.545,0,4.608-2.063,4.608-4.608V18.108 C42.5,15.563,40.437,13.5,37.892,13.5z" />
<circle cx="24" cy="26" r="7.5" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="4" />
</svg>
{{- else if (eq $icon_name "xda") -}}
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="M13.84 3.052V0h7.843v17.583H13.84v-3.024h4.591V3.052zM5.569 14.53V3.024h4.592V0H2.318v17.583H6.98L10.16 24v-9.483z" />
</svg>
{{- else if (eq $icon_name "xing") -}}
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="M313.8 303.9L469 32H365L209.4 303.8a1.35 1.35 0 0 0 0 1.7l98.9 173.8c.4.7.8.7 1.6.7H413l-99.3-174.7a1.74 1.74 0 0 1 .1-1.4z"
fill="currentColor" />
<path
d="M221.9 216.2L163 113a2 2 0 0 0-2-1H65l58.9 104.4a1.13 1.13 0 0 1 .1.8L43 352h96.8a1.54 1.54 0 0 0 1.6-.9l80.5-133.7a2.44 2.44 0 0 0 0-1.2z" />
</svg>
{{- else if (eq $icon_name "ycombinator") -}}
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none" stroke-width="1">
<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 "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">

View File

@ -1,13 +1,13 @@
<div class="toc">
<details {{if (.Param "TocOpen") }} open{{ end }}>
<summary accesskey="c" title="(Alt + C)">
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
</summary>
<div class="inner">
{{- $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">
{{- $largest := 6 -}}
{{- range $headers -}}
{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
@ -87,7 +87,7 @@
{{- end -}}
{{- end }}
</ul>
{{- end }}
</div>
</details>
</div>
{{- end }}

View File

@ -1,12 +1,8 @@
{{ if .Get "content" }}
{{ if .Get "summary" }}
{{ else }}
{{ warnf "missing value for param 'summary': %s" .Position }}
{{ end }}
{{ else }}
{{ errorf "missing value for param 'content': %s" .Position }}
{{ end }}
<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
{{ .Get "content" | markdownify }}
{{ .Inner | markdownify }}
</details></p>

View File

@ -37,7 +37,7 @@ features = [
"scroll-to-top",
"search"
]
min_version = "0.82.0"
min_version = "0.83.0"
[author]
name = "Aditya Telange"