mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-02 17:37:35 -05:00
Compare commits
36 Commits
8845272d4d
...
cleanup-bo
Author | SHA1 | Date | |
---|---|---|---|
f9481a6e7f
|
|||
8083b1a299
|
|||
314b533698
|
|||
00a0f64be4
|
|||
741b3bc01b
|
|||
df2fae9886
|
|||
f38abfe73f
|
|||
3d55a7dabe
|
|||
67de113bdf
|
|||
349672bbad
|
|||
ec382b2085
|
|||
21f2a91b54
|
|||
0237c496ed
|
|||
61d5ca29dd
|
|||
8bb8720545
|
|||
bd8e34a381
|
|||
62cdcf5b11
|
|||
c9909762d6
|
|||
cc4af0c385
|
|||
7aeb95a437
|
|||
14475c13f4
|
|||
6b729c6acf
|
|||
f751c4b104
|
|||
de20387b5a
|
|||
84004d3ac0
|
|||
52a6440011
|
|||
322928ed7a
|
|||
4e753395ba
|
|||
5d335647d0
|
|||
22fff1a9c5
|
|||
b79c956c07
|
|||
b15ca73977
|
|||
ccb5170d2b
|
|||
433dd125e2
|
|||
d50a4dc6bd
|
|||
bbe76a44bb
|
@@ -24,7 +24,17 @@ series:
|
||||
resources:
|
||||
- name: feature
|
||||
src: something.webp
|
||||
title: Some image (image format can be anything; webp is just an example)
|
||||
title: >-
|
||||
Fallback title if one is not provided when calling figure shortcode with
|
||||
this listed as the src
|
||||
params:
|
||||
alt: Write an accessible description of this image. Don't over-write.
|
||||
|
||||
- src: demonstration.webp
|
||||
params:
|
||||
alt: >-
|
||||
Annotate an image without giving it an explicit name (the filename is
|
||||
simply used as the `name` instead).
|
||||
|
||||
---
|
||||
|
||||
|
@@ -158,61 +158,38 @@ pre > code {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Basic elements {{{ */
|
||||
/* Common distances/sizes {{{ */
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
:root {
|
||||
--page-margin: 16px;
|
||||
}
|
||||
|
||||
@media screen and (prefers-reduced-motion: reduce) {
|
||||
html {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
body {
|
||||
background-color: var(--background-0);
|
||||
color: var(--text-0);
|
||||
overflow-wrap: break-word;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin: 20px auto;
|
||||
padding: 0 20px;
|
||||
max-width: 760px; /* 720px + 20px for left & right padding */
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
footer p {
|
||||
margin: 0;
|
||||
}
|
||||
/* Common elements {{{ */
|
||||
|
||||
img,
|
||||
video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.post-media > figure img,
|
||||
.post-media > figure video {
|
||||
figure > .figure-media {
|
||||
padding: 5px;
|
||||
border: 7px solid var(--figure-border);
|
||||
}
|
||||
|
||||
figure img,
|
||||
figure video {
|
||||
padding: 5px;
|
||||
figure > .figure-media.border {
|
||||
border: 2px solid var(--figure-border);
|
||||
}
|
||||
|
||||
.post-media > figure > .figure-media {
|
||||
border: 7px solid var(--figure-border);
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: auto;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
@@ -240,14 +217,6 @@ hr {
|
||||
border: 1px solid var(--background-3);
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
.full-width-hr {
|
||||
/* see also: the related-posts section too */
|
||||
margin-left: calc(-100vw / 2 + 760px / 2);
|
||||
margin-right: calc(-100vw / 2 + 760px / 2);
|
||||
}
|
||||
}
|
||||
|
||||
table.simple {
|
||||
border-collapse: collapse;
|
||||
border: 2px solid var(--text-1);
|
||||
@@ -307,12 +276,74 @@ table.simple tbody tr:nth-child(even) {
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* Heading formatting (article section titles) {{{ */
|
||||
/* Baseof formatting {{{ */
|
||||
|
||||
/* this is also used i.e. in page-title */
|
||||
.heading-link {
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
@media screen and (prefers-reduced-motion: reduce) {
|
||||
html {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--background-0);
|
||||
color: var(--text-0);
|
||||
overflow-wrap: break-word;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* body-module types:
|
||||
*
|
||||
* full-width: no max-width, no margin from the sides of the page
|
||||
* full-padded: no max-width, but has margin from the left/right page edges
|
||||
* center: max-width 720px, centered when too large, padded when screen is narrow
|
||||
*/
|
||||
|
||||
.body-module--full-width,
|
||||
.body-module--full-padded,
|
||||
.body-module--center-wide {
|
||||
margin-block: var(--page-margin);
|
||||
}
|
||||
|
||||
.body-module--full-width {
|
||||
margin-inline: 0;
|
||||
}
|
||||
.body-module-full-padded {
|
||||
margin-inline: var(--page-margin);
|
||||
}
|
||||
.body-module--center {
|
||||
margin-inline: auto;
|
||||
/* add the minimum margin here because we are using auto for its centering */
|
||||
padding-inline: var(--page-margin);
|
||||
/* account for the padding being included in the element's calculated width */
|
||||
max-width: calc(720px + 2 * var(--page-margin));
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-bottom: var(--page-margin);
|
||||
text-align: center;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
footer p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#skip-to-main {
|
||||
position: absolute;
|
||||
padding: 8px;
|
||||
background-color: var(--text-0);
|
||||
color: var(--background-0);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
#skip-to-main:focus {
|
||||
transform: translateY(0%);
|
||||
}
|
||||
#main-content:target {
|
||||
animation: none; /* prevent it from turning yellow */
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -325,23 +356,30 @@ table.simple tbody tr:nth-child(even) {
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
background-color: var(--background-1);
|
||||
/* padding can't be here because then the first navbar element will be shifted too far over,
|
||||
* or it will need its hover background to be chopped off on the left */
|
||||
}
|
||||
|
||||
.header {
|
||||
.brand {
|
||||
flex-grow: 1;
|
||||
margin: 8px 16px;
|
||||
margin: 8px var(--page-margin);
|
||||
font-size: 1.25em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brand a {
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.navbar-item {
|
||||
padding: 12px 16px;
|
||||
padding: 12px var(--page-margin);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -356,28 +394,8 @@ table.simple tbody tr:nth-child(even) {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Skip to main content {{{ */
|
||||
#skip-to-main {
|
||||
position: absolute;
|
||||
padding: 8px;
|
||||
background-color: var(--text-0);
|
||||
color: var(--background-0);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
#skip-to-main:focus {
|
||||
transform: translateY(0%);
|
||||
}
|
||||
#main-content:target {
|
||||
animation: none; /* prevent it from turning yellow */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Breadcrumb navigation {{{ */
|
||||
|
||||
.breadcrumb {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.breadcrumb ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -483,6 +501,10 @@ table.simple tbody tr:nth-child(even) {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-title a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.page-title h1 {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -500,6 +522,14 @@ table.simple tbody tr:nth-child(even) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
:is(
|
||||
.page-metadata-section:is(.categories, .tags, .series),
|
||||
.page-metadata-item.authors
|
||||
) > a:not(:last-child):after {
|
||||
color: var(--text-0);
|
||||
content: ",";
|
||||
}
|
||||
|
||||
.post-media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
@@ -626,14 +656,10 @@ table.simple tbody tr:nth-child(even) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.view-section {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* Content (single) formatting {{{ */
|
||||
/* Components exclusive to content/single pages {{{ */
|
||||
|
||||
.series-box {
|
||||
background-color: var(--background-1);
|
||||
@@ -697,19 +723,6 @@ table.simple tbody tr:nth-child(even) {
|
||||
}
|
||||
*/
|
||||
|
||||
/* See also formating */
|
||||
.see-also {
|
||||
background-color: var(--background-1);
|
||||
color: var(--text-1);
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.see-also p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Previous and next page buttons {{{ */
|
||||
|
||||
.prevnext {
|
||||
@@ -760,6 +773,45 @@ table.simple tbody tr:nth-child(even) {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Related posts section {{{ */
|
||||
|
||||
/* set the margins on the contents instead of the parent .related-posts
|
||||
* so that the posts in the list clip off the edge of the screen,
|
||||
* which makes a more obvious indicator that it's scrollable
|
||||
*/
|
||||
|
||||
.related-posts > hr,
|
||||
.related-posts > h1 {
|
||||
margin: var(--page-margin);
|
||||
}
|
||||
|
||||
.related-posts .page {
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
|
||||
}
|
||||
|
||||
.related-posts .page:first-child {
|
||||
margin-left: var(--page-margin);
|
||||
}
|
||||
.related-posts .page:last-child {
|
||||
margin-right: var(--page-margin);
|
||||
}
|
||||
|
||||
.related-posts .page-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
overflow-x: auto;
|
||||
margin-bottom: var(--page-margin);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Content components (can appear both in single and list pages) {{{ */
|
||||
|
||||
/* Code & code blocks {{{ */
|
||||
.code-block {
|
||||
display: flex;
|
||||
@@ -776,10 +828,13 @@ table.simple tbody tr:nth-child(even) {
|
||||
padding: 4px 8px;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
height: 2em;
|
||||
}
|
||||
.code-block > .code-header > * {
|
||||
margin: auto 0;
|
||||
}
|
||||
.code-block > .code-header > .code-type {
|
||||
border-top-left-radius: 8px;
|
||||
margin: auto 0;
|
||||
}
|
||||
/* TODO: make the code copy button prettier */
|
||||
.code-block > .code-header > .code-copy-button {
|
||||
@@ -873,44 +928,23 @@ aside.quote {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Related posts section {{{ */
|
||||
|
||||
.full-width-page-list {
|
||||
/* make left/right 0 margin so it takes up full width */
|
||||
margin: 25px 0;
|
||||
/* See also formating */
|
||||
.see-also {
|
||||
background-color: var(--background-1);
|
||||
color: var(--text-1);
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.related-posts > hr,
|
||||
.related-posts > h1 {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.related-posts .page {
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
|
||||
}
|
||||
|
||||
.related-posts .page:first-child {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.related-posts .page:last-child {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.related-posts .page-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
overflow-x: scroll;
|
||||
.see-also p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
/* @media specializations {{{ */
|
||||
|
||||
/* Light mode */
|
||||
@@ -924,8 +958,10 @@ aside.quote {
|
||||
/* Print compatibility {{{ */
|
||||
@media print {
|
||||
.top > .navbar,
|
||||
.section-header-link,
|
||||
.content-heading-link,
|
||||
.post-meta-edit-history,
|
||||
.post-meta-view-markdown,
|
||||
.code-copy-button,
|
||||
.prevnext,
|
||||
.share-buttons,
|
||||
.related-posts {
|
||||
|
132
assets/css/comments.css
Normal file
132
assets/css/comments.css
Normal file
@@ -0,0 +1,132 @@
|
||||
.comments > h2 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.comments .email-address-notice {
|
||||
margin: 0;
|
||||
font-size: smaller;
|
||||
}
|
||||
.comments .enable-javascript-notice {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Isso styling */
|
||||
h4.isso-thread-heading {
|
||||
color: var(--text-0);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.isso-comment:not(:first-of-type),
|
||||
.isso-follow-up .isso-comment {
|
||||
border-color: var(--background-3);
|
||||
}
|
||||
|
||||
.isso-author,
|
||||
.isso-page-author-suffix,
|
||||
.isso-comment-footer,
|
||||
.isso-comment-footer .isso-votes {
|
||||
color: var(--text-gray-0);
|
||||
}
|
||||
|
||||
.isso-comment-header .isso-spacer,
|
||||
.isso-spacer:hover,
|
||||
.isso-permalink,
|
||||
.isso-permalink:hover {
|
||||
color: var(--text-gray-1) !important;
|
||||
}
|
||||
a.isso-author:hover,
|
||||
.isso-permalink:hover {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.isso-comment.isso-is-page-author > .isso-text-wrapper {
|
||||
background-color: var(--background-accent-1);
|
||||
}
|
||||
|
||||
.isso-feedlink:hover,
|
||||
.isso-reply {
|
||||
color: var(--link-0) !important;
|
||||
text-shadow: unset !important;
|
||||
}
|
||||
.isso-reply:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.isso-text pre,
|
||||
.isso-text :not(pre) > code {
|
||||
background-color: var(--background-2);
|
||||
border: none;
|
||||
padding: 2px 4px;
|
||||
border-radius: 5px;
|
||||
/* thanks isso.css for setting this to 85% for whatever reason */
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.isso-input-wrapper input,
|
||||
.isso-post-action > input,
|
||||
.isso-textarea,
|
||||
.isso-preview {
|
||||
color: var(--text-1);
|
||||
background-color: var(--background-1);
|
||||
border-color: var(--background-2) !important;
|
||||
}
|
||||
|
||||
.isso-input-wrapper input:focus,
|
||||
.isso-textarea:focus {
|
||||
border-color: var(--background-3) !important;
|
||||
}
|
||||
|
||||
.isso-post-action > input:hover {
|
||||
background-color: var(--background-2);
|
||||
}
|
||||
.isso-post-action > input:focus,
|
||||
.isso-post-action > input:active {
|
||||
background-color: var(--background-3);
|
||||
}
|
||||
|
||||
.isso-textarea {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.isso-input-wrapper {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
margin-right: 4px;
|
||||
max-width: 25%;
|
||||
}
|
||||
.isso-input-wrapper input {
|
||||
order: 1;
|
||||
}
|
||||
.isso-input-wrapper label {
|
||||
order: 2;
|
||||
font-size: small;
|
||||
}
|
||||
.isso-post-action {
|
||||
margin-left: 4px;
|
||||
margin-top: 0;
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.isso-input-wrapper {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.comments {
|
||||
break-before: always;
|
||||
}
|
||||
.isso-comment {
|
||||
max-width: unset;
|
||||
}
|
||||
.isso-text-wrapper {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
.isso-postbox,
|
||||
.isso-feedlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.isso-target {
|
||||
animation: target-fade 10s ease-out; /* defined in bobatheme */
|
||||
}
|
4
assets/css/noscript.css
Normal file
4
assets/css/noscript.css
Normal file
@@ -0,0 +1,4 @@
|
||||
.page-meta-comments-counter,
|
||||
.code-copy-button {
|
||||
display: none;
|
||||
}
|
9
assets/css/search.css
Normal file
9
assets/css/search.css
Normal file
@@ -0,0 +1,9 @@
|
||||
/* put on body so it overrides the defaults set in :root by pagefind.css */
|
||||
body {
|
||||
/* https://pagefind.app/docs/ui-usage/#customising-the-styles */
|
||||
--pagefind-ui-background: var(--background-1);
|
||||
--pagefind-ui-border: var(--background-2);
|
||||
--pagefind-ui-primary: var(--link-0);
|
||||
--pagefind-ui-tag: var(--background-1);
|
||||
--pagefind-ui-text: var(--text-1);
|
||||
}
|
3
assets/js/share-event.js
Normal file
3
assets/js/share-event.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function share_event(service) {
|
||||
plausible("Share", {props: {Network: service}});
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading">
|
||||
{{ .Text | safeHTML }}
|
||||
<a class="heading-link" href="#{{ .Anchor | safeURL }}">
|
||||
<a class="content-heading-link" href="#{{ .Anchor | safeURL }}">
|
||||
<span aria-label="{{ i18n "aria_heading_link" }}">
|
||||
{{ partial "icon.html" "link" }}
|
||||
</span>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<nav class="breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
|
||||
<nav class="body-module--center breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
|
||||
<ul>
|
||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
</ul>
|
||||
|
@@ -1,4 +1,20 @@
|
||||
{{/*
|
||||
Create a file named `layouts/partials/comments.html` at your site root to
|
||||
add a comment system. Page variables are passed.
|
||||
*/}}
|
||||
{{/* put comments CSS here instead of in <head> so that it doesn't get
|
||||
* loaded unnecessarily on regular pages
|
||||
*/}}
|
||||
{{ with resources.Get "css/comments.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
<h2>Comments</h2>
|
||||
<p class="email-address-notice">
|
||||
If you provide an email address, you can enable notifications for
|
||||
replies to your comment. It will not be shown publicly.
|
||||
</p>
|
||||
|
||||
<noscript>
|
||||
<p class="enable-javascript-notice">
|
||||
Enable JavaScript to see the comment section.
|
||||
</p>
|
||||
</noscript>
|
||||
|
||||
<section id="isso-thread" data-title="{{ .Title }}"></section>
|
||||
|
@@ -1,7 +0,0 @@
|
||||
{{ with .Description }}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ with .Summary }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -3,9 +3,9 @@
|
||||
* claims that images won't work with JS disabled since it would
|
||||
* make tracking possible, but my experience says otherwise
|
||||
*/}}
|
||||
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||
<img class="figure-media" src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||
{{ else if eq .ResourceType "video" }}
|
||||
<video controls preload="metadata">
|
||||
<video class="figure-media" controls preload="metadata">
|
||||
{{ with .Params.alt }}
|
||||
{{ warnf "video does not support alt text, '%s'" . }}
|
||||
{{ end }}
|
||||
|
@@ -6,6 +6,12 @@
|
||||
{{ with resources.Get "css/bobastyle.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ with resources.Get "css/noscript.css" | fingerprint "sha512" }}
|
||||
<noscript>
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
</noscript>
|
||||
{{ end }}
|
||||
|
||||
{{ with resources.Get "css/syntax.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='all'">
|
||||
{{ end }}
|
||||
@@ -16,6 +22,65 @@
|
||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ if not hugo.IsServer }}
|
||||
<script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.outbound-links.js"></script>
|
||||
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
||||
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $isso_url := .Permalink }}
|
||||
{{ if .IsTranslated }}
|
||||
{{ with index .AllTranslations 0 }}
|
||||
{{ $isso_url = .Permalink }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<script defer src="https://isso.bbaovanc.com/js/embed.min.js"
|
||||
data-isso-id="{{ $isso_url }}"
|
||||
data-isso-default-lang="{{ .Language.Lang }}"
|
||||
data-isso-css="true"
|
||||
data-isso-max-comments-top="inf"
|
||||
data-isso-max-comments-nested="inf"
|
||||
data-isso-reveal-on-click="5"
|
||||
{{/*
|
||||
data-isso-avatar-bg="#111"
|
||||
data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..."
|
||||
*/}}
|
||||
data-isso-vote="true"
|
||||
{{/*
|
||||
data-isso-vote-levels=""
|
||||
*/}}
|
||||
data-isso-feed="true"
|
||||
data-isso-require-email="false"
|
||||
data-isso-reply-notifications="true"
|
||||
data-isso-reply-notifications-default-enabled="true"
|
||||
|
||||
{{ with (.GetTerms "authors") }}
|
||||
{{ $authorHashes := slice }}
|
||||
{{ range . }}
|
||||
{{ with .Params.issoUserID }}
|
||||
{{ $authorHashes = $authorHashes | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
data-isso-page-author-hashes="{{ delimit $authorHashes "," }}"
|
||||
{{ end }}
|
||||
>
|
||||
</script>
|
||||
|
||||
{{ if eq .Layout "search" }}
|
||||
{{ with resources.Get "css/search.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ absURL "pagefind/pagefind-ui.css" }}" crossorigin="anonymous">
|
||||
<script src="{{ absURL "pagefind/pagefind-ui.js" }}" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
new PagefindUI({ element: "#search-box", showSubResults: true });
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.faviconSVG }}
|
||||
<link rel="icon" href="{{ . | absURL }}" />
|
||||
@@ -26,6 +91,10 @@
|
||||
|
||||
<title>{{ .Render "head_title" }}</title>
|
||||
|
||||
{{ range .Site.Params.rel_me }}
|
||||
<link rel="me" href="{{ . }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ partial "seo-tags/opengraph.html" . }}
|
||||
{{ partial "seo-tags/twitter-cards.html" . }}
|
||||
{{ partial "seo-tags/schema.html" . }}
|
||||
@@ -34,6 +103,4 @@
|
||||
|
||||
<meta name="language" content="{{ .Language.Lang }}">
|
||||
<meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||
|
||||
{{ partial "additional-head.html" . }}
|
||||
</head>
|
||||
|
@@ -1 +0,0 @@
|
||||
<!-- Placeholder for website to add custom post metadata to summaries -->
|
@@ -1,16 +1,9 @@
|
||||
{{ with .Params.authors }}
|
||||
<span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
{{ with .GetTerms "authors" }}
|
||||
<span class="page-metadata-item authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
|
||||
{{ if index $.Site.Taxonomies "authors" }}
|
||||
{{ $authors := slice }}
|
||||
{{ range . }}
|
||||
{{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }}
|
||||
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url .) }}
|
||||
{{ end }}
|
||||
{{ delimit $authors ", " | safeHTML }}
|
||||
{{ else }}
|
||||
{{ delimit . ", " }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="author">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
@@ -4,8 +4,10 @@
|
||||
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
{{ partial "icon.html" "folder" }}
|
||||
{{ delimit $categories ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="category">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<span class="page-metadata-item page-meta-comments-counter" aria-label="comments counter">
|
||||
{{ partial "icon.html" "message" }}
|
||||
{{/* TODO: figure out if there's a nicer way to generate this URL
|
||||
* the current issue is that we can't use RelRef, since content view means that we don't
|
||||
* have access to the original page context
|
||||
*/}}
|
||||
<a href="{{ .RelPermalink }}#isso-thread">comments</a>
|
||||
</span>
|
@@ -1,11 +1,8 @@
|
||||
{{ with (.GetTerms "series") }}
|
||||
{{ $series := slice }}
|
||||
{{ range . }}
|
||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||
{{ partial "icon.html" "files" }}
|
||||
{{ delimit $series ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="series">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
{{ with (.GetTerms "tags") }}
|
||||
{{ $tags := slice }}
|
||||
{{ range . }}
|
||||
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
{{ delimit $tags ", " | safeHTML }}
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" data-pagefind-filter="tag">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@@ -21,8 +21,7 @@
|
||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||
|
||||
{{ partial "page-metadata/custom-full.html" . }}
|
||||
{{ partial "page-metadata/item/comments-counter.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
{{ partial "page-metadata/item/authors.html" . }}
|
||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||
{{ partial "page-metadata/item/comments-counter.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/series.html" . }}
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<nav class="pagination">
|
||||
{{/* https://github.com/gohugoio/hugo/blob/a88b488181279befd50e1d127f9f67604f2f9854/tpl/tplimpl/embedded/templates/_partials/pagination.html */}}
|
||||
{{ partial "_internal/pagination.html" . }}
|
||||
{{ partial "pagination-hugo.html" . }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
@@ -3,16 +3,6 @@
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
|
||||
{{ $images := $.Resources.ByType "image" }}
|
||||
{{ $featured := $images.GetMatch "*feature*" }}
|
||||
{{ if not $featured }}
|
||||
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $featured }}
|
||||
<meta property="og:image" content="{{ $featured.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Section }}
|
||||
<meta property="article:section" content="{{ . }}">
|
||||
{{ end }}
|
||||
@@ -37,12 +27,38 @@
|
||||
<meta property="og:site_name" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{ $images := $.Resources.ByType "image" }}
|
||||
{{ $featured := $images.GetMatch "*feature*" }}
|
||||
{{ if not $featured }}
|
||||
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $featured }}
|
||||
<meta property="og:image" content="{{ $featured.Permalink }}">
|
||||
{{ with .Params.alt }}
|
||||
<meta property="og:image:alt" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with .MediaType }}
|
||||
<meta property="og:image:type" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with .Width }}
|
||||
<meta property="og:image:width" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with .Height }}
|
||||
<meta property="og:image:height" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $videos := $.Resources.ByType "video" }}
|
||||
{{ $featured_video := $videos.GetMatch "*feature*" }}
|
||||
{{ if not $featured_video }}
|
||||
{{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ with $featured_video }}
|
||||
<meta property="og:video" content="{{ $featured_video.Permalink | absURL }}">
|
||||
{{ with .MediaType }}
|
||||
<meta property="og:video:type" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@@ -31,6 +31,8 @@
|
||||
*/}}
|
||||
{{ with .Site.Params.social.twitter }}
|
||||
<meta name="twitter:site" content="@{{ . }}">
|
||||
{{ else }}
|
||||
{{ errorf "a twitter username is required for twitter cards to work" }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "authors" }}
|
||||
{{ range . }}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<div class="top">
|
||||
<header class="header">
|
||||
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
|
||||
<header class="top">
|
||||
<div class="brand">
|
||||
<a href="{{ .Site.Home.Permalink | absLangURL }}">
|
||||
{{ .Site.Title | markdownify }}
|
||||
</a>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
||||
{{ with .Site.Home }}
|
||||
@@ -21,4 +21,4 @@
|
||||
href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
@@ -12,6 +12,6 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with or (.Get "caption") (.Get 0) $resource_title }}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
<figcaption>{{ (replace . "\\bt" "`") | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
@@ -1 +0,0 @@
|
||||
<hr class="full-width-hr">
|
@@ -1,24 +1,26 @@
|
||||
{{ define "main" }}
|
||||
<h1>
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
{{ .Title | markdownify }}
|
||||
</h1>
|
||||
<section class="body-module--center">
|
||||
<h1>
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
{{ .Title | markdownify }}
|
||||
</h1>
|
||||
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
<article class="page">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
<article class="page">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
@@ -1,13 +1,15 @@
|
||||
<h2 class="page-title">
|
||||
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h2>
|
||||
|
||||
{{ partial "page-metadata/author.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
|
@@ -8,24 +8,22 @@
|
||||
|
||||
{{ partial "top.html" . }}
|
||||
|
||||
<div class="main-container">
|
||||
{{ if not .IsHome }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<main id="main-content" {{ if .IsPage }}data-pagefind-body{{ end }}>
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ end }}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{{ block "post-body" . }}
|
||||
{{/* currently this is only used for related posts */}}
|
||||
{{ if not .IsHome }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ block "pre-body" . }}{{ end }}
|
||||
|
||||
<main id="main-content">
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
{{ block "post-body" . }}{{ end }}
|
||||
|
||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||
<footer>
|
||||
<footer class="body-module--center">
|
||||
{{ with .Site.Copyright }}
|
||||
{{ . | safeHTML }}
|
||||
{{ end }}
|
||||
|
@@ -1,13 +1,15 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
<article class="homepage-content">
|
||||
<article class="body-module--center">
|
||||
{{ . }}
|
||||
</article>
|
||||
<hr>
|
||||
<hr class="body-module--center">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ if .Site.Params.homepageLatestPosts }}
|
||||
<div class="homepage-latest-posts">
|
||||
<div class="body-module--center">
|
||||
<h1>
|
||||
{{ i18n "latest_posts" }}
|
||||
{{ partial "rss-link.html" . }}
|
||||
|
86
layouts/page.html
Normal file
86
layouts/page.html
Normal file
@@ -0,0 +1,86 @@
|
||||
{{ define "main" }}
|
||||
<article class="body-module--center">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{{ partial "page-metadata/post-full.html" . }}
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if .Params.Toc }}
|
||||
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
||||
<details>
|
||||
<summary>{{ i18n "table_of_contents" }}</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</div>
|
||||
<div class="table-of-contents print">
|
||||
{{ i18n "table_of_contents" }}
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<article class="post-content" data-pagefind-body>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="prevnext">
|
||||
{{ with .NextInSection }}
|
||||
<a class="prev" href="{{ .Permalink }}">
|
||||
<div class="prev-caption">
|
||||
← {{ i18n "newer_post" }}
|
||||
</div>
|
||||
<div class="prev-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="prev"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .PrevInSection }}
|
||||
<a class="next" href="{{ .Permalink }}">
|
||||
<div class="next-caption">
|
||||
{{ i18n "older_post" }} →
|
||||
</div>
|
||||
<div class="next-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="next"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.shareButtons }}
|
||||
{{ partial "share.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.comments }}
|
||||
<div class="comments">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||
{{ with $related }}
|
||||
<div class="body-module--full-width related-posts">
|
||||
<hr>
|
||||
<h1>{{ i18n "related_posts" }}</h1>
|
||||
{{ partial "page-list.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -1,2 +1,6 @@
|
||||
User-Agent: *
|
||||
Sitemap: {{ "sitemap.xml" | absLangURL }}
|
||||
|
||||
{{/* It complains about the raw markdown output having no title tag */ -}}
|
||||
User-Agent: Bingbot
|
||||
Disallow: /blog/*.md$
|
||||
|
3
layouts/search.html
Normal file
3
layouts/search.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
<div id="search-box"></div>
|
||||
{{ end }}
|
@@ -5,8 +5,10 @@
|
||||
{{ .Title | markdownify }}
|
||||
</h2>
|
||||
|
||||
<div class="section-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="section-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -1,14 +1,16 @@
|
||||
<h2 class="page-title">
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h2>
|
||||
|
||||
{{ partial "page-metadata/series.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list series-inner">
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
|
@@ -1,84 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{{ partial "page-metadata/post-full.html" . }}
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if .Params.Toc }}
|
||||
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
||||
<details>
|
||||
<summary>{{ i18n "table_of_contents" }}</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</div>
|
||||
<div class="table-of-contents print">
|
||||
{{ i18n "table_of_contents" }}
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<article class="post-content">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="prevnext">
|
||||
{{ with .NextInSection }}
|
||||
<a class="prev" href="{{ .Permalink }}">
|
||||
<div class="prev-caption">
|
||||
← {{ i18n "newer_post" }}
|
||||
</div>
|
||||
<div class="prev-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="prev"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .PrevInSection }}
|
||||
<a class="next" href="{{ .Permalink }}">
|
||||
<div class="next-caption">
|
||||
{{ i18n "older_post" }} →
|
||||
</div>
|
||||
<div class="next-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="next"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.shareButtons }}
|
||||
{{ partial "share.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.comments }}
|
||||
<div class="comments">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||
{{ with $related }}
|
||||
<div class="related-posts">
|
||||
<hr>
|
||||
<h1>{{ i18n "related_posts" }}</h1>
|
||||
{{ partial "page-list.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -1,6 +1,6 @@
|
||||
<h2 class="page-title">
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h2>
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<div class="page-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
{{ with .Summary }}
|
||||
<div class="page-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
</a>
|
||||
{{ partial "page-metadata/taxonomy.html" . }}
|
||||
</div>
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
{{ .Summary }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@@ -8,7 +8,7 @@ description = "Simple Hugo theme for boba.best and bbaovanc.com"
|
||||
homepage = "https://bbaovanc.com"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.93.0"
|
||||
min_version = "0.146.0"
|
||||
|
||||
[author]
|
||||
name = "bbaovanc"
|
||||
|
Reference in New Issue
Block a user