mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-20 12:37:29 -05:00
Compare commits
97 Commits
586bea37d5
...
custom-fon
Author | SHA1 | Date | |
---|---|---|---|
72b5479472
|
|||
4d1a0d6be2
|
|||
ac580e1995
|
|||
cee1cd3a82
|
|||
3fae019148
|
|||
8ef1e3840a
|
|||
629b3758b9
|
|||
9412906b4f
|
|||
f8cfad647f
|
|||
b200623dca
|
|||
80f5994d96
|
|||
342710a755
|
|||
8eb642dbc8
|
|||
a4be8b395b
|
|||
47d6d02186
|
|||
a26ea62b60
|
|||
7cff045cb3
|
|||
9f080377e7
|
|||
fb40c8a4c3
|
|||
0c248a4ca5
|
|||
56d8a07893
|
|||
8aab2ca693
|
|||
e46288dc45
|
|||
637ffc12f5
|
|||
2a40664bb6
|
|||
e34d2109ec
|
|||
54f89dad51
|
|||
04b5017279
|
|||
a65a435b1d
|
|||
73dc916d5a
|
|||
e8be3ae45b
|
|||
73ef9cc7a6
|
|||
4adb754ae3
|
|||
81709bb47e
|
|||
9c3a076e96
|
|||
833edacc1f
|
|||
121a67a1fc
|
|||
8e3fb4038a
|
|||
e9266cdead
|
|||
3a4cb538f7
|
|||
de84bc5ddf
|
|||
466c91a980
|
|||
8d81f5e37c
|
|||
7dd01894da
|
|||
9665133ba4
|
|||
b272ed6181
|
|||
17918a5617
|
|||
493ee2da96
|
|||
3d83e9fbdf
|
|||
684769df5a
|
|||
9bee463a3c
|
|||
805dc65ccb
|
|||
a9d1c25ee4
|
|||
fe08bdc93c
|
|||
026d5ab2c3
|
|||
311d846cb8
|
|||
0888356292
|
|||
bcf0b68df9
|
|||
034ef462a2
|
|||
56610009e9
|
|||
76b0383c2c
|
|||
0877a9d400
|
|||
2731d9795f
|
|||
87a6da5c41
|
|||
e450f3fbc7
|
|||
cba6dd0a2f
|
|||
fa5c014a1b
|
|||
a172b1ea21
|
|||
93d9164c6a
|
|||
72ebcf134a
|
|||
effd3a265b
|
|||
d41f3facd7
|
|||
c82d5602bb
|
|||
219f97bc00
|
|||
2f6d67a03f
|
|||
e97d4f921d
|
|||
5ffca36b84
|
|||
f4c056b99c
|
|||
3713fdae5b
|
|||
1127795717
|
|||
1db48c3101
|
|||
430139d292
|
|||
ac9ca6f97e
|
|||
8cadf8e735
|
|||
42a7e27d09
|
|||
2371f1de13
|
|||
81e141cef9
|
|||
2113c7a4e9
|
|||
b14e0e90fd
|
|||
2742bac9ff
|
|||
e8f9d1c5df
|
|||
dff23045a8
|
|||
4f450374cf
|
|||
a3a7f50a5b
|
|||
2cc4f45d4f
|
|||
33d0f81444
|
|||
5668feed1d
|
README.mdtheme.toml
archetypes
assets
config.yamlexampleSite
i18n
layouts
_default
authors
home.htmlindex.htmlpartials
additional-head.htmlfigure.htmlhead.htmlicon.htmlicon_code.htmllatest-posts.htmlpage-list.htmlpagination.html
post-meta-item
post-metadata
remote_figure.htmlseo-description.htmlseo-tags
series-box.htmlshare.htmltop.htmlseries
shortcodes
tags
taxonomy
static/font
jetbrainsmono
tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTN1OVgaY.woff2tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTNFOVgaY.woff2tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTNVOVgaY.woff2tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOVOVgaY.woff2tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOV.woff2tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTPlOVgaY.woff2
opensans
memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4iaVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4jaVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4kaVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4saVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4taVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4vaVIGxA.woff2
@ -1,2 +1,4 @@
|
|||||||
# bobatheme
|
# bobatheme
|
||||||
Simple Hugo theme
|
|
||||||
|
The (boba) best Hugo theme. Contains everything I need for bbaovanc.com and
|
||||||
|
boba.best.
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
title: {{ replace .Name "-" " " | humanize }}
|
title: {{ replace .Name "-" " " | humanize }}
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
|
lastmod: {{ .Date }}
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
comments: true
|
||||||
draft: true
|
draft: true
|
||||||
@ -9,11 +10,14 @@ draft: true
|
|||||||
authors:
|
authors:
|
||||||
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- archetype-stuff
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- awesome
|
- awesome
|
||||||
|
|
||||||
series:
|
series:
|
||||||
- Archetype
|
- archetype
|
||||||
|
|
||||||
# this will be shown for the article in list pages and in the page metadata
|
# this will be shown for the article in list pages and in the page metadata
|
||||||
# it can be either an image or video (this might change in the future, however)
|
# it can be either an image or video (this might change in the future, however)
|
||||||
|
15
archetypes/categories/_index.md
Normal file
15
archetypes/categories/_index.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
title: {{ replace .Name "-" " " | title }}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
A short summary of what the category is about.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
Optionally provide more information about the category here. This part will only
|
||||||
|
show on the category page, not on the category list page.
|
||||||
|
|
||||||
|
If you delete this section, DO NOT delete the summary separator (`<!--more-->`)
|
||||||
|
or else the summary won't be shown.
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,21 @@
|
|||||||
|
/* tango style */
|
||||||
|
|
||||||
@media print, (prefers-color-scheme: light) {
|
@media print, (prefers-color-scheme: light) {
|
||||||
.chroma {
|
.chroma {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Background */ .bg { background-color: #f8f8f8 }
|
||||||
|
/* PreWrapper */ .chroma { background-color: #f8f8f8; }
|
||||||
/* Other */ .chroma .x { color: #000000 }
|
/* Other */ .chroma .x { color: #000000 }
|
||||||
/* Error */ .chroma .err { color: #a40000 }
|
/* Error */ .chroma .err { color: #a40000 }
|
||||||
|
/* CodeLine */ .chroma .cl { }
|
||||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
|
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||||
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
|
/* Line */ .chroma .line { display: flex; }
|
||||||
/* Keyword */ .chroma .k { color: #204a87; font-weight: bold }
|
/* Keyword */ .chroma .k { color: #204a87; font-weight: bold }
|
||||||
/* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold }
|
/* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold }
|
||||||
/* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold }
|
/* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold }
|
||||||
@ -83,6 +90,7 @@
|
|||||||
/* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold }
|
/* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold }
|
||||||
/* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline }
|
/* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline }
|
||||||
/* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline }
|
/* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: light) {
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }
|
/* native style */
|
||||||
|
|
||||||
|
/* Background */ .bg { color: #d0d0d0; background-color: #202020 }
|
||||||
|
/* PreWrapper */ .chroma { color: #d0d0d0; background-color: #202020; }
|
||||||
/* Other */ .chroma .x { }
|
/* Other */ .chroma .x { }
|
||||||
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
|
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
|
||||||
|
/* CodeLine */ .chroma .cl { }
|
||||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }
|
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||||
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
|
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
|
||||||
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
|
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
|
||||||
|
/* Line */ .chroma .line { display: flex; }
|
||||||
/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }
|
/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }
|
||||||
/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }
|
/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }
|
||||||
/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }
|
/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
const backToTop = document.getElementById("back-to-top");
|
|
||||||
window.onscroll = function() {
|
|
||||||
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
|
||||||
backToTop.style.display = "block";
|
|
||||||
} else {
|
|
||||||
backToTop.style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
35
assets/js/bobatheme.js
Normal file
35
assets/js/bobatheme.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// back to top
|
||||||
|
const backToTop = document.getElementById("back-to-top");
|
||||||
|
window.onscroll = function() {
|
||||||
|
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
||||||
|
backToTop.style.display = "block";
|
||||||
|
} else {
|
||||||
|
backToTop.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// code block copy to clipboard
|
||||||
|
window.onload = () => {
|
||||||
|
document.querySelectorAll(".code-block").forEach(codeBlock => {
|
||||||
|
const button = codeBlock.querySelector(".code-header > .code-copy-button");
|
||||||
|
|
||||||
|
// lang will not be unset because we default it to text
|
||||||
|
// clone it so it doesn't change the actual DOM element
|
||||||
|
const codeElem = codeBlock.querySelector("code[data-lang]").cloneNode(true);
|
||||||
|
// bashsession: remove command output lines
|
||||||
|
codeElem.querySelectorAll(".go").forEach(e => e.parentNode.removeChild(e));
|
||||||
|
// bashsession: remove prompt symbol
|
||||||
|
codeElem.querySelectorAll(".gp").forEach(e => e.parentNode.removeChild(e));
|
||||||
|
const rawCode = codeElem.innerText;
|
||||||
|
|
||||||
|
const originalCopyText = button.innerHTML;
|
||||||
|
button.onclick = event => {
|
||||||
|
navigator.clipboard.writeText(rawCode);
|
||||||
|
// TODO: maybe we could add a fancier indicator, like a flash or something
|
||||||
|
event.target.innerHTML = "Copied!";
|
||||||
|
setTimeout(() => {
|
||||||
|
event.target.innerHTML = originalCopyText;
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
3
assets/js/share-event.js
Normal file
3
assets/js/share-event.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function share_event(service) {
|
||||||
|
// this function does nothing by default
|
||||||
|
}
|
@ -4,11 +4,10 @@ markup:
|
|||||||
lineNos: true
|
lineNos: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
faviconICO: favicon.ico
|
|
||||||
faviconPNG: favicon.png
|
|
||||||
readingtime: true
|
readingtime: true
|
||||||
|
|
||||||
taxonomies:
|
taxonomies:
|
||||||
|
category: categories
|
||||||
tag: tags
|
tag: tags
|
||||||
author: authors
|
author: authors
|
||||||
series: series
|
series: series
|
||||||
|
@ -20,9 +20,9 @@ params:
|
|||||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||||
description: Example website for bobatheme
|
description: Example website for bobatheme
|
||||||
|
|
||||||
# these are for favicons in bobatheme (defaults are shown here)
|
# these are for favicons in bobatheme (disabled by default)
|
||||||
# faviconICO: favicon.ico
|
# faviconSVG: favicon.svg
|
||||||
# faviconPNG: favicon.png
|
# appleTouchPNG: apple-touch-icon.png
|
||||||
|
|
||||||
# show reading time (enabled by default)
|
# show reading time (enabled by default)
|
||||||
# readingtime: true
|
# readingtime: true
|
||||||
@ -30,6 +30,26 @@ params:
|
|||||||
# used for "View source" (unset by default)
|
# used for "View source" (unset by default)
|
||||||
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
|
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
|
||||||
# gitFileIcon: github-circle
|
# gitFileIcon: github-circle
|
||||||
|
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
|
||||||
|
|
||||||
|
# display a "Latest Posts" section on the homepage below its content
|
||||||
|
homepageLatestPosts: true
|
||||||
|
|
||||||
|
# social media share icons
|
||||||
|
# shareButtons:
|
||||||
|
# twitter: true
|
||||||
|
# facebook: true
|
||||||
|
# linkedin: true
|
||||||
|
# reddit: true
|
||||||
|
# telegram: true
|
||||||
|
# print: true
|
||||||
|
|
||||||
|
# show "Latest Posts" section at bottom of content pages
|
||||||
|
# latestPostsOnContent: true
|
||||||
|
|
||||||
|
# footer: >-
|
||||||
|
# Some example text for the footer.
|
||||||
|
|
||||||
|
|
||||||
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
||||||
# you probably want to keep this default
|
# you probably want to keep this default
|
||||||
|
29
i18n/en.yaml
29
i18n/en.yaml
@ -8,6 +8,15 @@ table_of_contents:
|
|||||||
browser_no_video_support:
|
browser_no_video_support:
|
||||||
other: "Your browser does not support video."
|
other: "Your browser does not support video."
|
||||||
|
|
||||||
|
latest_posts:
|
||||||
|
other: "Latest Posts"
|
||||||
|
|
||||||
|
see_also:
|
||||||
|
other: "SEE ALSO:"
|
||||||
|
|
||||||
|
copy_to_clipboard:
|
||||||
|
other: "Copy"
|
||||||
|
|
||||||
|
|
||||||
# Meta items
|
# Meta items
|
||||||
long_date:
|
long_date:
|
||||||
@ -21,6 +30,9 @@ readingtime:
|
|||||||
one: "{{ . }} min"
|
one: "{{ . }} min"
|
||||||
other: "{{ . }} mins"
|
other: "{{ . }} mins"
|
||||||
|
|
||||||
|
edit_history:
|
||||||
|
other: "Edit history"
|
||||||
|
|
||||||
|
|
||||||
# Post count
|
# Post count
|
||||||
no_posts:
|
no_posts:
|
||||||
@ -35,8 +47,8 @@ post_count:
|
|||||||
read_more:
|
read_more:
|
||||||
other: "Read more"
|
other: "Read more"
|
||||||
|
|
||||||
see_also:
|
related_posts:
|
||||||
other: "See also"
|
other: "Related Posts"
|
||||||
|
|
||||||
older_post:
|
older_post:
|
||||||
other: "Older"
|
other: "Older"
|
||||||
@ -55,12 +67,15 @@ aria_back_to_top_button:
|
|||||||
aria_rss_link:
|
aria_rss_link:
|
||||||
other: "RSS feed link"
|
other: "RSS feed link"
|
||||||
|
|
||||||
aria_post_meta_view_source:
|
aria_post_meta_edit_history:
|
||||||
other: "link to page source"
|
other: "link to page edit history"
|
||||||
|
|
||||||
aria_post_meta_translations:
|
aria_post_meta_translations:
|
||||||
other: "translations"
|
other: "translations"
|
||||||
|
|
||||||
|
aria_post_meta_categories:
|
||||||
|
other: "categories"
|
||||||
|
|
||||||
aria_post_meta_tags:
|
aria_post_meta_tags:
|
||||||
other: "tags"
|
other: "tags"
|
||||||
|
|
||||||
@ -82,6 +97,9 @@ aria_post_metadata:
|
|||||||
aria_author_metadata:
|
aria_author_metadata:
|
||||||
other: "author metadata"
|
other: "author metadata"
|
||||||
|
|
||||||
|
aria_taxonomy_metadata:
|
||||||
|
other: "taxonomy metadata"
|
||||||
|
|
||||||
aria_post_meta_date:
|
aria_post_meta_date:
|
||||||
other: "date"
|
other: "date"
|
||||||
|
|
||||||
@ -94,6 +112,9 @@ aria_author_post_count:
|
|||||||
aria_author_word_count:
|
aria_author_word_count:
|
||||||
other: "word count"
|
other: "word count"
|
||||||
|
|
||||||
|
aria_taxonomy_post_count:
|
||||||
|
other: "post count"
|
||||||
|
|
||||||
aria_series_metadata:
|
aria_series_metadata:
|
||||||
other: "series metadata"
|
other: "series metadata"
|
||||||
|
|
||||||
|
35
i18n/es.yaml
35
i18n/es.yaml
@ -8,6 +8,15 @@ table_of_contents:
|
|||||||
browser_no_video_support:
|
browser_no_video_support:
|
||||||
other: "Tu navegador de internet no admite video."
|
other: "Tu navegador de internet no admite video."
|
||||||
|
|
||||||
|
latest_posts:
|
||||||
|
other: "Artículos recientes"
|
||||||
|
|
||||||
|
see_also:
|
||||||
|
other: "Véase también:"
|
||||||
|
|
||||||
|
copy_to_clipboard:
|
||||||
|
other: "Copiar"
|
||||||
|
|
||||||
|
|
||||||
# Meta items
|
# Meta items
|
||||||
long_date:
|
long_date:
|
||||||
@ -21,22 +30,25 @@ readingtime:
|
|||||||
one: "{{ . }} min"
|
one: "{{ . }} min"
|
||||||
other: "{{ . }} mins"
|
other: "{{ . }} mins"
|
||||||
|
|
||||||
|
edit_history:
|
||||||
|
other: "Historial de cambios"
|
||||||
|
|
||||||
|
|
||||||
# Post count
|
# Post count
|
||||||
no_posts:
|
no_posts:
|
||||||
other: "¡No hay contenido para mostrar!"
|
other: "¡No hay contenido para mostrar!"
|
||||||
|
|
||||||
# post_count:
|
post_count:
|
||||||
# one: "{{ . }} post"
|
one: "{{ . }} publicación"
|
||||||
# other: "{{ . }} posts"
|
other: "{{ . }} publicaciones"
|
||||||
|
|
||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
read_more:
|
read_more:
|
||||||
other: "Leer más"
|
other: "Leer más"
|
||||||
|
|
||||||
see_also:
|
related_posts:
|
||||||
other: "Véase también"
|
other: "Publicaciones similares"
|
||||||
|
|
||||||
older_post:
|
older_post:
|
||||||
other: "Más antiguo"
|
other: "Más antiguo"
|
||||||
@ -55,12 +67,15 @@ newer_post:
|
|||||||
# aria_rss_link:
|
# aria_rss_link:
|
||||||
# other: "RSS feed link"
|
# other: "RSS feed link"
|
||||||
|
|
||||||
# aria_post_meta_view_source:
|
# aria_post_meta_edit_history:
|
||||||
# other: "link to page source"
|
# other: "link to page edit history"
|
||||||
|
|
||||||
# aria_post_meta_translations:
|
# aria_post_meta_translations:
|
||||||
# other: "translations"
|
# other: "translations"
|
||||||
|
|
||||||
|
# aria_post_meta_categories:
|
||||||
|
# other: "categories"
|
||||||
|
|
||||||
# aria_post_meta_tags:
|
# aria_post_meta_tags:
|
||||||
# other: "tags"
|
# other: "tags"
|
||||||
|
|
||||||
@ -82,6 +97,9 @@ newer_post:
|
|||||||
# aria_author_metadata:
|
# aria_author_metadata:
|
||||||
# other: "author metadata"
|
# other: "author metadata"
|
||||||
|
|
||||||
|
# aria_taxonomy_metadata:
|
||||||
|
# other: "taxonomy metadata"
|
||||||
|
|
||||||
# aria_post_meta_date:
|
# aria_post_meta_date:
|
||||||
# other: "date"
|
# other: "date"
|
||||||
|
|
||||||
@ -94,6 +112,9 @@ newer_post:
|
|||||||
# aria_author_word_count:
|
# aria_author_word_count:
|
||||||
# other: "word count"
|
# other: "word count"
|
||||||
|
|
||||||
|
# aria_taxonomy_post_count:
|
||||||
|
# other: "post count"
|
||||||
|
|
||||||
# aria_series_metadata:
|
# aria_series_metadata:
|
||||||
# other: "series metadata"
|
# other: "series metadata"
|
||||||
|
|
||||||
|
15
layouts/_default/_markup/render-codeblock.html
Normal file
15
layouts/_default/_markup/render-codeblock.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{{ $type := "text" }}
|
||||||
|
{{ with .Type }}
|
||||||
|
{{ $type = . }}
|
||||||
|
{{ end }}
|
||||||
|
<div class="code-block">
|
||||||
|
<div class="code-header">
|
||||||
|
<pre class="code-type">{{ $type }}</pre>
|
||||||
|
<a href="javascript:void(0)" class="code-copy-button">
|
||||||
|
{{ i18n "copy_to_clipboard" }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{/* a div.highlight is already created by highlight function */}}
|
||||||
|
{{ highlight .Inner $type }}
|
||||||
|
</div>
|
@ -14,17 +14,22 @@
|
|||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="main">
|
<main>
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
{{ .Content }}
|
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</main>
|
||||||
|
|
||||||
{{ with .Site.Copyright }}
|
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||||
<hr>
|
|
||||||
<footer>
|
<footer>
|
||||||
<small>
|
<small>
|
||||||
{{ . | safeHTML }}
|
{{ with .Site.Copyright }}
|
||||||
|
<p>{{ . | safeHTML }}</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Site.Params.footer }}
|
||||||
|
{{ . | $.RenderString (dict "display" "block") }}
|
||||||
|
{{ end }}
|
||||||
</small>
|
</small>
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
{{ partial "rss-link.html" . }}
|
{{ partial "rss-link.html" . }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
{{ with .Content }}
|
||||||
|
{{ . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="list-page-content">
|
<div class="list-page-content">
|
||||||
{{ with .Sections }}
|
{{ with .Sections }}
|
||||||
<div class="sections">
|
<div class="sections">
|
||||||
@ -14,19 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-list">
|
{{ partial "page-list.html" .Paginator.Pages }}
|
||||||
{{ with .Paginator.Pages }}
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>{{ .Render "summary/post" }}</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{ else }}
|
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
|
@ -7,25 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "post-metadata/full.html" . }}
|
{{ partial "post-metadata/full.html" . }}
|
||||||
|
{{ partial "series-box.html" . }}
|
||||||
{{ with (.GetTerms "series") }}
|
|
||||||
{{ $series := slice }}
|
|
||||||
{{ range . }}
|
|
||||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="series-box">
|
|
||||||
{{ partial "icon.html" "info" }}
|
|
||||||
{{ if gt (len $series) 1 }}
|
|
||||||
This post is part of multiple series:
|
|
||||||
{{ else }}
|
|
||||||
This post is part of a series:
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ delimit $series ", " }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
{{ if .Params.Toc }}
|
{{ if .Params.Toc }}
|
||||||
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
||||||
@ -42,29 +24,15 @@
|
|||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
<div class="post-media">
|
<div class="post-media">
|
||||||
{{ partial "figure.html" (dict "src" . "border" true) }}
|
{{ partial "figure.html" (dict "src" .) }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<article class="post-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</article>
|
||||||
|
|
||||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
{{ partial "series-box.html" . }}
|
||||||
{{ with $related }}
|
|
||||||
<div class="see-also">
|
|
||||||
<h2>{{ i18n "see_also" }}</h2>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>
|
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if or .NextInSection .PrevInSection }}
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
<div class="prevnext">
|
<div class="prevnext">
|
||||||
@ -96,9 +64,26 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.shareButtons }}
|
||||||
|
{{ partial "share.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Params.comments }}
|
{{ if .Params.comments }}
|
||||||
<div class="comments">
|
<div class="comments">
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||||
|
{{ with $related }}
|
||||||
|
<div class="related-posts full-width-page-list">
|
||||||
|
<hr>
|
||||||
|
<h1>{{ i18n "related_posts" }}</h1>
|
||||||
|
{{ partial "page-list.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.latestPostsOnContent }}
|
||||||
|
{{ partialCached "latest-posts.html" . }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="post">
|
<div class="author">
|
||||||
<h2 class="post-title">
|
<h2 class="author-name">
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ partial "post-metadata/author.html" . }}
|
{{ partial "post-metadata/author.html" . }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="author-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,23 +1,21 @@
|
|||||||
<div class="post">
|
<h2 class="post-title">
|
||||||
<h2 class="post-title">
|
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ partial "post-metadata/short.html" . }}
|
{{ partial "post-metadata/short.html" . }}
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
<div class="post-media">
|
<div class="post-media">
|
||||||
{{ partial "figure.html" (dict "src" . "border" true) }}
|
{{ partial "figure.html" (dict "src" .) }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="readmore">
|
<div class="readmore">
|
||||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,26 +1,24 @@
|
|||||||
<div class="post">
|
<h2 class="post-title">
|
||||||
<h2 class="post-title">
|
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ partial "post-metadata/series.html" . }}
|
{{ partial "post-metadata/series.html" . }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="series-pages">
|
<div class="series-page-list">
|
||||||
<ul>
|
|
||||||
{{ $i := 0 }}
|
{{ $i := 0 }}
|
||||||
{{ $total := len .Data.Pages }}
|
{{ $total := len .Data.Pages }}
|
||||||
{{ range .Data.Pages.Reverse }}
|
{{ range .Data.Pages.Reverse }}
|
||||||
{{ $i = add 1 $i }}
|
{{ $i = add 1 $i }}
|
||||||
{{ .Scratch.Set "series_position" $i }}
|
{{ .Scratch.Set "series_position" $i }}
|
||||||
{{ .Scratch.Set "series_total" $total }}
|
{{ .Scratch.Set "series_total" $total }}
|
||||||
<li>{{ .Render "summary/series_post" }}</li>
|
<article class="post">
|
||||||
|
{{ .Render "summary/series_post" }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,29 +1,27 @@
|
|||||||
<div class="post">
|
<div class="post-series-position">
|
||||||
<div class="post-series-position">
|
|
||||||
{{ if .Scratch.Get "series_position" }}
|
{{ if .Scratch.Get "series_position" }}
|
||||||
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
|
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="post-title">
|
<h2 class="post-title">
|
||||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ partial "post-metadata/short.html" . }}
|
{{ partial "post-metadata/short.html" . }}
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
<div class="post-media">
|
<div class="post-media">
|
||||||
{{ partial "figure.html" (dict "src" . "border" true) }}
|
{{ partial "figure.html" (dict "src" .) }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="readmore">
|
<div class="readmore">
|
||||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,13 +4,17 @@
|
|||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
{{ with .Content }}
|
||||||
|
{{ . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-list">
|
<div class="page-list">
|
||||||
{{ with .Paginator.Pages }}
|
{{ with .Paginator.Pages }}
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<li>{{ .Render "summary/author" }}</li>
|
<article class="post">
|
||||||
|
{{ .Render "summary/author" }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
{{ i18n "no_posts" }}
|
{{ i18n "no_posts" }}
|
||||||
|
@ -1,27 +1,19 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<div class="author-name">
|
||||||
<h1>
|
<h1>
|
||||||
{{ partial "icon.html" "user-circle" }}
|
{{ partial "icon.html" "user-circle" }}
|
||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
{{ partial "rss-link.html" . }}
|
{{ partial "rss-link.html" . }}
|
||||||
</h1>
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ partial "post-metadata/author.html" . }}
|
{{ partial "post-metadata/author.html" . }}
|
||||||
|
|
||||||
{{ .Content }}
|
{{ with .Content }}
|
||||||
|
{{ . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-list">
|
{{ partial "page-list.html" .Paginator.Pages }}
|
||||||
{{ with .Paginator.Pages }}
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>{{ .Render "summary/post" }}</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{ else }}
|
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
21
layouts/home.html
Normal file
21
layouts/home.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ with .Content }}
|
||||||
|
<article class="homepage-content">
|
||||||
|
{{ . }}
|
||||||
|
</article>
|
||||||
|
<hr>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.homepageLatestPosts }}
|
||||||
|
<div class="homepage-latest-posts">
|
||||||
|
<h1>
|
||||||
|
{{ i18n "latest_posts" }}
|
||||||
|
{{ partial "rss-link.html" . }}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
{{ partial "page-list.html" (.Paginate .Site.RegularPages).Pages }}
|
||||||
|
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
@ -1,2 +0,0 @@
|
|||||||
{{ define "main" }}
|
|
||||||
{{ end }}
|
|
4
layouts/partials/additional-head.html
Normal file
4
layouts/partials/additional-head.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{{/*
|
||||||
|
Create a file named `layouts/partials/additional-head.html` at your site root to
|
||||||
|
add extra tags into <head>. Page variables are passed.
|
||||||
|
*/}}
|
@ -11,7 +11,7 @@
|
|||||||
{{ if eq .MediaType.MainType "image" }}
|
{{ if eq .MediaType.MainType "image" }}
|
||||||
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
|
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
|
||||||
{{ else if eq .MediaType.MainType "video" }}
|
{{ else if eq .MediaType.MainType "video" }}
|
||||||
<video controls>
|
<video controls preload="metadata">
|
||||||
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
||||||
{{ i18n "browser_no_video_support" }}
|
{{ i18n "browser_no_video_support" }}
|
||||||
</video>
|
</video>
|
||||||
|
@ -12,15 +12,19 @@
|
|||||||
{{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }}
|
{{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with resources.Get "js/back-to-top.js" | fingerprint "sha512" }}
|
|
||||||
|
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||||
|
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
|
{{ end }}
|
||||||
|
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||||
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Params.faviconICO }}
|
{{ with .Site.Params.faviconSVG }}
|
||||||
<link rel="icon" type="image/x-icon" href="{{ . | absURL }}" />
|
<link rel="icon" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Site.Params.faviconPNG }}
|
{{ with .Site.Params.appleTouchPNG }}
|
||||||
<link rel="icon" type="image/png" href="{{ . | absURL }}" />
|
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
@ -36,5 +40,7 @@
|
|||||||
{{ partial "seo-tags/author.html" . }}
|
{{ partial "seo-tags/author.html" . }}
|
||||||
|
|
||||||
<meta name="language" content="{{ .Language.Lang }}">
|
<meta name="language" content="{{ .Language.Lang }}">
|
||||||
<meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
|
<meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||||
|
|
||||||
|
{{ partial "additional-head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
@ -1,5 +1 @@
|
|||||||
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
{{ partialCached "icon_code.html" . . }}
|
||||||
{{- $icon := $icon_resource.Content -}}
|
|
||||||
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
|
||||||
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
|
||||||
{{- $icon | safeHTML -}}
|
|
||||||
|
6
layouts/partials/icon_code.html
Normal file
6
layouts/partials/icon_code.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
||||||
|
{{- $icon := $icon_resource.Content -}}
|
||||||
|
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
||||||
|
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||||||
|
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
||||||
|
{{- $icon | safeHTML -}}
|
11
layouts/partials/latest-posts.html
Normal file
11
layouts/partials/latest-posts.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<div class="latest-posts full-width-page-list">
|
||||||
|
<hr>
|
||||||
|
<h1>
|
||||||
|
{{ i18n "latest_posts" }}
|
||||||
|
{{ partial "rss-link.html" .Site.Home }}
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
{{ with .Site.RegularPages | first 5 }}
|
||||||
|
{{ partial "page-list.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
13
layouts/partials/page-list.html
Normal file
13
layouts/partials/page-list.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<div class="page-list">
|
||||||
|
{{ with . }}
|
||||||
|
{{ range . }}
|
||||||
|
<article class="post">
|
||||||
|
{{ .Render "summary/post" }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
<div>
|
||||||
|
{{ i18n "no_posts" }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
@ -1,5 +1,5 @@
|
|||||||
{{ if gt .Paginator.TotalPages 1 }}
|
{{ if gt .Paginator.TotalPages 1 }}
|
||||||
<div class="pagination">
|
<nav class="pagination">
|
||||||
{{ template "_internal/pagination.html" . }}
|
{{ template "_internal/pagination.html" . }}
|
||||||
</div>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
11
layouts/partials/post-meta-item/categories.html
Normal file
11
layouts/partials/post-meta-item/categories.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{{ with (.GetTerms "categories") }}
|
||||||
|
{{ $categories := slice }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||||
|
{{ partial "icon.html" "folder" }}
|
||||||
|
{{ delimit $categories ", " }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
8
layouts/partials/post-meta-item/edithistory.html
Normal file
8
layouts/partials/post-meta-item/edithistory.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{{ if and .Site.Params.gitHistoryURL .File.Path }}
|
||||||
|
<span class="post-meta-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
|
||||||
|
{{ partial "icon.html" "history" }}
|
||||||
|
<a href="{{ printf "%s/content/%s" .Site.Params.gitHistoryURL .File.Path }}" target="_blank" rel="noopener">
|
||||||
|
{{- i18n "edit_history" -}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
@ -1,13 +0,0 @@
|
|||||||
{{ if and .Site.Params.gitFileURL .File.Path }}
|
|
||||||
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_view_source" }}">
|
|
||||||
{{ with .Site.Params.gitFileIcon }}
|
|
||||||
{{ partial "icon.html" . }}
|
|
||||||
{{ else }}
|
|
||||||
{{ partial "icon.html" "file" }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener">
|
|
||||||
View source
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
@ -1,16 +1,16 @@
|
|||||||
<div class="post-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
|
<div class="author-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
|
||||||
{{/* Calculate the total word count */}}
|
{{/* Calculate the total word count */}}
|
||||||
{{ $total_words := 0 }}
|
{{ $total_words := 0 }}
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
{{ $total_words = add $total_words .WordCount }}
|
{{ $total_words = add $total_words .WordCount }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<span class="post-meta-item" aria-label="{{ i18n "aria_author_post_count" }}">
|
<span class="author-meta-item" aria-label="{{ i18n "aria_author_post_count" }}">
|
||||||
{{ partial "icon.html" "newspaper" }}
|
{{ partial "icon.html" "newspaper" }}
|
||||||
{{ i18n "post_count" (len .Data.Pages) }}
|
{{ i18n "post_count" (len .Data.Pages) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="post-meta-item" aria-label="{{ i18n "aria_author_word_count" }}">
|
<span class="author-meta-item" aria-label="{{ i18n "aria_author_word_count" }}">
|
||||||
{{ partial "icon.html" "align-left" }}
|
{{ partial "icon.html" "align-left" }}
|
||||||
{{ i18n "wordcount" $total_words }}
|
{{ i18n "wordcount" $total_words }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{/* TODO: make this be a tooltip */}}
|
{{/* TODO: make this be a tooltip */}}
|
||||||
|
{{/* DISABLED
|
||||||
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
|
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
|
||||||
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
|
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
|
||||||
{{ partial "icon.html" "pencil" }}
|
{{ partial "icon.html" "pencil" }}
|
||||||
@ -17,12 +18,14 @@
|
|||||||
</time>
|
</time>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
*/}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "post-meta-item/authors.html" . }}
|
{{ partial "post-meta-item/authors.html" . }}
|
||||||
{{ partial "post-meta-item/translations.html" . }}
|
{{ partial "post-meta-item/translations.html" . }}
|
||||||
{{ partial "post-meta-item/readingtime.html" . }}
|
{{ partial "post-meta-item/readingtime.html" . }}
|
||||||
{{ partial "post-meta-item/viewsource.html" . }}
|
{{ partial "post-meta-item/edithistory.html" . }}
|
||||||
|
{{ partial "post-meta-item/categories.html" . }}
|
||||||
{{ partial "post-meta-item/tags.html" . }}
|
{{ partial "post-meta-item/tags.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -16,7 +16,4 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "post-meta-item/translations.html" . }}
|
{{ partial "post-meta-item/translations.html" . }}
|
||||||
{{ if .File }}
|
|
||||||
{{ partial "post-meta-item/viewsource.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
{{ partial "post-meta-item/translations.html" . }}
|
{{ partial "post-meta-item/translations.html" . }}
|
||||||
{{ partial "post-meta-item/readingtime.html" . }}
|
{{ partial "post-meta-item/readingtime.html" . }}
|
||||||
{{ partial "post-meta-item/series.html" . }}
|
{{ partial "post-meta-item/series.html" . }}
|
||||||
|
{{ partial "post-meta-item/categories.html" . }}
|
||||||
{{ partial "post-meta-item/tags.html" . }}
|
{{ partial "post-meta-item/tags.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
6
layouts/partials/post-metadata/taxonomy.html
Normal file
6
layouts/partials/post-metadata/taxonomy.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<div class="taxonomy-metadata" aria-label="{{ i18n "aria_taxonomy_metadata" }}">
|
||||||
|
<span class="taxonomy-meta-item" aria-label="{{ i18n "aria_taxonomy_post_count" }}">
|
||||||
|
{{ partial "icon.html" "newspaper" }}
|
||||||
|
{{ i18n "post_count" (len .Data.Pages) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
@ -12,7 +12,7 @@
|
|||||||
{{ if eq $type "image" }}
|
{{ if eq $type "image" }}
|
||||||
<img src="{{ $src }}" alt="{{ $alt }}" />
|
<img src="{{ $src }}" alt="{{ $alt }}" />
|
||||||
{{ else if eq $type "video" }}
|
{{ else if eq $type "video" }}
|
||||||
<video controls>
|
<video controls preload="metadata">
|
||||||
<source src="{{ $src }}" alt="{{ $alt }}">
|
<source src="{{ $src }}" alt="{{ $alt }}">
|
||||||
{{ i18n "browser_no_video_support" }}
|
{{ i18n "browser_no_video_support" }}
|
||||||
</video>
|
</video>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<meta property="og:title" content="{{ .Title | plainify }}">
|
<meta property="og:title" content="{{ .Title | plainify }}">
|
||||||
<meta property="og:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
|
<meta property="og:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||||
<meta property="og:url" content="{{ .Permalink }}">
|
<meta property="og:url" content="{{ .Permalink }}">
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<meta itemprop="name" content="{{ .Title | plainify }}">
|
<meta itemprop="name" content="{{ .Title | plainify }}">
|
||||||
<meta itemprop="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
|
<meta itemprop="description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||||
|
|
||||||
{{ $format := "2006-01-02T15:04:05-07:00" }}
|
{{ $format := "2006-01-02T15:04:05-07:00" }}
|
||||||
{{ with .Date }}
|
{{ with .Date }}
|
||||||
@ -21,6 +21,10 @@
|
|||||||
<meta itemprop="image" content="{{ $featured.Permalink }}">
|
<meta itemprop="image" content="{{ $featured.Permalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.tags }}
|
{{ with (.GetTerms "tags") }}
|
||||||
<meta itemprop="keywords" content="{{ delimit . ", " }}">
|
{{ $tags := slice }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ $tags = $tags | append .LinkTitle }}
|
||||||
|
{{ end }}
|
||||||
|
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
||||||
<meta name="twitter:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
|
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||||
|
|
||||||
{{ with .Site.Social.twitter }}
|
{{ with .Site.Social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
|
17
layouts/partials/series-box.html
Normal file
17
layouts/partials/series-box.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{{ with (.GetTerms "series") }}
|
||||||
|
{{ $series := slice }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="series-box">
|
||||||
|
{{ partial "icon.html" "info" }}
|
||||||
|
{{ if gt (len $series) 1 }}
|
||||||
|
This post is part of multiple series:
|
||||||
|
{{ else }}
|
||||||
|
This post is part of a series:
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ delimit $series ", " }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
63
layouts/partials/share.html
Normal file
63
layouts/partials/share.html
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<div class="share-buttons">
|
||||||
|
{{ if .Site.Params.shareButtons.twitter }}
|
||||||
|
<a class="twitter-share"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
onclick="share_event('Twitter');"
|
||||||
|
href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc">
|
||||||
|
{{- partial "icon.html" "twitter" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.shareButtons.facebook }}
|
||||||
|
<a class="facebook-share"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
onclick="share_event('Facebook');"
|
||||||
|
href="https://www.facebook.com/sharer.php?u={{ .Permalink }}">
|
||||||
|
{{- partial "icon.html" "facebook" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.shareButtons.linkedin }}
|
||||||
|
<a class="linkedin-share"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
onclick="share_event('LinkedIn');"
|
||||||
|
href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}">
|
||||||
|
{{- partial "icon.html" "linkedin" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.shareButtons.reddit }}
|
||||||
|
<a class="reddit-share"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
onclick="share_event('Reddit');"
|
||||||
|
href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}">
|
||||||
|
{{- partial "icon.html" "reddit" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Telegram icon doesn't have `viewbox` set, which breaks the sizing.
|
||||||
|
https://stackoverflow.com/q/72073399/19003757
|
||||||
|
https://github.com/michaelampr/jam/issues/39
|
||||||
|
{{ if .Site.Params.shareButtons.telegram }}
|
||||||
|
<a class="telegram-share"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
onclick="share_event('Telegram');"
|
||||||
|
href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}">
|
||||||
|
{{- partial "icon.html" "telegram" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{ if .Site.Params.shareButtons.print }}
|
||||||
|
<a class="print-share"
|
||||||
|
href="javascript:void(0)"
|
||||||
|
onclick="window.print(); share_event('Print');">
|
||||||
|
{{- partial "icon.html" "printer" -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
@ -1,6 +1,8 @@
|
|||||||
<h2 class="header">
|
<header class="header">
|
||||||
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
|
<a href="{{ .Site.Home.Permalink | absLangURL }}">
|
||||||
</h2>
|
{{ .Site.Title | markdownify }}
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
||||||
@ -13,7 +15,9 @@
|
|||||||
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
||||||
{{ $isActive = true }}
|
{{ $isActive = true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a class="navbar-item{{ if $isActive }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||||
|
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
|
||||||
|
href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
@ -4,13 +4,17 @@
|
|||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="series-taxonomy">
|
{{ with .Content }}
|
||||||
{{ with .Pages }}
|
{{ . }}
|
||||||
<ul>
|
{{ end }}
|
||||||
{{ range . }}
|
|
||||||
<li>{{ .Render "summary/series" }}</li>
|
<div class="series-taxonomy-list">
|
||||||
|
{{ with .Pages }}
|
||||||
|
{{ range . }}
|
||||||
|
<article class="series-taxonomy">
|
||||||
|
{{ .Render "summary/series" }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
{{ i18n "no_posts" }}
|
{{ i18n "no_posts" }}
|
||||||
|
@ -7,26 +7,14 @@
|
|||||||
|
|
||||||
{{ partial "post-metadata/series.html" . }}
|
{{ partial "post-metadata/series.html" . }}
|
||||||
|
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ with .Content }}
|
||||||
|
{{ . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-list">
|
|
||||||
{{ with .Paginator.Pages.Reverse }}
|
{{ with .Paginator.Pages.Reverse }}
|
||||||
<ul>
|
{{ partial "page-list.html" . }}
|
||||||
{{ $i := 0 }}
|
|
||||||
{{ $total := len $.Pages }}
|
|
||||||
{{ range . }}
|
|
||||||
{{ $i = add 1 $i }}
|
|
||||||
{{ .Scratch.Set "series_position" $i }}
|
|
||||||
{{ .Scratch.Set "series_total" $total }}
|
|
||||||
<li>{{ .Render "summary/post" }}</li>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
{{ else }}
|
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
5
layouts/shortcodes/abbr.html
Normal file
5
layouts/shortcodes/abbr.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{ if .IsNamedParams }}
|
||||||
|
<abbr title="{{ .Get "title" }}">{{ .Inner }}</abbr>
|
||||||
|
{{ else }}
|
||||||
|
<abbr title="{{ .Get 0 }}">{{ .Inner }}</abbr>
|
||||||
|
{{ end }}
|
@ -1,7 +1,28 @@
|
|||||||
<aside>
|
{{ $type := "" }}
|
||||||
{{ with .Inner }}
|
{{ if .IsNamedParams }}
|
||||||
{{ . | markdownify }}
|
{{ $type = .Get "type" | default "note" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ errorf "The aside shortcode needs to be a closing one (similar to the highlight shortcode, see https://gohugo.io/templates/shortcode-templates/#inner" }}
|
{{ $type = .Get 0 | default "note" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* This idea comes from the LoveIt theme:
|
||||||
|
https://github.com/dillonzq/LoveIt/blob/aa834e89af8349f6c18d4c7ad50a73fd5f1e40e0/layouts/shortcodes/admonition.html#L3-L14
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{ $icons := dict "note" "pencil" }}
|
||||||
|
{{ $icons = dict "info" "info" | merge $icons }}
|
||||||
|
{{ $icons = dict "tip" "lightbulb" | merge $icons }}
|
||||||
|
{{ $icons = dict "warning" "info" | merge $icons }}
|
||||||
|
{{ $icons = dict "example" "flask" | merge $icons }}
|
||||||
|
{{ $icons = dict "quote" "quote" | merge $icons }}
|
||||||
|
|
||||||
|
<aside class="{{ $type }}">
|
||||||
|
<div class="aside-title">
|
||||||
|
{{ partial "icon.html" (index $icons $type) }}
|
||||||
|
{{ title $type }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="aside-content">
|
||||||
|
{{ .Inner | .Page.RenderString (dict "display" "block") }}
|
||||||
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{ $resource := $.Page.Resources.GetMatch (.Get "src") }}
|
{{ $resource := .Page.Resources.GetMatch (.Get "src") }}
|
||||||
|
|
||||||
{{ $noborder := false }}
|
{{ $noborder := false }}
|
||||||
{{ if .Get "noborder" }}
|
{{ if .Get "noborder" }}
|
||||||
|
1
layouts/shortcodes/full-width-hr.html
Normal file
1
layouts/shortcodes/full-width-hr.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<hr class="full-width-hr">
|
@ -1,13 +0,0 @@
|
|||||||
{{ $border := false }}
|
|
||||||
{{ if .Get "border" }}
|
|
||||||
{{ $border = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $hidecaption := false }}
|
|
||||||
{{ if .Get "hidecaption" }}
|
|
||||||
{{ $hidecaption = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "image" "alt" (.Get "alt")) }}
|
|
||||||
</p>
|
|
@ -9,5 +9,5 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "video" "alt" (.Get "alt")) }}
|
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" (.Get "type") "alt" (.Get "alt")) }}
|
||||||
</p>
|
</p>
|
7
layouts/shortcodes/see-also.html
Normal file
7
layouts/shortcodes/see-also.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<div class="see-also">
|
||||||
|
{{ with .Site.GetPage (.Get 0) }}
|
||||||
|
<p>{{ i18n "see_also" }} <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></p>
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "Page could not be found for see-also shortcode: %s" .Position }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
10
layouts/shortcodes/table.html
Normal file
10
layouts/shortcodes/table.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{{/* See https://willschenk.com/articles/2020/styling_tables_with_hugo/ */}}
|
||||||
|
|
||||||
|
{{ $class := "markdown" }}
|
||||||
|
{{ with .Get "class" }}
|
||||||
|
{{ $class = delimit (slice $class .) " " }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $htmlTable := .Inner | markdownify }}
|
||||||
|
{{ $new := printf `<table class="%s">` $class }}
|
||||||
|
{{ (replace $htmlTable "<table>" $new) | safeHTML }}
|
@ -1,22 +0,0 @@
|
|||||||
{{ define "main" }}
|
|
||||||
<h1>
|
|
||||||
{{ partial "icon.html" "tag" }}
|
|
||||||
{{ .Title | markdownify }}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="tag-list">
|
|
||||||
{{ with .Data.Terms.Alphabetical }}
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<a href="{{ .Page.Permalink }}">
|
|
||||||
<li>{{ .Page.Title | markdownify }}</li>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{ else }}
|
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
@ -1,24 +0,0 @@
|
|||||||
{{ define "main" }}
|
|
||||||
<h1>
|
|
||||||
{{ partial "icon.html" "tag" }}
|
|
||||||
{{ .Title | markdownify }}
|
|
||||||
{{ partial "rss-link.html" . }}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
{{ partial "description-or-summary.html" . }}
|
|
||||||
<div class="page-list">
|
|
||||||
{{ with .Paginator.Pages }}
|
|
||||||
<ul>
|
|
||||||
{{ range . }}
|
|
||||||
<li>{{ .Render "summary/post" }}</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
{{ else }}
|
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
|
||||||
{{ end }}
|
|
@ -1,23 +1,37 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<div class="post-title">
|
||||||
<h1>
|
<h1>
|
||||||
{{ if eq .Data.Singular "tag" }}
|
{{ if eq .Data.Singular "tag" }}
|
||||||
{{ partial "icon.html" "tag" }}
|
{{ partial "icon.html" "tag" }}
|
||||||
|
{{ else if eq .Data.Singular "category" }}
|
||||||
|
{{ partial "icon.html" "folder" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "icon.html" "filter" }}
|
{{ partial "icon.html" "filter" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
</h1>
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="taxonomy">
|
{{ with .Content }}
|
||||||
{{ with .Data.Terms.Alphabetical }}
|
{{ . }}
|
||||||
<ul>
|
{{ end }}
|
||||||
{{ range . }}
|
|
||||||
<li>
|
<div class="taxonomy-list">
|
||||||
<a href="{{ .Page.Permalink }}">{{ .Page.Title | markdownify }}</a>
|
{{ with .Data.Terms.Alphabetical }}
|
||||||
</li>
|
{{ range . }}
|
||||||
|
{{ with .Page }}
|
||||||
|
<article class="taxonomy-term">
|
||||||
|
<div class="taxonomy-list-left">
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<p>{{ .Title | markdownify }}</p>
|
||||||
|
</a>
|
||||||
|
{{ partial "post-metadata/taxonomy.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ partial "description-or-summary.html" . }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
{{ i18n "no_posts" }}
|
{{ i18n "no_posts" }}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<div class="post-title">
|
||||||
<h1>
|
<h1>
|
||||||
{{ if eq .Data.Singular "tag" }}
|
{{ if eq .Data.Singular "tag" }}
|
||||||
{{ partial "icon.html" "tag" }}
|
{{ partial "icon.html" "tag" }}
|
||||||
|
{{ else if eq .Data.Singular "category" }}
|
||||||
|
{{ partial "icon.html" "folder" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "icon.html" "filter" }}
|
{{ partial "icon.html" "filter" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -9,21 +12,15 @@
|
|||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
{{ partial "rss-link.html" . }}
|
{{ partial "rss-link.html" . }}
|
||||||
</h1>
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "post-metadata/taxonomy.html" . }}
|
||||||
<div class="page-list">
|
|
||||||
{{ with .Paginator.Pages }}
|
{{ with .Content }}
|
||||||
<ul>
|
{{ . }}
|
||||||
{{ range . }}
|
|
||||||
<li>{{ .Render "summary/post" }}</li>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
{{ else }}
|
{{ partial "page-list.html" .Paginator.Pages }}
|
||||||
<div>
|
|
||||||
{{ i18n "no_posts" }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4iaVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4iaVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4jaVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4jaVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4kaVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4kaVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4saVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4saVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4taVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4taVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2
Normal file
Binary file not shown.
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4vaVIGxA.woff2
Normal file
BIN
static/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4vaVIGxA.woff2
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ description = "Simple Hugo theme for boba.best and bbaovanc.com"
|
|||||||
homepage = "https://bbaovanc.com"
|
homepage = "https://bbaovanc.com"
|
||||||
tags = []
|
tags = []
|
||||||
features = []
|
features = []
|
||||||
min_version = "0.80.0"
|
min_version = "0.93.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "bbaovanc"
|
name = "bbaovanc"
|
||||||
|
Reference in New Issue
Block a user