17 Commits

26 changed files with 351 additions and 232 deletions

View File

@ -1,2 +1,4 @@
# bobatheme
Simple Hugo theme
The (boba) best Hugo theme. Contains everything I need for bbaovanc.com and
boba.best.

View File

@ -2,27 +2,51 @@
* https://github.com/BBaoVanC/bobatheme.
*/
/* color notes:
* accent is 15 chroma, 270 hue
*
* lightness (dark):
* background-0: 5
* background-1: 12.5
* background-2: 20
* background-highlight: 27.5
* text-0: 92.5
* text-1: 85
*/
:root {
--background-0: #111111;
--background-1: #212121;
--background-2: #303030;
--background-highlight: #414141;
--background-accent: #101c30; /* lch(10, 15, 270) */
--text-0: #e9e9e9;
--text-1: #d4d4d4;
--link-color: #3a94fb; /* lch(60, 60, 270) */
--background-0: #111111; /* lch(5, 0, X) */
--background-1: #212121; /* lch(12.5, 0, X) */
--background-2: #303030; /* lch(20, 0, X) */
--background-3: #414141; /* lch(27.5, 0, X) */
--background-pink-1: #331821; /* lch(12.5, 15, 0) */
--background-red-1: #331917; /* lch(12.5, 15, 30) */
--background-orange-1: #2e1c0e; /* lch(12.5, 15, 60) */
--background-yellow-1: #262008; /* lch(12.5, 15, 90) */
--background-lime-1: #1b230c; /* lch(12.5, 15, 120) */
--background-green-1: #0e2516; /* lch(12.5, 15, 150) */
--background-turquoise-1: #012620; /* lch(12.5, 15, 180) */
--background-teal-1: #00262b; /* lch(12.5, 15, 210) -- out of sRGB */
--background-cerulean-1: #032432; /* lch(12.5, 15, 240) */
--background-blue-1: #152135; /* lch(12.5, 15, 270) */
--background-purple-1: #241d33; /* lch(12.5, 15, 300) */
--background-magenta-1: #2e1a2b; /* lch(12.5, 15, 330) */
--background-pink-2: #4b2431; /* lch(20, 20, 0) */
--background-red-2: #4a2623; /* lch(20, 20, 30) */
--background-orange-2: #432a17; /* lch(20, 20, 60) */
--background-yellow-2: #373012; /* lch(20, 20, 90) */
--background-lime-2: #283416; /* lch(20, 20, 120) */
--background-green-2: #163721; /* lch(20, 20, 150) */
--background-turquoise-2: #003830; /* lch(20, 20, 180) -- out of sRGB */
--background-teal-2: #00373e; /* lch(20, 20, 210) -- out of sRGB */
--background-cerulean-2: #013549; /* lch(20, 20, 240) */
--background-blue-2: #1f314e; /* lch(20, 20, 270) */
--background-purple-2: #352c4a; /* lch(20, 20, 300) */
--background-magenta-2: #43263f; /* lch(20, 20, 330) */
--background-accent-1: var(--background-blue-1);
--background-accent-2: var(--background-blue-2);
--text-0: #d4d4d4; /* lch(85, 0, X) */
--text-1: #d4d4d4; /* lch(85, 0, X) */
--text-2: #d4d4d4; /* lch(85, 0, X) */
--text-3: #e9e9e9; /* lch(92.5, 0, X) */
--text-gray-0: #ababab; /* lch(70, 0, X) */
--text-gray-1: #919191; /* lch(60, 0, X) */
--link-0: #3a94fb; /* lch(60, 60, 270) */
--figure-border: #1f5593; /* lch(35, 40, 270) */
--pagination-active-hover-text: black;
@ -32,14 +56,50 @@
@media print, (prefers-color-scheme: light) {
:root {
--background-0: #f1f1f1;
--background-1: #dbdbdb;
--background-2: #c6c6c6;
--background-highlight: #c6c6c6;
--background-accent: #d7e3ff;
--text-0: #171717;
--text-1: #262626;
--link-color: #2061a8; /* lch(40, 45, 270) */
--background-0: #f1f1f1; /* lch(95, 0, X) */
--background-1: #dbdbdb; /* lch(87.5, 0, X) */
--background-2: #c6c6c6; /* lch(80, 0, X) */
--background-3: #b2b2b2; /* lch(72.5, 0, X) */
--background-pink-1: #f7d1dc; /* lch(87.5, 15, 0) */
--background-red-1: #f8d2ce; /* lch(87.5, 15, 30) */
--background-orange-1: #f1d6c3; /* lch(87.5, 15, 60) */
--background-yellow-1: #e4dbbf; /* lch(87.5, 15, 90) */
--background-lime-1: #d5dfc2; /* lch(87.5, 15, 120) */
--background-green-1: #c6e3cc; /* lch(87.5, 15, 150) */
--background-turquoise-1: #bce4db; /* lch(87.5, 15, 180) */
--background-teal-1: #bae3e9; /* lch(87.5, 15, 210) */
--background-cerulean-1: #c2e0f4; /* lch(87.5, 15, 240) */
--background-blue-1: #d0dcf8; /* lch(87.5, 15, 270) */
--background-purple-1: #e1d7f4; /* lch(87.5, 15, 300) */
--background-magenta-1: #efd3ea; /* lch(87.5, 15, 330) */
--background-pink-2: #fbb1c8; /* lch(80, 30, 0) */
--background-red-2: #fbb4ac; /* lch(80, 30, 30) */
--background-orange-2: #eebc97; /* lch(80, 30, 60) */
--background-yellow-2: #d6c58e; /* lch(80, 30, 90) */
--background-lime-2: #b8ce95; /* lch(80, 30, 120) */
--background-green-2: #9ad4a9; /* lch(80, 30, 150) */
--background-turquoise-2: #81d6c5; /* lch(80, 30, 180) */
--background-teal-2: #7ad5e1; /* lch(80, 30, 210) */
--background-cerulean-2: #8cd0f6; /* lch(80, 30, 240) */
--background-blue-2: #adc8fe; /* lch(80, 30, 270) */
--background-purple-2: #d0bef7; /* lch(80, 30, 300) */
--background-magenta-2: #ecb5e3; /* lch(80, 30, 330) */
--background-accent-1: var(--background-blue-1);
--background-accent-2: var(--background-blue-2);
--text-0: #262626; /* lch(15, 0, X) */
--text-1: #262626; /* lch(15, 0, X) */
--text-2: #262626; /* lch(15, 0, X) */
--text-3: #171717; /* lch(72.5, 0, X) */
--text-gray-0: #474747; /* lch(30, 0, X) */
--text-gray-1: #5e5e5e; /* lch(40, 0, X) */
--link-0: #2061a8; /* lch(40, 45, 270) */
--figure-border: #367acd; /* lch(50, 50, 270) */
--pagination-active-hover-text: white;
@ -84,6 +144,7 @@
padding-bottom: 24px;
border-radius: 12px;
background-color: var(--background-1);
color: var(--text-1);
}
.post-series-position {
@ -135,64 +196,49 @@
/* Category list format */
.category-list ul {
display: flex;
flex-direction: column;
list-style: none;
gap: 10px;
padding: 0;
}
.category-list li {
display: flex;
flex-direction: row;
gap: 20px;
background-color: var(--background-1);
padding: 8px 12px;
border-radius: 8px;
}
@media (max-width: 360px) {
.category-list li {
flex-direction: column;
gap: 0;
}
}
.category-list p {
margin: 0;
}
.category-list .category-metadata {
margin-left: auto;
}
.category-list a,
.category-list .category-metadata {
/* Taxonomy list format */
.taxonomy-list a,
.taxonomy-list .taxonomy-metadata {
white-space: nowrap;
}
.taxonomy-list p {
margin: 0;
}
/* Tags list format */
.tag-list ul {
display: flex;
.taxonomy-list ul {
list-style: none;
gap: 10px;
flex-flow: row wrap;
padding: 0;
display: flex;
flex-direction: column;
gap: 10px;
}
.tag-list a {
.taxonomy-list li {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 12px;
border-radius: 12px;
border-radius: 8px;
display: flex;
flex-direction: row;
gap: 20px;
}
.tag-list a:hover {
text-decoration: none;
background-color: var(--background-2);
.taxonomy-list-left {
display: flex;
flex-direction: column;
}
@media (max-width: 480px) {
.taxonomy-list li {
flex-direction: column;
gap: 4px;
}
.taxonomy-list-left {
flex-direction: row;
justify-content: space-between;
}
}
@ -204,6 +250,7 @@
flex-flow: row wrap;
list-style: none;
background-color: var(--background-0);
color: var(--text-0);
padding: 8px;
border-radius: 16px;
}
@ -224,12 +271,14 @@
.section {
background-color: var(--background-1);
color: var(--text-1);
border-radius: 12px;
padding: 1px 25px;
}
.section:hover {
background-color: var(--background-2);
color: var(--text-2);
}
.section-title {
@ -255,6 +304,10 @@
/* Header formatting (website title and article section headers) */
h1.header {
font-size: 1.5em;
}
.header a,
.section-header a {
color: inherit;
@ -270,6 +323,7 @@
/* Content formatting */
.series-box {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 16px;
border-radius: 8px;
margin: 15px 0;
@ -277,6 +331,7 @@
.table-of-contents {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 20px;
border-radius: 8px;
margin: 10px 0;
@ -349,6 +404,7 @@
/* Social media share buttons */
.share-buttons {
background: var(--background-1);
color: var(--text-1);
margin: 25px 0;
padding: 8px 0;
border-radius: 8px;
@ -357,12 +413,18 @@
justify-content: center;
}
.share-buttons button,
.share-buttons a {
background-color: var(--background-2);
color: var(--text-2);
padding: 4px;
border-radius: 8px;
}
.share-buttons button {
border: none;
}
.share-buttons svg {
width: 32px;
height: 32px;
@ -380,6 +442,7 @@
/* See also formating */
.see-also {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 12px;
border-radius: 8px;
margin: 10px 0;
@ -397,6 +460,7 @@
bottom: 25px;
right: 25px;
background-color: var(--background-1);
color: var(--text-1);
border-radius: 100%;
padding: 12px;
display: none;
@ -410,6 +474,7 @@
flex-wrap: nowrap;
flex-direction: row;
background-color: var(--background-1);
color: var(--text-1);
border-radius: 8px;
margin-top: 5px;
padding: 4px;
@ -431,10 +496,15 @@
.navbar-item:hover,
.langpicker summary:hover,
.langpicker[open] summary {
background-color: var(--background-highlight);
background-color: var(--background-3);
text-decoration: none;
}
.langpicker summary:hover,
.langpicker[open] summary {
color: var(--text-3);
}
.topbar .active {
font-weight: bold;
}
@ -456,6 +526,7 @@
margin-top: 8px;
right: 0;
background-color: var(--background-1);
color: var(--text-1);
border: 2px solid var(--background-2);
padding: 8px 12px;
border-radius: 8px;
@ -486,7 +557,7 @@ html {
body {
background-color: var(--background-0);
color: var(--text-1);
color: var(--text-0);
font-family: "Open Sans", "Noto Sans", sans-serif;
margin: 20px;
max-width: 720px;
@ -535,15 +606,8 @@ figcaption {
text-align: center;
}
aside {
background-color: var(--background-1);
padding: 12px 16px;
margin: 16px 0;
border-radius: 8px;
}
a {
color: var(--link-color);
color: var(--link-0);
text-decoration: inherit;
}
@ -557,7 +621,7 @@ blockquote {
}
hr {
border-color: var(--background-highlight);
border: 1px solid var(--background-3);
}
table.markdown {
@ -567,6 +631,7 @@ table.markdown {
.markdown thead {
background-color: var(--background-2);
color: var(--text-2);
}
.markdown th,
@ -576,9 +641,11 @@ table.markdown {
.markdown tbody tr:nth-child(odd) {
background-color: var(--background-0);
color: var(--text-0);
}
.markdown tbody tr:nth-child(even) {
background-color: var(--background-1);
color: var(--text-1);
}
* {
@ -599,6 +666,10 @@ table.markdown {
:not(pre) > code {
background-color: var(--background-2);
/* Disable this because it overrides inline code blocks that are
* also links
color: var(--text-2);
*/
padding: 2px 4px;
overflow-wrap: break-word;
}
@ -613,6 +684,48 @@ code {
/* Asides */
aside {
padding: 8px 16px;
margin: 16px 0;
border-radius: 8px;
color: var(--text-1);
}
.aside-title {
margin-bottom: 8px;
padding-bottom: 4px;
font-weight: bold;
}
.aside-content > :first-child {
margin-top: 0;
}
.aside-content > :last-child {
margin-bottom: 0;
}
aside.note {
background-color: var(--background-blue-1);
}
aside.info {
background-color: var(--background-green-1);
}
aside.tip {
background-color: var(--background-teal-1);
}
aside.warning {
background-color: var(--background-yellow-1);
}
aside.example {
background-color: var(--background-purple-1);
}
aside.quote {
background-color: var(--background-1);
}
/* Icons */
.icon {
width: 20px;
@ -655,6 +768,7 @@ h1 svg.icon {
.page-item.active .page-link:hover {
background-color: var(--pagination-active-hover-background);
color: var(--pagination-active-hover-text);
cursor: default;
}
.page-link:hover {
@ -662,7 +776,7 @@ h1 svg.icon {
}
:not(li.disabled) > .page-link:hover {
background-color: var(--background-highlight);
background-color: var(--background-3);
}
li.disabled {
@ -677,20 +791,45 @@ li.disabled > .page-link:hover {
/* Breadcrumb navigation */
.breadcrumb {
margin: 30px 0 20px;
margin: 16px 0;
}
.breadcrumb ul {
padding: 0;
list-style: none;
display: flex;
justify-content: space-between;
flex-grow: 1;
}
.breadcrumb li {
display: inline;
padding: 8px;
background-color: var(--background-1);
}
.breadcrumb li+li:before {
content: "»"
.breadcrumb li:hover {
background-color: var(--background-2);
cursor: pointer;
}
.breadcrumb li a:hover {
text-decoration: none;
}
.breadcrumb li.active:hover {
cursor: default;
}
.breadcrumb li:first-child {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
padding-left: 12px;
}
.breadcrumb li:last-child {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
padding-right: 12px;
}
@ -709,11 +848,13 @@ li.disabled > .page-link:hover {
flex-direction: column;
color: inherit;
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 16px;
}
.prevnext > a:hover {
background-color: var(--background-2);
color: var(--text-2);
text-decoration: none;
}
@ -745,11 +886,6 @@ li.disabled > .page-link:hover {
/* Light mode */
@media print,
(prefers-color-scheme: light) {
/* Basic elements */
.section:hover {
color: inherit;
}
li.disabled {
opacity: .25;
}
@ -760,10 +896,12 @@ li.disabled > .page-link:hover {
/* Print compatibility */
@media print {
.top,
.breadcrumb,
.section-header-link,
.post-meta-edit-history,
.prevnext,
.comments {
.share-buttons,
.related-posts,
.latest-posts {
display: none;
}

View File

@ -30,6 +30,7 @@ params:
# used for "View source" (unset by default)
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
# gitFileIcon: github-circle
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
# display a "Latest Posts" section on the homepage below its content
homepageLatestPosts: true
@ -41,6 +42,7 @@ params:
# linkedin: true
# reddit: true
# telegram: true
# print: true
# show "Latest Posts" section at bottom of content pages
# latestPostsOnContent: true

View File

@ -27,6 +27,9 @@ readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Edit history"
# Post count
no_posts:
@ -61,8 +64,8 @@ aria_back_to_top_button:
aria_rss_link:
other: "RSS feed link"
aria_post_meta_view_source:
other: "link to page source"
aria_post_meta_edit_history:
other: "link to page edit history"
aria_post_meta_translations:
other: "translations"
@ -91,8 +94,8 @@ aria_post_metadata:
aria_author_metadata:
other: "author metadata"
aria_category_metadata:
other: "category metadata"
aria_taxonomy_metadata:
other: "taxonomy metadata"
aria_post_meta_date:
other: "date"
@ -106,7 +109,7 @@ aria_author_post_count:
aria_author_word_count:
other: "word count"
aria_category_post_count:
aria_taxonomy_post_count:
other: "post count"
aria_series_metadata:

View File

@ -27,6 +27,9 @@ readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Historial de cambios"
# Post count
no_posts:
@ -61,8 +64,8 @@ newer_post:
# aria_rss_link:
# other: "RSS feed link"
# aria_post_meta_view_source:
# other: "link to page source"
# aria_post_meta_edit_history:
# other: "link to page edit history"
# aria_post_meta_translations:
# other: "translations"
@ -91,8 +94,8 @@ newer_post:
# aria_author_metadata:
# other: "author metadata"
# aria_category_metadata:
# other: "category metadata"
# aria_taxonomy_metadata:
# other: "taxonomy metadata"
# aria_post_meta_date:
# other: "date"
@ -106,7 +109,7 @@ newer_post:
# aria_author_word_count:
# other: "word count"
# aria_category_post_count:
# aria_taxonomy_post_count:
# other: "post count"
# aria_series_metadata:

View File

@ -24,7 +24,7 @@
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" . "border" true) }}
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}

View File

@ -9,7 +9,7 @@
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" . "border" true) }}
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}

View File

@ -15,7 +15,7 @@
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" . "border" true) }}
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}

View File

@ -1,28 +0,0 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "folder" }}
{{ .Title | markdownify }}
</h1>
<div class="category-list">
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
{{ with .Page }}
<li>
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "description-or-summary.html" . }}
{{ partial "post-metadata/category.html" . }}
</li>
{{ end }}
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -1,17 +0,0 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "folder" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "post-metadata/category.html" . }}
{{ with .Content }}
{{ . }}
{{ end }}
{{ partial "page-list.html" .Paginator.Pages }}
{{ partial "pagination.html" . }}
{{ end }}

View File

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

View File

@ -1,13 +0,0 @@
{{ if and .Site.Params.gitFileURL .File.Path }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_view_source" }}">
{{ with .Site.Params.gitFileIcon }}
{{ partial "icon.html" . }}
{{ else }}
{{ partial "icon.html" "file" }}
{{ end }}
<a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener">
View source
</a>
</span>
{{ end }}

View File

@ -1,6 +0,0 @@
<div class="category-metadata" aria-label="{{ i18n "aria_category_metadata" }}">
<span class="category-meta-item" aria-label="{{ i18n "aria_category_post_count" }}">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
</div>

View File

@ -24,7 +24,7 @@
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/viewsource.html" . }}
{{ partial "post-meta-item/edithistory.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>

View File

@ -16,7 +16,4 @@
{{ end }}
{{ partial "post-meta-item/translations.html" . }}
{{ if .File }}
{{ partial "post-meta-item/viewsource.html" . }}
{{ end }}
</div>

View File

@ -0,0 +1,6 @@
<div class="taxonomy-metadata" aria-label="{{ i18n "aria_taxonomy_metadata" }}">
<span class="taxonomy-meta-item" aria-label="{{ i18n "aria_taxonomy_post_count" }}">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
</div>

View File

@ -52,4 +52,11 @@
</a>
{{ end }}
*/}}
{{ if .Site.Params.shareButtons.print }}
<button class="print-share"
onclick="window.print(); share_event('Print');">
{{- partial "icon.html" "printer" -}}
</button>
{{ end }}
</div>

View File

@ -1,6 +1,6 @@
<h2 class="header">
<h1 class="header">
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
</h2>
</h1>
<div class="topbar">
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">

View File

@ -1 +1,5 @@
<abbr title="{{ .Get "title" }}">{{ .Inner }}</abbr>
{{ if .IsNamedParams }}
<abbr title="{{ .Get "title" }}">{{ .Inner }}</abbr>
{{ else }}
<abbr title="{{ .Get 0 }}">{{ .Inner }}</abbr>
{{ end }}

View File

@ -1,7 +1,28 @@
<aside>
{{ with .Inner }}
{{ . | markdownify }}
{{ else }}
{{ errorf "The aside shortcode needs to be a closing one (similar to the highlight shortcode, see https://gohugo.io/templates/shortcode-templates/#inner" }}
{{ end }}
{{ $type := "" }}
{{ if .IsNamedParams }}
{{ $type = .Get "type" | default "note" }}
{{ else }}
{{ $type = .Get 0 | default "note" }}
{{ end }}
{{/* This idea comes from the LoveIt theme:
https://github.com/dillonzq/LoveIt/blob/aa834e89af8349f6c18d4c7ad50a73fd5f1e40e0/layouts/shortcodes/admonition.html#L3-L14
*/}}
{{ $icons := dict "note" "pencil" }}
{{ $icons = dict "info" "info" | merge $icons }}
{{ $icons = dict "tip" "lightbulb" | merge $icons }}
{{ $icons = dict "warning" "info" | merge $icons }}
{{ $icons = dict "example" "flask" | merge $icons }}
{{ $icons = dict "quote" "quote" | merge $icons }}
<aside class="{{ $type }}">
<div class="aside-title">
{{ partial "icon.html" (index $icons $type) }}
{{ title $type }}
</div>
<div class="aside-content">
{{ .Inner | .Page.RenderString (dict "display" "block") }}
</div>
</aside>

View File

@ -1,4 +1,9 @@
{{ $resource := $.Page.Resources.GetMatch (.Get "src") }}
{{ $resource := "" }}
{{ if .IsNamedParams }}
{{ $resource = $.Page.Resources.GetMatch (.Get "src") }}
{{ else }}
{{ $resource = $.Page.Resources.GetMatch (.Get 0) }}
{{ end }}
{{ $noborder := false }}
{{ if .Get "noborder" }}

View File

@ -1,6 +1,6 @@
<div class="see-also">
{{ with .Site.GetPage (.Get 0) }}
<p>{{ i18n "see_also" }} <a href="{{ .Permalink }}">{{ .Title }}</a></p>
<p>{{ i18n "see_also" }} <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></p>
{{ else }}
{{ errorf "Page could not be found for see-also shortcode: %s" .Position }}
{{ end }}

View File

@ -1,22 +0,0 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "tag" }}
{{ .Title | markdownify }}
</h1>
<div class="tag-list">
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
<a href="{{ .Page.Permalink }}">
<li>{{ .Page.Title | markdownify }}</li>
</a>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -1,15 +0,0 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "tag" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
{{ partial "page-list.html" .Paginator.Pages }}
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -1,16 +1,31 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "filter" }}
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else if eq .Data.Singular "category" }}
{{ partial "icon.html" "folder" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ .Title | markdownify }}
</h1>
<div class="taxonomy">
<div class="taxonomy-list">
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
<li>
<a href="{{ .Page.Permalink }}">{{ .Page.Title | markdownify }}</a>
</li>
{{ with .Page }}
<li>
<div class="taxonomy-list-left">
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "post-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</li>
{{ end }}
{{ end }}
</ul>
{{ else }}

View File

@ -1,10 +1,19 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "filter" }}
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else if eq .Data.Singular "category" }}
{{ partial "icon.html" "folder" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "post-metadata/taxonomy.html" . }}
{{ with .Content }}
{{ . }}
{{ end }}