mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-25 14:47:30 -05:00
Compare commits
19 Commits
c0426f191a
...
reduce-pri
Author | SHA1 | Date | |
---|---|---|---|
98d03cd803
|
|||
c980ced2fb
|
|||
9ca15a198f
|
|||
5c87c2b069
|
|||
6c42ae9518
|
|||
f33492ef8e
|
|||
ffcae79156
|
|||
a59a87374b
|
|||
88adfbdf89
|
|||
0f717e81c0
|
|||
ede5958a46
|
|||
0b3b160e87
|
|||
12c6efc0fe
|
|||
0e930f7ae1
|
|||
289f55dc19
|
|||
0ddf0bdf42
|
|||
03d826f1c4
|
|||
f94307cdbf
|
|||
fde24f7438
|
@ -8,7 +8,7 @@ comments: true
|
|||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
- {{ with .Site.Params.author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||||
|
|
||||||
categories:
|
categories:
|
||||||
- archetype-stuff
|
- archetype-stuff
|
||||||
|
@ -6,7 +6,7 @@ toc: true
|
|||||||
comments: false
|
comments: false
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
- {{ with .Site.params.author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -173,19 +173,18 @@ html {
|
|||||||
body {
|
body {
|
||||||
background-color: var(--background-0);
|
background-color: var(--background-0);
|
||||||
color: var(--text-0);
|
color: var(--text-0);
|
||||||
margin: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 760px) {
|
.main-container {
|
||||||
body {
|
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
padding: 0 20px;
|
||||||
|
max-width: 760px; /* 720px + 20px for left & right padding */
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-top: 20px;
|
margin: 20px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
@ -308,12 +307,7 @@ h1 svg.icon {
|
|||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
||||||
/* Heading formatting (website title and article section headers) {{{ */
|
/* Heading formatting (article section titles) {{{ */
|
||||||
|
|
||||||
.header {
|
|
||||||
margin: 16px 0;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this is also used i.e. in page-title */
|
/* this is also used i.e. in page-title */
|
||||||
.heading-link {
|
.heading-link {
|
||||||
@ -328,26 +322,36 @@ h1 svg.icon {
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* Navbar formatting {{{ */
|
/* Top bar formatting {{{ */
|
||||||
|
|
||||||
|
.top {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: var(--background-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
flex-grow: 1;
|
||||||
|
margin: 8px 16px;
|
||||||
|
font-size: 1.25em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-wrap: wrap;
|
||||||
overflow: auto;
|
|
||||||
background-color: var(--background-1);
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-top: 5px;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-item {
|
.navbar-item {
|
||||||
padding: 8px 12px;
|
padding: 12px 16px;
|
||||||
border-radius: 12px;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-item:hover {
|
.navbar-item:hover {
|
||||||
background-color: var(--background-3);
|
background-color: var(--background-2);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,20 +361,19 @@ h1 svg.icon {
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* Back to top {{{ */
|
/* Skip to main content {{{ */
|
||||||
#top {
|
#skip-to-main {
|
||||||
font-size: 0;
|
position: absolute;
|
||||||
|
padding: 8px;
|
||||||
|
background-color: var(--text-0);
|
||||||
|
color: var(--background-0);
|
||||||
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
#back-to-top {
|
#skip-to-main:focus {
|
||||||
position: fixed;
|
transform: translateY(0%);
|
||||||
float: right;
|
}
|
||||||
bottom: 25px;
|
#main-content:target {
|
||||||
right: 25px;
|
animation: none; /* prevent it from turning yellow */
|
||||||
background-color: var(--background-1);
|
|
||||||
color: var(--text-1);
|
|
||||||
border-radius: 100%;
|
|
||||||
padding: 12px;
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
@ -855,22 +858,22 @@ aside {
|
|||||||
}
|
}
|
||||||
|
|
||||||
aside.note {
|
aside.note {
|
||||||
background-color: var(--background-blue-1);
|
background-color: var(--accent-blue-1);
|
||||||
}
|
}
|
||||||
aside.info {
|
aside.info {
|
||||||
background-color: var(--background-green-1);
|
background-color: var(--accent-green-1);
|
||||||
}
|
}
|
||||||
aside.tip {
|
aside.tip {
|
||||||
background-color: var(--background-teal-1);
|
background-color: var(--accent-teal-1);
|
||||||
}
|
}
|
||||||
aside.warning {
|
aside.warning {
|
||||||
background-color: var(--background-yellow-1);
|
background-color: var(--accent-yellow-1);
|
||||||
}
|
}
|
||||||
aside.example {
|
aside.example {
|
||||||
background-color: var(--background-purple-1);
|
background-color: var(--accent-purple-1);
|
||||||
}
|
}
|
||||||
aside.quote {
|
aside.quote {
|
||||||
background-color: var(--background-1);
|
background-color: var(--accent-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
@ -884,47 +887,26 @@ aside.quote {
|
|||||||
margin: 25px 0;
|
margin: 25px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-width-page-list > hr,
|
.related-posts > hr,
|
||||||
.full-width-page-list > h1 {
|
.related-posts > h1 {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-width-page-list .page {
|
.related-posts .page {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-width-page-list .page:first-child {
|
.related-posts .page:first-child {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
.full-width-page-list .page:last-child {
|
.related-posts .page:last-child {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
.related-posts .page-list {
|
||||||
/* when the screen is smaller than max size, make sure that the .related div
|
|
||||||
* still reaches the screen edge. then if the posts overflow and require
|
|
||||||
* scrolling, you can see it cut off on the side of your phone screen
|
|
||||||
*/
|
|
||||||
.full-width-page-list {
|
|
||||||
margin-left: -20px;
|
|
||||||
margin-right: -20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 720px) {
|
|
||||||
.full-width-page-list {
|
|
||||||
/* this makes it full width -- 720px max-width on body it is exactly 720px
|
|
||||||
* so .related takes up full width
|
|
||||||
*/
|
|
||||||
margin-left: calc(-100vw / 2 + 720px / 2);
|
|
||||||
margin-right: calc(-100vw / 2 + 720px / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.full-width-page-list .page-list {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
@ -946,13 +928,12 @@ aside.quote {
|
|||||||
|
|
||||||
/* Print compatibility {{{ */
|
/* Print compatibility {{{ */
|
||||||
@media print {
|
@media print {
|
||||||
.top,
|
.top > .navbar,
|
||||||
.section-header-link,
|
.section-header-link,
|
||||||
.post-meta-edit-history,
|
.post-meta-edit-history,
|
||||||
.prevnext,
|
.prevnext,
|
||||||
.share-buttons,
|
.share-buttons,
|
||||||
.related-posts,
|
.related-posts {
|
||||||
.latest-posts {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -961,8 +942,21 @@ aside.quote {
|
|||||||
color-adjust: exact !important;
|
color-adjust: exact !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
.top {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
.top > .header {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.main-container {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
margin: 8px 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb {
|
||||||
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table,
|
table,
|
||||||
@ -979,8 +973,32 @@ aside.quote {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#back-to-top {
|
/*
|
||||||
display: none !important;
|
* reduce usage of background colors
|
||||||
|
*/
|
||||||
|
|
||||||
|
aside {
|
||||||
|
background-color: unset !important;
|
||||||
|
border: 4px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside.note {
|
||||||
|
border-color: var(--background-blue-1);
|
||||||
|
}
|
||||||
|
aside.info {
|
||||||
|
border-color: var(--background-green-1);
|
||||||
|
}
|
||||||
|
aside.tip {
|
||||||
|
border-color: var(--background-teal-1);
|
||||||
|
}
|
||||||
|
aside.warning {
|
||||||
|
border-color: var(--background-yellow-1);
|
||||||
|
}
|
||||||
|
aside.example {
|
||||||
|
border-color: var(--background-purple-1);
|
||||||
|
}
|
||||||
|
aside.quote {
|
||||||
|
border-color: var(--background-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
// 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
|
// code block copy to clipboard
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
document.querySelectorAll(".code-block").forEach(codeBlock => {
|
document.querySelectorAll(".code-block").forEach(codeBlock => {
|
||||||
|
@ -10,13 +10,13 @@ enableGitInfo: true
|
|||||||
taxonomies:
|
taxonomies:
|
||||||
_merge: deep
|
_merge: deep
|
||||||
|
|
||||||
author:
|
|
||||||
name: bbaovanc
|
|
||||||
|
|
||||||
markup: # this just keeps the bobatheme markup styling
|
markup: # this just keeps the bobatheme markup styling
|
||||||
_merge: deep
|
_merge: deep
|
||||||
|
|
||||||
params:
|
params:
|
||||||
|
author:
|
||||||
|
name: bbaovanc
|
||||||
|
|
||||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||||
description: Example website for bobatheme
|
description: Example website for bobatheme
|
||||||
|
|
||||||
@ -32,9 +32,6 @@ params:
|
|||||||
# gitFileIcon: github-circle
|
# gitFileIcon: github-circle
|
||||||
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
|
# 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
|
# social media share icons
|
||||||
# shareButtons:
|
# shareButtons:
|
||||||
# twitter: true
|
# twitter: true
|
@ -4,19 +4,25 @@
|
|||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<a id="top" aria-hidden="true"></a>
|
<a id="skip-to-main" href="#main-content">Skip to main content</a>
|
||||||
|
|
||||||
{{ partial "top.html" . }}
|
{{ partial "top.html" . }}
|
||||||
|
|
||||||
|
<div class="main-container">
|
||||||
{{ if not .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<main>
|
<main id="main-content">
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ block "post-body" . }}
|
||||||
|
{{/* currently this is only used for related posts */}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||||
<footer>
|
<footer>
|
||||||
@ -29,17 +35,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
|
|
||||||
{{ partial "icon.html" "chevron-up" }}
|
|
||||||
</a>
|
|
||||||
<noscript>
|
|
||||||
<style>
|
|
||||||
#back-to-top {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</noscript>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -73,17 +73,16 @@
|
|||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ define "post-body" }}
|
||||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||||
{{ with $related }}
|
{{ with $related }}
|
||||||
<div class="related-posts full-width-page-list">
|
<div class="related-posts">
|
||||||
<hr>
|
<hr>
|
||||||
<h1>{{ i18n "related_posts" }}</h1>
|
<h1>{{ i18n "related_posts" }}</h1>
|
||||||
{{ partial "page-list.html" . }}
|
{{ partial "page-list.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Site.Params.latestPostsOnContent }}
|
|
||||||
{{ partialCached "latest-posts.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{{ with index . "src" }}
|
{{ with index . "src" }}
|
||||||
{{ $media := . }}
|
{{ $media := . }}
|
||||||
{{ if eq .MediaType.MainType "image" }}
|
{{ if eq .MediaType.MainType "image" }}
|
||||||
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
|
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" loading="lazy" />
|
||||||
{{ else if eq .MediaType.MainType "video" }}
|
{{ else if eq .MediaType.MainType "video" }}
|
||||||
<video controls preload="metadata">
|
<video controls preload="metadata">
|
||||||
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
<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/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">
|
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='all'">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }}
|
{{ with resources.Get "css/syntax-light.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" media="print" onload="this.media='all'">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<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>
|
|
@ -6,9 +6,9 @@
|
|||||||
{{ $authors := slice }}
|
{{ $authors := slice }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }}
|
{{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }}
|
||||||
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url . | safeHTML) }}
|
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ delimit $authors ", " }}
|
{{ delimit $authors ", " | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ delimit . ", " }}
|
{{ delimit . ", " }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
|
|
||||||
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||||
{{ partial "icon.html" "folder" }}
|
{{ partial "icon.html" "folder" }}
|
||||||
{{ delimit $categories ", " }}
|
{{ delimit $categories ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
|
|
||||||
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||||
{{ partial "icon.html" "files" }}
|
{{ partial "icon.html" "files" }}
|
||||||
{{ delimit $series ", " }}
|
{{ delimit $series ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
|
|
||||||
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||||
{{ partial "icon.html" "tag" }}
|
{{ partial "icon.html" "tag" }}
|
||||||
{{ delimit $tags ", " }}
|
{{ delimit $tags ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if eq $type "image" }}
|
{{ if eq $type "image" }}
|
||||||
<img src="{{ $src }}" alt="{{ $alt }}" />
|
<img src="{{ $src }}" alt="{{ $alt }}" loading="lazy" />
|
||||||
{{ else if eq $type "video" }}
|
{{ else if eq $type "video" }}
|
||||||
<video controls preload="metadata">
|
<video controls preload="metadata">
|
||||||
<source src="{{ $src }}" alt="{{ $alt }}">
|
<source src="{{ $src }}" alt="{{ $alt }}">
|
||||||
|
@ -12,6 +12,6 @@
|
|||||||
This post is part of a series:
|
This post is part of a series:
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ delimit $series ", " }}
|
{{ delimit $series ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<div class="top">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
|
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
|
||||||
{{ .Site.Title | markdownify }}
|
{{ .Site.Title | markdownify }}
|
||||||
@ -11,7 +12,8 @@
|
|||||||
|
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ $isActive := false }}
|
{{ $isActive := false }}
|
||||||
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}}
|
||||||
|
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
|
||||||
{{ $isActive = true }}
|
{{ $isActive = true }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||||
@ -19,3 +21,4 @@
|
|||||||
href="{{ .URL }}">{{ .Name }}</a>
|
href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
</div>
|
||||||
|
@ -9,9 +9,12 @@
|
|||||||
{{ $path = .Get 0 }}
|
{{ $path = .Get 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with ($path | readFile) }}
|
||||||
{{ if $markdown }}
|
{{ if $markdown }}
|
||||||
{{ $path | readFile | .Page.RenderString (dict "display" "block") }}
|
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $path | readFile }}
|
{{ $path | readFile }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "file not found: %s" $path }}
|
||||||
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user