mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-11-06 03:27:55 -06:00
Compare commits
3 Commits
master
...
1f4a06569d
| Author | SHA1 | Date | |
|---|---|---|---|
|
1f4a06569d
|
|||
|
5590019c74
|
|||
|
90ead0daea
|
@@ -174,6 +174,30 @@ video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
figure > .figure-media {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
figure > .figure-media.border {
|
||||
border: 2px solid var(--figure-border);
|
||||
}
|
||||
|
||||
.post-media > figure > .figure-media {
|
||||
border: 7px solid var(--figure-border);
|
||||
}
|
||||
|
||||
figure {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-0);
|
||||
text-decoration: inherit;
|
||||
@@ -420,26 +444,26 @@ body {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Summary card formatting {{{ */
|
||||
/* List layout {{{ */
|
||||
|
||||
.summary-card {
|
||||
.page-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
gap: 40px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
padding: 24px;
|
||||
border-radius: 12px;
|
||||
background-color: var(--background-1);
|
||||
color: var(--text-1);
|
||||
}
|
||||
|
||||
.summary-card-title {
|
||||
.summary-title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.summary-card-title a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.summary-card-title h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* hugo just can't handle this feature
|
||||
@@ -450,6 +474,29 @@ body {
|
||||
}
|
||||
*/
|
||||
|
||||
.page-title,
|
||||
.summary-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-title a,
|
||||
.summary-title a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.page-title h1,
|
||||
.summary-title h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.summary-description {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.summary-readmore {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.page-metadata {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
@@ -471,71 +518,9 @@ body {
|
||||
content: ",";
|
||||
}
|
||||
|
||||
/* for formatting of the featured image/media, see the .featured-media class */
|
||||
|
||||
.summary-card-description {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.summary-card-readmore {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Figures, and featured media component (used in page.html and summary-card) {{{ */
|
||||
|
||||
figure > .figure-media {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
figure > .figure-media.border {
|
||||
border: 2px solid var(--figure-border);
|
||||
}
|
||||
|
||||
figure {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.featured-media {
|
||||
.post-media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.featured-media > figure > .figure-media {
|
||||
border: 7px solid var(--figure-border);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* List layout {{{ */
|
||||
|
||||
.page-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
gap: 40px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-title a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.page-title h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
@@ -589,11 +574,7 @@ figcaption {
|
||||
|
||||
/* Series list layout {{{ */
|
||||
|
||||
.page-list--series {
|
||||
gap: 80px;
|
||||
}
|
||||
|
||||
.page-list--series-inner {
|
||||
.page-list-series-inner {
|
||||
gap: 10px;
|
||||
flex-direction: row;
|
||||
flex-flow: row wrap;
|
||||
@@ -602,7 +583,7 @@ figcaption {
|
||||
padding: 8px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.page-list--series-inner > .summary-card {
|
||||
.page-list-series-inner > .summary {
|
||||
flex: 1;
|
||||
min-width: 49%;
|
||||
}
|
||||
@@ -784,20 +765,20 @@ figcaption {
|
||||
*/
|
||||
|
||||
.related-posts > hr,
|
||||
.related-posts > h2 {
|
||||
.related-posts > h1 {
|
||||
margin: var(--page-margin);
|
||||
}
|
||||
|
||||
.related-posts .summary-card {
|
||||
.related-posts .page {
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
|
||||
}
|
||||
|
||||
.related-posts .summary-card:first-child {
|
||||
.related-posts .page:first-child {
|
||||
margin-left: var(--page-margin);
|
||||
}
|
||||
.related-posts .summary-card:last-child {
|
||||
.related-posts .page:last-child {
|
||||
margin-right: var(--page-margin);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ taxonomies:
|
||||
outputs:
|
||||
page:
|
||||
- html
|
||||
- markdown
|
||||
|
||||
outputFormats:
|
||||
markdown:
|
||||
ugly: true
|
||||
|
||||
privacy:
|
||||
googleAnalytics:
|
||||
|
||||
@@ -32,6 +32,9 @@ readingtime:
|
||||
edit_history:
|
||||
other: "Edit history"
|
||||
|
||||
view_markdown:
|
||||
other: "View raw"
|
||||
|
||||
|
||||
# Post count
|
||||
no_posts:
|
||||
@@ -45,8 +48,6 @@ post_count:
|
||||
# Navigation
|
||||
read_more:
|
||||
other: "Read more"
|
||||
see_posts:
|
||||
other: "See posts"
|
||||
|
||||
related_posts:
|
||||
other: "Related Posts"
|
||||
@@ -71,6 +72,9 @@ aria_rss_link:
|
||||
aria_post_meta_edit_history:
|
||||
other: "link to page edit history"
|
||||
|
||||
aria_post_meta_view_markdown:
|
||||
other: "link to view raw markdown code of page"
|
||||
|
||||
aria_post_meta_categories:
|
||||
other: "categories"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{ with .Resources.Get "feature" }}
|
||||
<div class="featured-media">
|
||||
<div class="post-media">
|
||||
<figure>
|
||||
{{ partial "embed-resource.html" . }}
|
||||
{{ with .Title }}
|
||||
@@ -1,5 +1,16 @@
|
||||
<div class="page-list">
|
||||
{{ with . }}
|
||||
{{ $list := dict }}
|
||||
{{ $extraclasses := "" }}
|
||||
{{ with try (index . "list") }}
|
||||
{{ if .Err }}
|
||||
{{ $list = $ }}
|
||||
{{ else }}
|
||||
{{ $list = .Value }}
|
||||
{{ $extraclasses = index $ "classes" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list{{ with $extraclasses }}{{ . }}{{ end }}">
|
||||
{{ with $list }}
|
||||
{{ range . }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
|
||||
8
layouts/_partials/page-metadata/item/viewraw.html
Normal file
8
layouts/_partials/page-metadata/item/viewraw.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ with .OutputFormats.Get "markdown" }}
|
||||
<span class="page-metadata-item post-meta-view-markdown" aria-label="{{ i18n "aria_post_meta_view_markdown" }}">
|
||||
{{ partial "icon.html" "code" }}
|
||||
<a href="{{ .Permalink }}" target="_blank">
|
||||
{{- i18n "view_markdown" -}}
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
@@ -20,6 +20,7 @@
|
||||
{{ partial "page-metadata/item/authors.html" . }}
|
||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||
{{ partial "page-metadata/item/comments-counter.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<article class="summary-card">
|
||||
<h2 class="summary-card-title">
|
||||
<article class="summary">
|
||||
<h2 class="summary-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h2>
|
||||
@@ -7,12 +7,12 @@
|
||||
{{ partial "page-metadata/author.html" . }}
|
||||
|
||||
{{ with .Summary }}
|
||||
<div class="summary-card-description">
|
||||
<div class="summary-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="summary-card-readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "see_posts" }} →</a>
|
||||
<div class="summary-readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -8,15 +8,5 @@
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "page-list.html" .Paginator.Pages }}
|
||||
{{ end }}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "featured-media.html" . }}
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<div class="post-content" data-pagefind-body>
|
||||
{{ .Content }}
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ with $related }}
|
||||
<div class="related-posts">
|
||||
<hr>
|
||||
<h2>{{ i18n "related_posts" }}</h2>
|
||||
<h1>{{ i18n "related_posts" }}</h1>
|
||||
{{ partial "page-list.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
9
layouts/page.markdown.md
Normal file
9
layouts/page.markdown.md
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ with .File -}}
|
||||
{{ with (.Path | readFile) -}}
|
||||
{{ . -}}
|
||||
{{ else -}}
|
||||
{{ errorf "file not found: %s" .Path -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ errorf "no file available for markdown template?" -}}
|
||||
{{ end -}}
|
||||
@@ -1,4 +1,6 @@
|
||||
User-Agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: {{ "sitemap.xml" | absLangURL }}
|
||||
|
||||
{{/* It complains about the raw markdown output having no title tag */ -}}
|
||||
User-Agent: Bingbot
|
||||
Disallow: /blog/*.md$
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<article class="summary-card">
|
||||
<h2 class="summary-card-title">
|
||||
<article class="summary">
|
||||
<h2 class="summary-title">
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
@@ -8,14 +8,12 @@
|
||||
{{ partial "page-metadata/series.html" . }}
|
||||
|
||||
{{ with .Summary }}
|
||||
<div class="summary-card-description">
|
||||
<div class="summary-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list page-list--series-inner">
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
<div class="page-list page-list-series-inner">
|
||||
{{ partial "page-list.html" .Data.Pages.Reverse }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list page-list--series">
|
||||
<div class="page-list series">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
{{ .Render "summary" }}
|
||||
<div class="page series">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<article class="summary-card">
|
||||
<h2 class="summary-card-title">
|
||||
<article class="summary">
|
||||
<h2 class="summary-title">
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
@@ -7,15 +7,15 @@
|
||||
|
||||
{{ partial "page-metadata/post-short.html" . }}
|
||||
|
||||
{{ partial "featured-media.html" . }}
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
{{ with .Summary }}
|
||||
<div class="summary-card-description">
|
||||
<div class="summary-description">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="summary-card-readmore">
|
||||
<div class="summary-readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user