mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 02:57:30 -05:00
Compare commits
8 Commits
c06e7eb938
...
master
Author | SHA1 | Date | |
---|---|---|---|
cc7cec07df
|
|||
be12afb50d
|
|||
9d761b2f81
|
|||
ba9c106a88
|
|||
150ee40fd5
|
|||
ca0f8d390c
|
|||
62f0d42140
|
|||
16f08dce7f
|
@ -291,17 +291,17 @@ table.simple tbody tr:nth-child(even) {
|
||||
|
||||
/* Icons */
|
||||
.icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
color: var(--text-1);
|
||||
text-align: center;
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
h1 svg.icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
/* workarounds for some icons from jam-icons being non-square aspect ratio */
|
||||
.icon-code {
|
||||
width: 1.25em;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@ -315,11 +315,6 @@ h1 svg.icon {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.heading-link svg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Top bar formatting {{{ */
|
||||
@ -676,6 +671,7 @@ h1 svg.icon {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.share-buttons a {
|
||||
@ -690,8 +686,7 @@ h1 svg.icon {
|
||||
}
|
||||
|
||||
.share-buttons svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* https://stackoverflow.com/a/72073682/19003757 */
|
||||
|
@ -7,18 +7,17 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with index . "src" }}
|
||||
{{ $media := . }}
|
||||
{{ if eq .MediaType.MainType "image" }}
|
||||
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" loading="lazy" />
|
||||
<img src="{{ .Permalink }}" alt="{{ .Title }}" loading="lazy" />
|
||||
{{ else if eq .MediaType.MainType "video" }}
|
||||
<video controls preload="metadata">
|
||||
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
||||
<source src="{{ .Permalink }}" alt="{{ .Title }}">
|
||||
{{ i18n "browser_no_video_support" }}
|
||||
</video>
|
||||
{{ end }}
|
||||
|
||||
{{ if not $hidecaption }}
|
||||
{{ with $media.Title }}
|
||||
{{ with .Title }}
|
||||
<figcaption>
|
||||
{{ . | markdownify }}
|
||||
</figcaption>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
||||
{{- $icon := $icon_resource.Content -}}
|
||||
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
||||
{{- $icon = replaceRE `<svg` (printf `<svg class="icon icon-%s"` .) $icon -}}
|
||||
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||||
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
||||
{{- $icon | safeHTML -}}
|
||||
|
1
layouts/_partials/page-metadata/custom-full.html
Normal file
1
layouts/_partials/page-metadata/custom-full.html
Normal file
@ -0,0 +1 @@
|
||||
<!-- Placeholder for website to add custom post metadata to summaries -->
|
@ -1,5 +1,5 @@
|
||||
{{ with .Params.authors }}
|
||||
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
<span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
|
||||
{{ if index $.Site.Taxonomies "authors" }}
|
||||
|
@ -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="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
{{ partial "icon.html" "folder" }}
|
||||
{{ delimit $categories ", " | safeHTML }}
|
||||
</div>
|
||||
|
@ -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="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||
{{ partial "icon.html" "files" }}
|
||||
{{ delimit $series ", " | safeHTML }}
|
||||
</div>
|
||||
|
@ -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="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
{{ delimit $tags ", " | safeHTML }}
|
||||
</div>
|
||||
|
@ -22,6 +22,8 @@
|
||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||
|
||||
{{ partial "page-metadata/custom-full.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/tags.html" . }}
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
{{ 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" . }}
|
||||
|
@ -33,7 +33,7 @@
|
||||
<meta property="og:locale" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.title }}
|
||||
{{ with .Site.Title }}
|
||||
<meta property="og:site_name" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<main id="main-content">
|
||||
<main id="main-content" {{ if .IsPage }}data-pagefind-body{{ end }}>
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user