1 Commits

Author SHA1 Message Date
8c0b3a7268 WIP breadcrumb style
See #52
2022-05-18 14:55:03 -05:00
48 changed files with 235 additions and 504 deletions

View File

@ -1,6 +1,4 @@
/* vim: foldmethod=marker
*
* bobatheme is available under the MIT license at
/* bobatheme is available under the MIT license at
* https://github.com/BBaoVanC/bobatheme.
*/
@ -48,7 +46,6 @@
--text-gray-1: #919191; /* lch(60, 0, X) */
--link-0: #3a94fb; /* lch(60, 60, 270) */
--link-1: #4ea1ff; /* lch(65, 60, 270) -- out of sRGB */
--figure-border: #1f5593; /* lch(35, 40, 270) */
@ -119,166 +116,6 @@
/* Fonts */
/* Open Sans {{{ */
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4taVIGxA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4kaVIGxA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4saVIGxA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4jaVIGxA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* hebrew */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4iaVIGxA.woff2) format('woff2');
unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4vaVIGxA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(/font/opensans/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* }}} */
/* JetBrains Mono {{{ */
/* cyrillic-ext */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTN1OVgaY.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTPlOVgaY.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOVOVgaY.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTNVOVgaY.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTNFOVgaY.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(/font/jetbrainsmono/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOV.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* }}} */
:root {
--font-sans: "Open Sans", "Noto Sans", sans-serif;
--font-mono: "JetBrains Mono", monospace;
}
html {
font-family: var(--font-sans);
}
pre, code, kbd, samp {
font-family: var(--font-mono);
font-size: 0.75em;
}
pre > code {
/* otherwise it ends up being 0.75^2 em */
font-size: unset;
}
/* Post layout (in list pages) */
.list-page-content {
display: flex;
@ -286,8 +123,8 @@ pre > code {
gap: 40px;
}
.page-list,
.series-taxonomy-list {
.page-list ul,
.series-taxonomy ul {
display: flex;
flex-direction: column;
list-style: none;
@ -295,13 +132,12 @@ pre > code {
gap: 40px;
}
.series-taxonomy-list {
.series-taxonomy ul {
gap: 80px;
}
.page-list .post,
.series-taxonomy-list .series-taxonomy,
.series-taxonomy .post {
.page-list li,
.series-taxonomy li {
padding-top: 8px;
padding-left: 24px;
padding-right: 24px;
@ -322,11 +158,6 @@ pre > code {
margin-bottom: 10px;
}
.post-title h1,
.author-name h1 {
margin: 0;
}
.post-title a,
.author-name a {
color: inherit;
@ -341,7 +172,7 @@ pre > code {
.post-metadata,
.author-metadata {
margin-bottom: 24px;
margin-bottom: 15px;
}
.categories,
@ -375,7 +206,7 @@ pre > code {
margin: 0;
}
.taxonomy-list {
.taxonomy-list ul {
list-style: none;
padding: 0;
display: flex;
@ -383,7 +214,7 @@ pre > code {
gap: 10px;
}
.taxonomy-list .taxonomy-term {
.taxonomy-list li {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 12px;
@ -399,7 +230,7 @@ pre > code {
}
@media (max-width: 480px) {
.taxonomy-list .taxonomy-term {
.taxonomy-list li {
flex-direction: column;
gap: 4px;
}
@ -413,7 +244,7 @@ pre > code {
/* Series list format */
.series-page-list {
.series-pages ul {
display: flex;
gap: 10px;
flex-flow: row wrap;
@ -424,7 +255,7 @@ pre > code {
border-radius: 16px;
}
.series-page-list .post {
.series-pages li {
flex: 1;
min-width: 49%;
}
@ -435,7 +266,7 @@ pre > code {
.sections {
display: flex;
flex-direction: column;
gap: 10px;
gap: 40px;
}
.section {
@ -473,15 +304,13 @@ pre > code {
/* Header formatting (website title and article section headers) */
.header {
margin: 16px 0;
h1.header {
font-size: 1.5em;
}
.header a,
.section-header a {
color: inherit;
font-size: 1.5em;
font-weight: bold;
}
.section-header-link svg {
@ -518,7 +347,6 @@ pre > code {
}
/* Related posts */
.full-width-page-list {
/* make left/right 0 margin so it takes up full width */
@ -531,16 +359,16 @@ pre > code {
margin-right: 20px;
}
.full-width-page-list .post {
.full-width-page-list li {
min-width: 300px;
max-width: 300px;
}
.full-width-page-list .post:first-child {
.full-width-page-list li:first-child {
margin-left: 20px;
}
.full-width-page-list .post:last-child {
.full-width-page-list li:last-child {
margin-right: 20px;
}
@ -565,7 +393,7 @@ pre > code {
}
}
.full-width-page-list .page-list {
.full-width-page-list .page-list ul {
display: flex;
flex-direction: row;
gap: 20px;
@ -573,7 +401,6 @@ pre > code {
}
/* Social media share buttons */
.share-buttons {
background: var(--background-1);
@ -586,15 +413,16 @@ pre > code {
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 a:hover {
background-color: var(--background-3);
color: var(--text-3);
.share-buttons button {
border: none;
}
.share-buttons svg {
@ -611,7 +439,6 @@ pre > code {
*/
/* See also formating */
.see-also {
background-color: var(--background-1);
@ -626,7 +453,6 @@ pre > code {
}
/* Back to top */
#back-to-top {
position: fixed;
@ -732,6 +558,7 @@ html {
body {
background-color: var(--background-0);
color: var(--text-0);
font-family: "Open Sans", "Noto Sans", sans-serif;
margin: 20px;
max-width: 720px;
overflow-wrap: break-word;
@ -744,7 +571,6 @@ body {
}
footer {
margin-top: 20px;
text-align: center;
}
@ -792,21 +618,12 @@ a:hover {
blockquote {
border-left: 5px solid var(--background-2);
padding-left: 15px;
margin-left: 0;
}
hr {
border: 1px solid var(--background-3);
}
@media (min-width: 720px) {
.full-width-hr {
/* see also: the related-posts section too */
margin-left: calc(-100vw / 2 + 760px / 2);
margin-right: calc(-100vw / 2 + 760px / 2);
}
}
table.markdown {
border-collapse: collapse;
border: 2px solid var(--text-1);
@ -831,13 +648,6 @@ table.markdown {
color: var(--text-1);
}
:target {
animation: target-fade 10s ease-out;
}
@keyframes target-fade {
0% { background-color: var(--background-yellow-2); }
}
* {
box-sizing: border-box;
}
@ -845,53 +655,14 @@ table.markdown {
/* Code blocks */
.code-block {
display: flex;
flex-direction: column;
.highlight {
margin: 16px 0;
background-color: var(--background-1);
border-radius: 8px;
}
.code-block > .code-header {
display: flex;
flex-direction: row;
justify-content: space-between;
background-color: var(--background-2);
padding: 4px 8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.code-block > .code-header > .code-type {
border-top-left-radius: 8px;
margin: auto 0;
}
/* TODO: make the code copy button prettier */
.code-block > .code-header > .code-copy-button {
color: var(--link-1);
}
.code-block > .code-header > .code-copy-button:hover {
cursor: pointer;
}
.code-block > .highlight {
margin: 8px 4px;
}
.highlight > .chroma {
.highlight > pre {
padding: 12px 8px;
overflow: auto;
}
.chroma {
/* the syntax highlight CSS adds a border */
background-color: transparent !important;
margin: 0;
}
.chroma .gp {
/* Generic Prompt symbol */
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
:not(pre) > code {
background-color: var(--background-2);
@ -903,7 +674,6 @@ table.markdown {
overflow-wrap: break-word;
}
.code-block > .code-header > .code-type,
code {
border-radius: 5px;
}
@ -1020,21 +790,46 @@ li.disabled > .page-link:hover {
/* Breadcrumb navigation */
.breadcrumb ul {
margin: 30px 0 20px;
.breadcrumb {
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;
}

View File

@ -1,21 +1,14 @@
/* tango style */
@media print, (prefers-color-scheme: light) {
.chroma {
color: black;
}
/* Background */ .bg { background-color: #f8f8f8 }
/* PreWrapper */ .chroma { background-color: #f8f8f8; }
/* Other */ .chroma .x { color: #000000 }
/* Error */ .chroma .err { color: #a40000 }
/* CodeLine */ .chroma .cl { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Line */ .chroma .line { display: flex; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Keyword */ .chroma .k { color: #204a87; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold }
@ -90,7 +83,6 @@
/* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold }
/* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline }
}
@media (prefers-color-scheme: light) {

View File

@ -1,16 +1,11 @@
/* native style */
/* Background */ .bg { color: #d0d0d0; background-color: #202020 }
/* PreWrapper */ .chroma { color: #d0d0d0; background-color: #202020; }
/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* CodeLine */ .chroma .cl { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* Line */ .chroma .line { display: flex; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }

8
assets/js/back-to-top.js Normal file
View File

@ -0,0 +1,8 @@
const backToTop = document.getElementById("back-to-top");
window.onscroll = function() {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
backToTop.style.display = "block";
} else {
backToTop.style.display = "none";
}
}

View File

@ -1,35 +0,0 @@
// back to top
const backToTop = document.getElementById("back-to-top");
window.onscroll = function() {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
backToTop.style.display = "block";
} else {
backToTop.style.display = "none";
}
}
// code block copy to clipboard
window.onload = () => {
document.querySelectorAll(".code-block").forEach(codeBlock => {
const button = codeBlock.querySelector(".code-header > .code-copy-button");
// lang will not be unset because we default it to text
// clone it so it doesn't change the actual DOM element
const codeElem = codeBlock.querySelector("code[data-lang]").cloneNode(true);
// bashsession: remove command output lines
codeElem.querySelectorAll(".go").forEach(e => e.parentNode.removeChild(e));
// bashsession: remove prompt symbol
codeElem.querySelectorAll(".gp").forEach(e => e.parentNode.removeChild(e));
const rawCode = codeElem.innerText;
const originalCopyText = button.innerHTML;
button.onclick = event => {
navigator.clipboard.writeText(rawCode);
// TODO: maybe we could add a fancier indicator, like a flash or something
event.target.innerHTML = "Copied!";
setTimeout(() => {
event.target.innerHTML = originalCopyText;
}, 3000);
}
});
}

View File

@ -14,9 +14,6 @@ latest_posts:
see_also:
other: "SEE ALSO:"
copy_to_clipboard:
other: "Copy"
# Meta items
long_date:

View File

@ -14,9 +14,6 @@ latest_posts:
see_also:
other: "Véase también:"
copy_to_clipboard:
other: "Copiar"
# Meta items
long_date:

View File

@ -1,15 +0,0 @@
{{ $type := "text" }}
{{ with .Type }}
{{ $type = . }}
{{ end }}
<div class="code-block">
<div class="code-header">
<pre class="code-type">{{ $type }}</pre>
<a href="javascript:void(0)" class="code-copy-button">
{{ i18n "copy_to_clipboard" }}
</a>
</div>
{{/* a div.highlight is already created by highlight function */}}
{{ highlight .Inner $type }}
</div>

View File

@ -21,6 +21,7 @@
</main>
{{ if or .Site.Copyright .Site.Params.footer }}
<hr>
<footer>
<small>
{{ with .Site.Copyright }}

View File

@ -5,10 +5,6 @@
{{ partial "rss-link.html" . }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
<div class="list-page-content">
{{ with .Sections }}
<div class="sections">

View File

@ -28,9 +28,9 @@
</div>
{{ end }}
<article class="post-content">
<div class="post-content">
{{ .Content }}
</article>
</div>
{{ partial "series-box.html" . }}

View File

@ -1,21 +1,23 @@
<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>
<div class="post">
<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" . }}
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
{{ 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>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
</div>

View File

@ -1,24 +1,26 @@
<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>
<div class="post">
<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" . }}
{{ 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 class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="series-pages">
<ul>
{{ $i := 0 }}
{{ $total := len .Data.Pages }}
{{ range .Data.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<li>{{ .Render "summary/series_post" }}</li>
{{ end }}
</ul>
</div>
</div>

View File

@ -1,27 +1,29 @@
<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 class="post">
<div class="post-series-position">
{{ if .Scratch.Get "series_position" }}
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
{{ end }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</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>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
{{ 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>
</div>

View File

@ -4,17 +4,13 @@
{{ .Title | markdownify }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
<div class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="post">
{{ .Render "summary/author" }}
</article>
{{ end }}
<ul>
{{ range . }}
<li>{{ .Render "summary/author" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -1,11 +1,9 @@
{{ define "main" }}
<div class="author-name">
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
</div>
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "post-metadata/author.html" . }}

View File

@ -1,8 +1,8 @@
{{ define "main" }}
{{ with .Content }}
<article class="homepage-content">
<div class="homepage-content">
{{ . }}
</article>
</div>
<hr>
{{ end }}

View File

@ -13,7 +13,7 @@
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
{{ with resources.Get "js/back-to-top.js" | fingerprint "sha512" }}
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
@ -40,7 +40,7 @@
{{ partial "seo-tags/author.html" . }}
<meta name="language" content="{{ .Language.Lang }}">
<meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}">
<meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
{{ partial "additional-head.html" . }}
</head>

View File

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

View File

@ -1,5 +1,5 @@
{{ if gt .Paginator.TotalPages 1 }}
<nav class="pagination">
<div class="pagination">
{{ template "_internal/pagination.html" . }}
</nav>
</div>
{{ end }}

View File

@ -1,5 +1,5 @@
<meta property="og:title" content="{{ .Title | plainify }}">
<meta property="og:description" content="{{ (partial "seo-description.html" .) | plainify }}">
<meta property="og:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">

View File

@ -1,5 +1,5 @@
<meta itemprop="name" content="{{ .Title | plainify }}">
<meta itemprop="description" content="{{ (partial "seo-description.html" .) | plainify }}">
<meta itemprop="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
{{ $format := "2006-01-02T15:04:05-07:00" }}
{{ with .Date }}
@ -21,10 +21,6 @@
<meta itemprop="image" content="{{ $featured.Permalink }}">
{{ end }}
{{ with (.GetTerms "tags") }}
{{ $tags := slice }}
{{ range . }}
{{ $tags = $tags | append .LinkTitle }}
{{ end }}
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
{{ with .Params.tags }}
<meta itemprop="keywords" content="{{ delimit . ", " }}">
{{ end }}

View File

@ -22,7 +22,7 @@
{{ end }}
<meta name="twitter:title" content="{{ .Title | plainify }}">
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
<meta name="twitter:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
{{ with .Site.Social.twitter }}
<meta name="twitter:site" content="@{{ . }}">

View File

@ -54,10 +54,9 @@
*/}}
{{ if .Site.Params.shareButtons.print }}
<a class="print-share"
href="javascript:void(0)"
<button class="print-share"
onclick="window.print(); share_event('Print');">
{{- partial "icon.html" "printer" -}}
</a>
</button>
{{ end }}
</div>

View File

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

View File

@ -4,17 +4,13 @@
{{ .Title | markdownify }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
<div class="series-taxonomy-list">
<div class="series-taxonomy">
{{ with .Pages }}
{{ range . }}
<article class="series-taxonomy">
{{ .Render "summary/series" }}
</article>
{{ end }}
<ul>
{{ range . }}
<li>{{ .Render "summary/series" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}

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 +0,0 @@
<hr class="full-width-hr">

View File

@ -9,5 +9,5 @@
{{ end }}
<p>
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" (.Get "type") "alt" (.Get "alt")) }}
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "image" "alt" (.Get "alt")) }}
</p>

View File

@ -0,0 +1,13 @@
{{ $border := false }}
{{ if .Get "border" }}
{{ $border = true }}
{{ end }}
{{ $hidecaption := false }}
{{ if .Get "hidecaption" }}
{{ $hidecaption = true }}
{{ end }}
<p>
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "video" "alt" (.Get "alt")) }}
</p>

View File

@ -1,37 +1,33 @@
{{ define "main" }}
<div class="post-title">
<h1>
{{ 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 }}
<h1>
{{ 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>
{{ with .Content }}
{{ . }}
{{ end }}
{{ .Title | markdownify }}
</h1>
<div class="taxonomy-list">
{{ with .Data.Terms.Alphabetical }}
{{ range . }}
{{ with .Page }}
<article class="taxonomy-term">
<div class="taxonomy-list-left">
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "post-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</article>
<ul>
{{ range . }}
{{ 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 }}
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -1,18 +1,16 @@
{{ define "main" }}
<div class="post-title">
<h1>
{{ 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 }}
<h1>
{{ 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>
</div>
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "post-metadata/taxonomy.html" . }}

View File

@ -8,7 +8,7 @@ description = "Simple Hugo theme for boba.best and bbaovanc.com"
homepage = "https://bbaovanc.com"
tags = []
features = []
min_version = "0.93.0"
min_version = "0.80.0"
[author]
name = "bbaovanc"