1 Commits

Author SHA1 Message Date
b1cdf7c318 Remove share buttons
About 0.19% of visitors in the past 12 months have clicked the share
buttons at all. The code is a little ugly, and it wastes a tiny bit of
space at the bottom of the page. I don't think it's really worth having.

And I think people probably print a page through the browser UI anyways.
2025-08-09 00:22:27 -05:00
22 changed files with 209 additions and 415 deletions

View File

@@ -24,17 +24,7 @@ series:
resources: resources:
- name: feature - name: feature
src: something.webp src: something.webp
title: >- title: Some image (image format can be anything; webp is just an example)
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).
--- ---

View File

@@ -293,35 +293,17 @@ body {
color: var(--text-0); color: var(--text-0);
overflow-wrap: break-word; overflow-wrap: break-word;
margin: 0; margin: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--page-margin);
} }
.body-module { .main-container {
width: 100%; /* without, it collapses inside flexbox for some reason TODO: figure out why */ margin: var(--page-margin) auto;
} /* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
padding: 0 var(--page-margin);
.body-module--marginless { max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
margin: 0;
}
.body-module--full-width {
margin: 0 var(--page-margin);
/*
margin-left: var(--page-margin);
margin-right: var(--page-margin);
*/
}
.body-module--wide {
margin-left: var(--page-margin);
margin-right: var(--page-margin);
max-width: 720px;
} }
footer { footer {
margin-bottom: var(--page-margin); margin: var(--page-margin) 0;
text-align: center; text-align: center;
font-size: smaller; font-size: smaller;
} }
@@ -330,20 +312,6 @@ footer p {
margin: 0; 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 */
}
/* }}} */ /* }}} */
/* Top bar formatting {{{ */ /* Top bar formatting {{{ */
@@ -358,7 +326,7 @@ footer p {
* or it will need its hover background to be chopped off on the left */ * or it will need its hover background to be chopped off on the left */
} }
.brand { .header {
flex-grow: 1; flex-grow: 1;
margin: 8px var(--page-margin); margin: 8px var(--page-margin);
font-size: 1.25em; font-size: 1.25em;
@@ -366,7 +334,7 @@ footer p {
align-items: center; align-items: center;
} }
.brand a { .header a {
color: inherit; color: inherit;
font-weight: bold; font-weight: bold;
} }
@@ -392,8 +360,28 @@ footer p {
/* }}} */ /* }}} */
/* 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 navigation {{{ */
.breadcrumb {
margin: var(--page-margin) 0;
}
.breadcrumb ul { .breadcrumb ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
@@ -520,14 +508,6 @@ footer p {
margin-top: 10px; 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 { .post-media {
margin-top: 15px; margin-top: 15px;
} }
@@ -654,6 +634,10 @@ footer p {
margin-bottom: 5px; margin-bottom: 5px;
} }
.view-section {
margin-top: 5px;
}
/* }}} */ /* }}} */
@@ -684,42 +668,18 @@ footer p {
padding: 8px 15px; padding: 8px 15px;
} }
/* Social media share buttons */ /* See also formating */
.see-also {
.share-buttons { background-color: var(--background-1);
background: var(--background-1);
color: var(--text-1); color: var(--text-1);
margin: 25px 0; padding: 8px 12px;
padding: 8px 0;
border-radius: 8px; border-radius: 8px;
display: flex; margin: 10px 0;
gap: 8px;
justify-content: center;
font-size: 32px;
} }
.share-buttons a { .see-also p {
background-color: var(--background-2); margin: 0;
color: var(--text-2);
padding: 4px;
border-radius: 8px;
} }
.share-buttons a:hover {
background-color: var(--background-3);
color: var(--text-3);
}
.share-buttons svg {
display: block;
}
/* https://stackoverflow.com/a/72073682/19003757 */
/*
.telegram-share > svg {
transform: scale(1.5);
margin: 9px -9px -9px 9px;
}
*/
/* Previous and next page buttons {{{ */ /* Previous and next page buttons {{{ */
@@ -771,45 +731,6 @@ footer p {
/* }}} */ /* }}} */
/* 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 & code blocks {{{ */
.code-block { .code-block {
display: flex; display: flex;
@@ -826,13 +747,10 @@ footer p {
padding: 4px 8px; padding: 4px 8px;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
height: 2em;
}
.code-block > .code-header > * {
margin: auto 0;
} }
.code-block > .code-header > .code-type { .code-block > .code-header > .code-type {
border-top-left-radius: 8px; border-top-left-radius: 8px;
margin: auto 0;
} }
/* TODO: make the code copy button prettier */ /* TODO: make the code copy button prettier */
.code-block > .code-header > .code-copy-button { .code-block > .code-header > .code-copy-button {
@@ -926,21 +844,42 @@ aside.quote {
/* }}} */ /* }}} */
/* See also formating */ /* Related posts section {{{ */
.see-also {
background-color: var(--background-1); /* set the margins on the contents instead of the parent .related-posts
color: var(--text-1); * so that the posts in the list clip off the edge of the screen,
padding: 8px 12px; * which makes a more obvious indicator that it's scrollable
border-radius: 8px; */
margin: 10px 0;
.related-posts > hr,
.related-posts > h1 {
margin: var(--page-margin);
} }
.see-also p { .related-posts .page {
margin: 0; 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);
} }
/* }}} */ /* }}} */
/* }}} */
/* @media specializations {{{ */ /* @media specializations {{{ */
@@ -961,7 +900,6 @@ aside.quote {
.post-meta-view-markdown, .post-meta-view-markdown,
.code-copy-button, .code-copy-button,
.prevnext, .prevnext,
.share-buttons,
.related-posts { .related-posts {
display: none; display: none;
} }

View File

@@ -1,14 +1,3 @@
.comments > h2 {
margin-bottom: 0;
}
.comments .email-address-notice {
margin: 0;
font-size: smaller;
}
.comments .enable-javascript-notice {
font-style: italic;
}
/* Isso styling */ /* Isso styling */
h4.isso-thread-heading { h4.isso-thread-heading {
color: var(--text-0); color: var(--text-0);

View File

@@ -1,4 +0,0 @@
.page-meta-comments-counter,
.code-copy-button {
display: none;
}

View File

@@ -1,3 +0,0 @@
function share_event(service) {
plausible("Share", {props: {Network: service}});
}

View File

@@ -125,21 +125,3 @@ aria_navbar:
aria_table_of_contents: aria_table_of_contents:
other: "table of contents" other: "table of contents"
aria_share_twitter:
other: "share to twitter button"
aria_share_facebook:
other: "share to facebook button"
aria_share_linkedin:
other: "share to linkedin button"
aria_share_reddit:
other: "share to reddit button"
aria_share_telegram:
other: "share to telegram button"
aria_share_print:
other: "print article button"

View File

@@ -1,4 +1,4 @@
<nav class="body-module body-module--wide breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}"> <nav class="breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
<ul> <ul>
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }} {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ul> </ul>

View File

@@ -1,20 +1,15 @@
{{/* 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" }} {{ with resources.Get "css/comments.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 }}
<h2>Comments</h2> <h2 style="margin-bottom: 0;">Comments</h2>
<p class="email-address-notice"> <p style="margin: 0; font-size: smaller;">
If you provide an email address, you can enable notifications for If you provide an email address, you can enable notifications for
replies to your comment. It will not be shown publicly. replies to your comment. It will not be shown publicly.
</p> </p>
<noscript> <noscript>
<p class="enable-javascript-notice"> <i>Enable JavaScript to see the comment section.</i>
Enable JavaScript to see the comment section.
</p>
</noscript> </noscript>
<section id="isso-thread" data-title="{{ .Title }}"></section> <section id="isso-thread" data-title="{{ .Title }}"></section>

View File

@@ -6,12 +6,6 @@
{{ with resources.Get "css/bobastyle.css" | fingerprint "sha512" }} {{ with resources.Get "css/bobastyle.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 "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" }} {{ 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'"> <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='all'">
{{ end }} {{ end }}
@@ -25,9 +19,6 @@
{{ if not hugo.IsServer }} {{ if not hugo.IsServer }}
<script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.outbound-links.js"></script> <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> <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 }} {{ end }}
{{ $isso_url := .Permalink }} {{ $isso_url := .Permalink }}
{{ if .IsTranslated }} {{ if .IsTranslated }}

View File

@@ -1,9 +1,16 @@
{{ with .GetTerms "authors" }} {{ with .Params.authors }}
<span class="page-metadata-item authors" aria-label="{{ i18n "aria_post_meta_authors" }}"> <span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ partial "icon.html" "user-circle" }} {{ partial "icon.html" "user-circle" }}
{{ range . }} {{ if index $.Site.Taxonomies "authors" }}
<a href="{{ .Permalink }}" data-pagefind-filter="author">{{ .LinkTitle }}</a> {{ $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 . ", " }}
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}

View File

@@ -4,10 +4,8 @@
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} {{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }} {{ end }}
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}"> <div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
{{ partial "icon.html" "folder" }} {{ partial "icon.html" "folder" }}
{{ range . }} {{ delimit $categories ", " | safeHTML }}
<a href="{{ .Permalink }}" data-pagefind-filter="category">{{ .LinkTitle }}</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@@ -1,4 +1,4 @@
<span class="page-metadata-item page-meta-comments-counter" aria-label="comments counter"> <span class="page-metadata-item" aria-label="comments counter">
{{ partial "icon.html" "message" }} {{ partial "icon.html" "message" }}
{{/* TODO: figure out if there's a nicer way to generate this URL {{/* 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 * the current issue is that we can't use RelRef, since content view means that we don't

View File

@@ -1,8 +1,11 @@
{{ with (.GetTerms "series") }} {{ with (.GetTerms "series") }}
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_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" }}">
{{ partial "icon.html" "files" }} {{ partial "icon.html" "files" }}
{{ range . }} {{ delimit $series ", " | safeHTML }}
<a href="{{ .Permalink }}" data-pagefind-filter="series">{{ .LinkTitle }}</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@@ -1,10 +1,11 @@
{{ with (.GetTerms "tags") }} {{ with (.GetTerms "tags") }}
{{ $tags := slice }} {{ $tags := slice }}
{{ range . }}
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> <div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
{{ partial "icon.html" "tag" }} {{ partial "icon.html" "tag" }}
{{ range . }} {{ delimit $tags ", " | safeHTML }}
<a href="{{ .Permalink }}" data-pagefind-filter="tag">{{ .LinkTitle }}</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@@ -3,6 +3,16 @@
<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 }}">
{{ $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 }} {{ with .Section }}
<meta property="article:section" content="{{ . }}"> <meta property="article:section" content="{{ . }}">
{{ end }} {{ end }}
@@ -27,38 +37,12 @@
<meta property="og:site_name" content="{{ . }}"> <meta property="og:site_name" content="{{ . }}">
{{ end }} {{ 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" }} {{ $videos := $.Resources.ByType "video" }}
{{ $featured_video := $videos.GetMatch "*feature*" }} {{ $featured_video := $videos.GetMatch "*feature*" }}
{{ if not $featured_video }} {{ if not $featured_video }}
{{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }} {{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }}
{{ end }} {{ end }}
{{ with $featured_video }} {{ with $featured_video }}
<meta property="og:video" content="{{ $featured_video.Permalink | absURL }}"> <meta property="og:video" content="{{ $featured_video.Permalink | absURL }}">
{{ with .MediaType }}
<meta property="og:video:type" content="{{ . }}">
{{ end }}
{{ end }} {{ end }}

View File

@@ -31,8 +31,6 @@
*/}} */}}
{{ with .Site.Params.social.twitter }} {{ with .Site.Params.social.twitter }}
<meta name="twitter:site" content="@{{ . }}"> <meta name="twitter:site" content="@{{ . }}">
{{ else }}
{{ errorf "a twitter username is required for twitter cards to work" }}
{{ end }} {{ end }}
{{ with .GetTerms "authors" }} {{ with .GetTerms "authors" }}
{{ range . }} {{ range . }}

View File

@@ -1,69 +0,0 @@
<div class="share-buttons">
{{ if .Site.Params.shareButtons.twitter }}
<a class="twitter-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_twitter" }}"
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"
aria-label="{{ i18n "aria_share_facebook" }}"
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"
aria-label="{{ i18n "aria_share_linkedin" }}"
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"
aria-label="{{ i18n "aria_share_reddit" }}"
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"
aria-label="{{ i18n "aria_share_telegram" }}"
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"
aria-label="{{ i18n "aria_share_print" }}"
href="javascript:void(0)"
onclick="window.print(); share_event('Print');">
{{- partial "icon.html" "printer" -}}
</a>
{{ end }}
</div>

View File

@@ -1,9 +1,9 @@
<header class="body-module body-module--marginless top"> <div class="top">
<div class="brand"> <header class="header">
<a href="{{ .Site.Home.Permalink | absLangURL }}"> <a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }} {{ .Site.Title | markdownify }}
</a> </a>
</div> </header>
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}"> <nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ with .Site.Home }} {{ with .Site.Home }}
@@ -21,4 +21,4 @@
href="{{ .URL }}">{{ .Name }}</a> href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>
</header> </div>

View File

@@ -8,29 +8,29 @@
{{ partial "top.html" . }} {{ partial "top.html" . }}
{{ if not .IsHome }} <div class="main-container">
{{ partial "breadcrumb.html" . }} {{ if not .IsHome }}
{{ end }} {{ partial "breadcrumb.html" . }}
{{ 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 }} {{ end }}
</main>
{{ if or .Site.Copyright .Site.Params.footer }} <main id="main-content">
<footer class="body-module body-module--wide"> {{ block "main" . }}
{{ with .Site.Copyright }} THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ . | safeHTML }}
{{ end }} {{ end }}
</main>
{{ with .Site.Params.footer }} {{ if or .Site.Copyright .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }} <footer>
{{ end }} {{ with .Site.Copyright }}
</footer> {{ . | safeHTML }}
{{ end }} {{ end }}
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</footer>
{{ end }}
</div>
{{ block "post-body" . }} {{ block "post-body" . }}
{{/* currently this is only used for related posts */}} {{/* currently this is only used for related posts */}}

View File

@@ -1,13 +1,13 @@
{{ define "main" }} {{ define "main" }}
{{ with .Content }} {{ with .Content }}
<article class="body-module body-module--wide"> <article class="homepage-content">
{{ . }} {{ . }}
</article> </article>
<hr class="body-module body-module--wide"> <hr>
{{ end }} {{ end }}
{{ if .Site.Params.homepageLatestPosts }} {{ if .Site.Params.homepageLatestPosts }}
<div class="body-module body-module--wide"> <div class="homepage-latest-posts">
<h1> <h1>
{{ i18n "latest_posts" }} {{ i18n "latest_posts" }}
{{ partial "rss-link.html" . }} {{ partial "rss-link.html" . }}

View File

@@ -1,86 +1,80 @@
{{ define "main" }} {{ define "main" }}
<article class="body-module body-module--wide"> <div class="page-title">
<div class="page-title"> <h1>
<h1> {{ .Title | markdownify }}
{{ .Title | markdownify }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} </h1>
</h1> </div>
</div>
{{ partial "page-metadata/post-full.html" . }} {{ partial "page-metadata/post-full.html" . }}
{{ partial "series-box.html" . }} {{ partial "series-box.html" . }}
{{ 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" }}">
<details> <details>
<summary>{{ i18n "table_of_contents" }}</summary> <summary>{{ i18n "table_of_contents" }}</summary>
{{ .TableOfContents }}
</details>
</div>
<div class="table-of-contents print">
{{ i18n "table_of_contents" }}
{{ .TableOfContents }} {{ .TableOfContents }}
</div> </details>
{{ end }} </div>
<div class="table-of-contents print">
{{ partial "feature-figure.html" . }} {{ i18n "table_of_contents" }}
{{ .TableOfContents }}
<article class="post-content" data-pagefind-body> </div>
{{ .Content }}
</article>
{{ partial "series-box.html" . }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
&larr; {{ 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" }} &rarr;
</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 }} {{ end }}
{{ partial "feature-figure.html" . }}
{{ define "post-body" }} <article class="post-content" data-pagefind-body>
{{ $related := .Site.RegularPages.Related . | first 10 }} {{ .Content }}
{{ with $related }}
<div class="related-posts">
<hr>
<h1>{{ i18n "related_posts" }}</h1>
{{ partial "page-list.html" . }}
</div>
{{ end }}
</article> </article>
{{ partial "series-box.html" . }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
&larr; {{ 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" }} &rarr;
</div>
<div class="next-post">
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
<div class="next"></div>
{{ end }}
</div>
{{ 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 }} {{ end }}

View File

@@ -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.146.0" min_version = "0.93.0"
[author] [author]
name = "bbaovanc" name = "bbaovanc"