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
28 changed files with 217 additions and 421 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

@@ -302,30 +302,16 @@ body {
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */ max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
} }
.site-footer { footer {
margin: var(--page-margin) 0; margin: var(--page-margin) 0;
text-align: center; text-align: center;
font-size: smaller; font-size: smaller;
} }
.site-footer p { 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 {{{ */
@@ -340,7 +326,7 @@ body {
* 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;
@@ -348,7 +334,7 @@ body {
align-items: center; align-items: center;
} }
.brand a { .header a {
color: inherit; color: inherit;
font-weight: bold; font-weight: bold;
} }
@@ -374,6 +360,22 @@ body {
/* }}} */ /* }}} */
/* 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 { .breadcrumb {
@@ -506,14 +508,6 @@ body {
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;
} }
@@ -640,6 +634,10 @@ body {
margin-bottom: 5px; margin-bottom: 5px;
} }
.view-section {
margin-top: 5px;
}
/* }}} */ /* }}} */
@@ -670,42 +668,18 @@ body {
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 {{{ */
@@ -757,45 +731,6 @@ body {
/* }}} */ /* }}} */
/* 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;
@@ -812,13 +747,10 @@ body {
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 {
@@ -912,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 {{{ */
@@ -947,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,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

@@ -1,5 +1,5 @@
{{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }} {{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }}
<section class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> <div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }} {{ if .Date }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}"> <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }} {{ partial "icon.html" "calendar" }}
@@ -26,5 +26,5 @@
{{ partial "page-metadata/item/categories.html" . }} {{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }} {{ partial "page-metadata/item/tags.html" . }}
</section> </div>
{{ end }} {{ end }}

View File

@@ -1,5 +1,5 @@
{{ if or .Date .Params.authors .Site.Params.readingtime }} {{ if or .Date .Params.authors .Site.Params.readingtime }}
<section class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> <div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }} {{ if .Date }}
<span class="page-metadata-item" aria-label="date"> <span class="page-metadata-item" aria-label="date">
{{ partial "icon.html" "calendar" }} {{ partial "icon.html" "calendar" }}
@@ -14,5 +14,5 @@
{{ partial "page-metadata/item/series.html" . }} {{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }} {{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }} {{ partial "page-metadata/item/tags.html" . }}
</section> </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 @@
<section 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 }}
</section>

View File

@@ -1,9 +1,9 @@
<header class="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>

24
layouts/authors/list.html Normal file
View File

@@ -0,0 +1,24 @@
{{ define "main" }}
<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>
{{ end }}
</div>
{{ end }}

View File

@@ -1,30 +0,0 @@
{{ define "main" }}
<section>
{{ if .Content }}<article>{{ end }}
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
{{ if .Content }}</article>{{ end }}
<section class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</section>
</section>
{{ end }}

View File

@@ -20,7 +20,7 @@
</main> </main>
{{ if or .Site.Copyright .Site.Params.footer }} {{ if or .Site.Copyright .Site.Params.footer }}
<footer class="site-footer"> <footer>
{{ with .Site.Copyright }} {{ with .Site.Copyright }}
{{ . | safeHTML }} {{ . | safeHTML }}
{{ end }} {{ end }}

View File

@@ -3,11 +3,11 @@
<article class="homepage-content"> <article class="homepage-content">
{{ . }} {{ . }}
</article> </article>
<hr>
{{ end }} {{ end }}
{{ if .Site.Params.homepageLatestPosts }} {{ if .Site.Params.homepageLatestPosts }}
<hr> <div class="homepage-latest-posts">
<section class="homepage-latest-posts">
<h1> <h1>
{{ i18n "latest_posts" }} {{ i18n "latest_posts" }}
{{ partial "rss-link.html" . }} {{ partial "rss-link.html" . }}
@@ -16,6 +16,6 @@
{{ partial "page-list.html" (.Paginate .Site.RegularPages).Pages }} {{ partial "page-list.html" (.Paginate .Site.RegularPages).Pages }}
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</section> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -1,76 +1,70 @@
{{ define "main" }} {{ define "main" }}
<article> <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 }}
<section 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>
</section>
<div class="table-of-contents print">
{{ i18n "table_of_contents" }}
{{ .TableOfContents }} {{ .TableOfContents }}
</div> </details>
{{ end }}
{{ partial "feature-figure.html" . }}
<div class="post-content" data-pagefind-body>
{{ .Content }}
</div> </div>
<div class="table-of-contents print">
{{ i18n "table_of_contents" }}
{{ .TableOfContents }}
</div>
{{ end }}
{{ partial "series-box.html" . }} {{ partial "feature-figure.html" . }}
{{ if or .NextInSection .PrevInSection }} <article class="post-content" data-pagefind-body>
<nav class="prevnext"> {{ .Content }}
{{ 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 }}
</nav>
{{ end }}
{{ if .Site.Params.shareButtons }}
{{ partial "share.html" . }}
{{ end }}
{{ if .Params.comments }}
<section class="comments">
{{ partial "comments.html" . }}
</section>
{{ 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 }} {{ end }}

View File

@@ -1,6 +1,2 @@
User-Agent: * User-Agent: *
Sitemap: {{ "sitemap.xml" | absLangURL }} Sitemap: {{ "sitemap.xml" | absLangURL }}
{{/* It complains about the raw markdown output having no title tag */ -}}
User-Agent: Bingbot
Disallow: /blog/*.md$

View File

@@ -1,27 +1,25 @@
{{ define "main" }} {{ define "main" }}
<section> <h1>
<h1> {{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ .Title | markdownify }}
{{ .Title | markdownify }} {{ partial "rss-link.html" . }}
{{ partial "rss-link.html" . }} </h1>
</h1>
{{ with .Content }} {{ with .Content }}
{{ . }} {{ . }}
{{ end }}
<div class="list-page-container">
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ end }} {{ end }}
<div class="list-page-container"> {{ partial "page-list.html" .Paginator.Pages }}
{{ with .Sections }} </div>
<div class="sections">
{{ range . }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ end }}
{{ partial "page-list.html" .Paginator.Pages }} {{ partial "pagination.html" . }}
</div>
{{ partial "pagination.html" . }}
</section>
{{ 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"