4 Commits

Author SHA1 Message Date
732d32b97b Remove Jost 2023-01-22 20:42:21 -06:00
4d1a0d6be2 Jost 2023-01-22 20:01:33 -06:00
ac580e1995 WIP 2023-01-22 18:57:52 -06:00
cee1cd3a82 WIP 2023-01-22 18:57:52 -06:00
45 changed files with 1005 additions and 786 deletions

File diff suppressed because it is too large Load Diff

12
data/meses.yml Normal file
View File

@ -0,0 +1,12 @@
1: "enero"
2: "febrero"
3: "marzo"
4: "abril"
5: "mayo"
6: "julio"
7: "junio"
8: "agosto"
9: "septiembre"
10: "octubre"
11: "noviembre"
12: "diciembre"

View File

@ -32,6 +32,9 @@ params:
# gitFileIcon: github-circle
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
# display a "Latest Posts" section on the homepage below its content
homepageLatestPosts: true
# social media share icons
# shareButtons:
# twitter: true
@ -58,3 +61,10 @@ languages:
languageName: English
title: Example Website
weight: 1
es:
languageName: Español
title: Sitio web ejemplo
weight: 2
params:
description: Sitio web ejemplo para bobatheme

View File

@ -19,6 +19,9 @@ copy_to_clipboard:
# Meta items
long_date:
other: "{{ .Date.Format `January 2, 2006` }}"
wordcount:
one: "{{ . }} word"
other: "{{ . }} words"
@ -55,8 +58,8 @@ newer_post:
# ARIA labels
aria_heading_link:
other: "heading link"
aria_header_link:
other: "header link"
aria_back_to_top_button:
other: "back to top button"
@ -67,6 +70,9 @@ aria_rss_link:
aria_post_meta_edit_history:
other: "link to page edit history"
aria_post_meta_translations:
other: "translations"
aria_post_meta_categories:
other: "categories"
@ -115,23 +121,11 @@ aria_series_metadata:
aria_navbar:
other: "navigation bar"
aria_langpicker:
other: "language picker"
aria_langpicker_list:
other: "language list"
aria_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"

131
i18n/es.yaml Normal file
View File

@ -0,0 +1,131 @@
# Misc
credit_comment:
other: "<!-- bobatheme está disponible en GitHub basado en la licensia MIT: https://github.com/BBaoVanC/bobatheme. -->"
table_of_contents:
other: "Índice"
browser_no_video_support:
other: "Tu navegador de internet no admite video."
latest_posts:
other: "Artículos recientes"
see_also:
other: "Véase también:"
copy_to_clipboard:
other: "Copiar"
# Meta items
long_date:
other: "{{ .Date.Day }} de {{ index .Data.meses (printf `%d` .Date.Month) }} de {{ .Date.Year }}"
wordcount:
one: "{{ . }} palabra"
other: "{{ . }} palabras"
readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Historial de cambios"
# Post count
no_posts:
other: "¡No hay contenido para mostrar!"
post_count:
one: "{{ . }} publicación"
other: "{{ . }} publicaciones"
# Navigation
read_more:
other: "Leer más"
related_posts:
other: "Publicaciones similares"
older_post:
other: "Más antiguo"
newer_post:
other: "Más nuevo"
# ARIA labels
# aria_header_link:
# other: "header link"
# aria_back_to_top_button:
# other: "back to top button"
# aria_rss_link:
# other: "RSS feed link"
# aria_post_meta_edit_history:
# other: "link to page edit history"
# aria_post_meta_translations:
# other: "translations"
# aria_post_meta_categories:
# other: "categories"
# aria_post_meta_tags:
# other: "tags"
# aria_post_meta_reading_time:
# other: "reading time"
# aria_post_meta_authors:
# other: "authors"
# aria_post_meta_series:
# other: "series"
# aria_breadcrumbnav:
# other: "breadcrumb navigation bar"
# aria_post_metadata:
# other: "post metadata"
# aria_author_metadata:
# other: "author metadata"
# aria_taxonomy_metadata:
# other: "taxonomy metadata"
# aria_post_meta_date:
# other: "date"
# aria_post_meta_modified_date:
# other: "last modified date"
# aria_author_post_count:
# other: "post count"
# aria_author_word_count:
# other: "word count"
# aria_taxonomy_post_count:
# other: "post count"
# aria_series_metadata:
# other: "series metadata"
# aria_navbar:
# other: "navigation bar"
# aria_langpicker:
# other: "language picker"
# aria_langpicker_list:
# other: "language list"
# aria_table_of_contents:
# other: "table of contents"

View File

@ -1,7 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading">
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-header">
{{ .Text | safeHTML }}
<a class="heading-link" href="#{{ .Anchor | safeURL }}">
<span aria-label="{{ i18n "aria_heading_link" }}">
<a href="#{{ .Anchor | safeURL }}">
<span class="section-header-link" aria-label="{{ i18n "aria_header_link" }}">
{{ partial "icon.html" "link" }}
</span>
</a>

View File

@ -1,11 +1,38 @@
{{ i18n "credit_comment" | safeHTML }}
{{ partial "credit.html" }}
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}">
{{ partial "head.html" . }}
<body>
<a id="top" aria-hidden="true"></a>
<a id="skip-to-main" href="#main-content">Skip to main content</a>
<a id="top" name="top" aria-hidden="true"></a>
<div class="top">
{{ partial "top.html" . }}
</div>
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
<main>
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }}
</main>
{{ if or .Site.Copyright .Site.Params.footer }}
<footer>
<small>
{{ with .Site.Copyright }}
<p>{{ . | safeHTML }}</p>
{{ end }}
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</small>
</footer>
{{ end }}
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
{{ partial "icon.html" "chevron-up" }}
@ -17,36 +44,6 @@
}
</style>
</noscript>
{{ partial "top.html" . }}
<div class="main-container">
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
<main id="main-content">
{{ 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 */}}
{{ end }}
{{ if or .Site.Copyright .Site.Params.footer }}
<footer>
{{ with .Site.Copyright }}
<p>{{ . | safeHTML }}</p>
{{ end }}
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</footer>
{{ end }}
</body>
</html>

View File

@ -9,11 +9,11 @@
{{ . }}
{{ end }}
<div class="list-page-container">
<div class="list-page-content">
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary" }}
{{ .Render "summary/section" }}
{{ end }}
</div>
{{ end }}

View File

@ -1,12 +1,12 @@
{{ define "main" }}
<div class="page-title">
<div class="post-title">
<h1>
{{ .Title | markdownify }}
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h1>
</div>
{{ partial "page-metadata/post-full.html" . }}
{{ partial "post-metadata/full.html" . }}
{{ partial "series-box.html" . }}
{{ if .Params.Toc }}
@ -73,16 +73,17 @@
{{ partial "comments.html" . }}
</div>
{{ end }}
{{ end }}
{{ define "post-body" }}
{{ $related := .Site.RegularPages.Related . | first 10 }}
{{ with $related }}
<div class="related-posts">
<div class="related-posts full-width-page-list">
<hr>
<h1>{{ i18n "related_posts" }}</h1>
{{ partial "page-list.html" . }}
</div>
{{ end }}
{{ if .Site.Params.latestPostsOnContent }}
{{ partialCached "latest-posts.html" . }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,16 @@
<div class="author">
<h2 class="author-name">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/author.html" . }}
<div class="author-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
</div>

View File

@ -1,10 +1,10 @@
<h2 class="page-title">
<h2 class="post-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/post-short.html" . }}
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
@ -12,7 +12,7 @@
</div>
{{ end }}
<div class="page-description">
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>

View File

@ -0,0 +1,24 @@
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/series.html" . }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="series-page-list">
{{ $i := 0 }}
{{ $total := len .Data.Pages }}
{{ range .Data.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<article class="post">
{{ .Render "summary/series_post" }}
</article>
{{ end }}
</div>

View File

@ -0,0 +1,27 @@
<div class="post-series-position">
{{ if .Scratch.Get "series_position" }}
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
{{ end }}
</div>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -11,8 +11,8 @@
<div class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
<article class="post">
{{ .Render "summary/author" }}
</article>
{{ end }}
{{ else }}

View File

@ -1,14 +0,0 @@
<h2 class="page-title">
<a class="heading-link" 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>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="page-title">
<div class="author-name">
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
@ -7,7 +7,7 @@
</h1>
</div>
{{ partial "page-metadata/author.html" . }}
{{ partial "post-metadata/author.html" . }}
{{ with .Content }}
{{ . }}

View File

@ -0,0 +1 @@
{{ i18n "credit_comment" | safeHTML }}

View File

@ -14,10 +14,10 @@
{{ end }}
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with .Site.Params.faviconSVG }}

View File

@ -0,0 +1,11 @@
<div class="latest-posts full-width-page-list">
<hr>
<h1>
{{ i18n "latest_posts" }}
{{ partial "rss-link.html" .Site.Home }}
</h1>
{{ with .Site.RegularPages | first 5 }}
{{ partial "page-list.html" . }}
{{ end }}
</div>

View File

@ -1,8 +1,8 @@
<div class="page-list">
{{ with . }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
<article class="post">
{{ .Render "summary/post" }}
</article>
{{ end }}
{{ else }}

View File

@ -1,26 +0,0 @@
{{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }}
{{ partial "time-element.html" .Date }}
</span>
{{/* TODO: make this be a tooltip */}}
{{/* DISABLED
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
{{ partial "icon.html" "pencil" }}
{{ partial "time-element.html" .Lastmod }}
{{ end }}
</span>
*/}}
{{ end }}
{{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/edithistory.html" . }}
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
{{ end }}

View File

@ -1,16 +0,0 @@
{{ if or .Date .Params.authors .Site.Params.readingtime }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="date">
{{ partial "icon.html" "calendar" }}
{{ partial "time-element.html" .Date }}
</span>
{{ end }}
{{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
{{ end }}

View File

@ -1,5 +1,5 @@
{{ with .Params.authors }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ partial "icon.html" "user-circle" }}
{{ if index $.Site.Taxonomies "authors" }}

View File

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

View File

@ -1,5 +1,5 @@
{{ if and .Site.Params.gitHistoryURL .File.Path }}
<span class="page-metadata-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
<span class="post-meta-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
{{ partial "icon.html" "history" }}
<a href="{{ printf "%s/content/%s" .Site.Params.gitHistoryURL .File.Path }}" target="_blank" rel="noopener">
{{- i18n "edit_history" -}}

View File

@ -1,5 +1,5 @@
{{ if ne .Site.Params.readingtime false }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}">
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}">
{{ partial "icon.html" "clock" }}
{{ i18n "readingtime" .ReadingTime }}
</span>

View File

@ -4,7 +4,7 @@
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
<div class="series" aria-label="{{ i18n "aria_post_meta_series" }}">
{{ partial "icon.html" "files" }}
{{ delimit $series ", " }}
</div>

View File

@ -4,7 +4,7 @@
{{ $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="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
{{ partial "icon.html" "tag" }}
{{ delimit $tags ", " }}
</div>

View File

@ -0,0 +1,8 @@
{{ if .IsTranslated }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_translations" }}">
{{ partial "icon.html" "world" }}
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Language }}</a>
{{ end }}
</span>
{{ end }}

View File

@ -1,16 +1,16 @@
<div class="page-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
<div class="author-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
{{/* Calculate the total word count */}}
{{ $total_words := 0 }}
{{ range .Data.Pages }}
{{ $total_words = add $total_words .WordCount }}
{{ end }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_author_post_count" }}">
<span class="author-meta-item" aria-label="{{ i18n "aria_author_post_count" }}">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
<span class="page-metadata-item" aria-label="{{ i18n "aria_author_word_count" }}">
<span class="author-meta-item" aria-label="{{ i18n "aria_author_word_count" }}">
{{ partial "icon.html" "align-left" }}
{{ i18n "wordcount" $total_words }}
</span>

View File

@ -0,0 +1,31 @@
{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime .Site.Params.gitFileURL }}
<div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
</time>
</span>
{{/* TODO: make this be a tooltip */}}
{{/* DISABLED
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
{{ partial "icon.html" "pencil" }}
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }}
</time>
{{ end }}
</span>
*/}}
{{ end }}
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/edithistory.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -1,11 +1,11 @@
<div class="page-metadata" aria-label="{{ i18n "aria_series_metadata" }}">
<span class="page-metadata-item">
<div class="post-metadata" aria-label="{{ i18n "aria_series_metadata" }}">
<span class="post-meta-item">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
{{ if ne .Site.Params.readingtime false }}
<span class="page-metadata-item">
<span class="post-meta-item">
{{ partial "icon.html" "clock" }}
{{ $readingtime := 0 }}
{{ range .Data.Pages }}
@ -14,4 +14,6 @@
{{ i18n "readingtime" $readingtime }}
</span>
{{ end }}
{{ partial "post-meta-item/translations.html" . }}
</div>

View File

@ -0,0 +1,19 @@
{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime }}
<div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="post-meta-item" aria-label="date">
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
</time>
</span>
{{ end }}
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/series.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -3,7 +3,6 @@
<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" -}}
@ -14,7 +13,6 @@
<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" -}}
@ -25,7 +23,6 @@
<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" -}}
@ -36,7 +33,6 @@
<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" -}}
@ -50,7 +46,6 @@
<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" -}}
@ -60,7 +55,6 @@
{{ 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" -}}

View File

@ -1,3 +0,0 @@
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" title="{{ . }}">
{{ .Format "January 2, 2006" }}
</time>

View File

@ -1,10 +1,10 @@
<div class="top">
<header class="header">
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</header>
<header class="header">
<a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</header>
<div class="topbar">
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ with .Site.Home }}
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
@ -12,8 +12,7 @@
{{ range .Site.Menus.main }}
{{ $isActive := false }}
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}}
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
{{ $isActive = true }}
{{ end }}
<a class="navbar-item{{ if $isActive }} active{{ end }}"
@ -21,4 +20,35 @@
href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ if .Site.IsMultiLingual }}
<details class="langpicker" aria-label="{{ i18n "aria_langpicker" }}">
<summary>
{{- partial "icon.html" "world" -}}
</summary>
<ul class="languages" aria-label="{{ i18n "aria_langpicker_list" }}">
{{ range .AllTranslations }}
<li>
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ $site_translations := slice }}
{{ range .Site.Languages }}
{{ $site_translations = $site_translations | append .LanguageName }}
{{ end }}
{{ $translation_codes := slice }}
{{ range .AllTranslations }}
{{ $translation_codes = $translation_codes | append .Language }}
{{ end }}
{{ range (.Site.Languages | complement $translation_codes) }}
<li>
<a class="langpicker-item unavailable" aria-disabled="true">{{ .LanguageName }}</a>
</li>
{{ end }}
</ul>
</details>
{{ end }}
</div>

View File

@ -8,12 +8,12 @@
{{ . }}
{{ end }}
<div class="page-list series">
{{ with .Paginator.Pages }}
<div class="series-taxonomy-list">
{{ with .Pages }}
{{ range . }}
<div class="page series">
{{ .Render "summary" }}
</div>
<article class="series-taxonomy">
{{ .Render "summary/series" }}
</article>
{{ end }}
{{ else }}
<div>

View File

@ -1,19 +0,0 @@
<h2 class="page-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a class="heading-link" 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>
<div class="page-list series-inner">
{{ range .Data.Pages.Reverse }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
</div>

View File

@ -5,7 +5,7 @@
{{ partial "rss-link.html" . }}
</h1>
{{ partial "page-metadata/series.html" . }}
{{ partial "post-metadata/series.html" . }}
{{ with .Content }}
{{ . }}

View File

@ -1,20 +0,0 @@
{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ with ($path | readFile) }}
{{ if $markdown }}
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
{{ else }}
{{ $path | readFile }}
{{ end }}
{{ else }}
{{ errorf "file not found: %s" $path }}
{{ end }}

View File

@ -5,6 +5,6 @@
{{ $class = delimit (slice $class .) " " }}
{{ end }}
{{ $htmlTable := .Inner | .Page.RenderString (dict "display" "block") }}
{{ $htmlTable := .Inner | markdownify }}
{{ $new := printf `<table class="%s">` $class }}
{{ (replace $htmlTable "<table>" $new) | safeHTML }}

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="page-title">
<div class="post-title">
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
@ -26,7 +26,7 @@
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "page-metadata/taxonomy.html" . }}
{{ partial "post-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</article>

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="page-title">
<div class="post-title">
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
@ -14,7 +14,7 @@
</h1>
</div>
{{ partial "page-metadata/taxonomy.html" . }}
{{ partial "post-metadata/taxonomy.html" . }}
{{ with .Content }}
{{ . }}