mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-31 00:57:33 -05:00
Compare commits
5 Commits
f35a286d34
...
cleanup-bo
Author | SHA1 | Date | |
---|---|---|---|
f9481a6e7f
|
|||
8083b1a299
|
|||
314b533698
|
|||
00a0f64be4
|
|||
741b3bc01b
|
@@ -295,15 +295,35 @@ body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin: var(--page-margin) auto;
|
||||
/* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
|
||||
padding: 0 var(--page-margin);
|
||||
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
|
||||
/* body-module types:
|
||||
*
|
||||
* full-width: no max-width, no margin from the sides of the page
|
||||
* full-padded: no max-width, but has margin from the left/right page edges
|
||||
* center: max-width 720px, centered when too large, padded when screen is narrow
|
||||
*/
|
||||
|
||||
.body-module--full-width,
|
||||
.body-module--full-padded,
|
||||
.body-module--center-wide {
|
||||
margin-block: var(--page-margin);
|
||||
}
|
||||
|
||||
.body-module--full-width {
|
||||
margin-inline: 0;
|
||||
}
|
||||
.body-module-full-padded {
|
||||
margin-inline: var(--page-margin);
|
||||
}
|
||||
.body-module--center {
|
||||
margin-inline: auto;
|
||||
/* add the minimum margin here because we are using auto for its centering */
|
||||
padding-inline: var(--page-margin);
|
||||
/* account for the padding being included in the element's calculated width */
|
||||
max-width: calc(720px + 2 * var(--page-margin));
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: var(--page-margin) 0;
|
||||
margin-bottom: var(--page-margin);
|
||||
text-align: center;
|
||||
font-size: smaller;
|
||||
}
|
||||
@@ -376,10 +396,6 @@ footer p {
|
||||
|
||||
/* Breadcrumb navigation {{{ */
|
||||
|
||||
.breadcrumb {
|
||||
margin: var(--page-margin) 0;
|
||||
}
|
||||
|
||||
.breadcrumb ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<nav class="breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
|
||||
<nav class="body-module--center breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
|
||||
<ul>
|
||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
</ul>
|
||||
|
@@ -1,24 +1,26 @@
|
||||
{{ define "main" }}
|
||||
<h1>
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
{{ .Title | markdownify }}
|
||||
</h1>
|
||||
<section class="body-module--center">
|
||||
<h1>
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
{{ .Title | markdownify }}
|
||||
</h1>
|
||||
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
<article class="page">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages }}
|
||||
{{ range . }}
|
||||
<article class="page">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
@@ -8,32 +8,30 @@
|
||||
|
||||
{{ partial "top.html" . }}
|
||||
|
||||
<div class="main-container">
|
||||
{{ if not .IsHome }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
{{ if not .IsHome }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<main id="main-content">
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ block "pre-body" . }}{{ end }}
|
||||
|
||||
<main id="main-content">
|
||||
{{ block "main" . }}
|
||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
{{ block "post-body" . }}{{ end }}
|
||||
|
||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||
<footer class="body-module--center">
|
||||
{{ with .Site.Copyright }}
|
||||
{{ . | safeHTML }}
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||
<footer>
|
||||
{{ with .Site.Copyright }}
|
||||
{{ . | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.footer }}
|
||||
{{ . | $.RenderString (dict "display" "block") }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ block "post-body" . }}
|
||||
{{/* currently this is only used for related posts */}}
|
||||
{{ with .Site.Params.footer }}
|
||||
{{ . | $.RenderString (dict "display" "block") }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
</body>
|
||||
|
||||
|
@@ -1,13 +1,15 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
<article class="homepage-content">
|
||||
<article class="body-module--center">
|
||||
{{ . }}
|
||||
</article>
|
||||
<hr>
|
||||
<hr class="body-module--center">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ if .Site.Params.homepageLatestPosts }}
|
||||
<div class="homepage-latest-posts">
|
||||
<div class="body-module--center">
|
||||
<h1>
|
||||
{{ i18n "latest_posts" }}
|
||||
{{ partial "rss-link.html" . }}
|
||||
|
@@ -1,81 +1,83 @@
|
||||
{{ define "main" }}
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
<article class="body-module--center">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{{ partial "page-metadata/post-full.html" . }}
|
||||
{{ partial "series-box.html" . }}
|
||||
{{ partial "page-metadata/post-full.html" . }}
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if .Params.Toc }}
|
||||
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
||||
<details>
|
||||
<summary>{{ i18n "table_of_contents" }}</summary>
|
||||
{{ if .Params.Toc }}
|
||||
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
|
||||
<details>
|
||||
<summary>{{ i18n "table_of_contents" }}</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</div>
|
||||
<div class="table-of-contents print">
|
||||
{{ i18n "table_of_contents" }}
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</div>
|
||||
<div class="table-of-contents print">
|
||||
{{ i18n "table_of_contents" }}
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "feature-figure.html" . }}
|
||||
{{ partial "feature-figure.html" . }}
|
||||
|
||||
<article class="post-content" data-pagefind-body>
|
||||
{{ .Content }}
|
||||
<article class="post-content" data-pagefind-body>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="prevnext">
|
||||
{{ with .NextInSection }}
|
||||
<a class="prev" href="{{ .Permalink }}">
|
||||
<div class="prev-caption">
|
||||
← {{ i18n "newer_post" }}
|
||||
</div>
|
||||
<div class="prev-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="prev"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .PrevInSection }}
|
||||
<a class="next" href="{{ .Permalink }}">
|
||||
<div class="next-caption">
|
||||
{{ i18n "older_post" }} →
|
||||
</div>
|
||||
<div class="next-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="next"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.shareButtons }}
|
||||
{{ partial "share.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.comments }}
|
||||
<div class="comments">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
{{ partial "series-box.html" . }}
|
||||
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="prevnext">
|
||||
{{ with .NextInSection }}
|
||||
<a class="prev" href="{{ .Permalink }}">
|
||||
<div class="prev-caption">
|
||||
← {{ i18n "newer_post" }}
|
||||
</div>
|
||||
<div class="prev-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="prev"></div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .PrevInSection }}
|
||||
<a class="next" href="{{ .Permalink }}">
|
||||
<div class="next-caption">
|
||||
{{ i18n "older_post" }} →
|
||||
</div>
|
||||
<div class="next-post">
|
||||
{{ .Title | markdownify }}
|
||||
</div>
|
||||
</a>
|
||||
{{ else }}
|
||||
<div class="next"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.shareButtons }}
|
||||
{{ partial "share.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.comments }}
|
||||
<div class="comments">
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||
{{ with $related }}
|
||||
<div class="related-posts">
|
||||
<div class="body-module--full-width related-posts">
|
||||
<hr>
|
||||
<h1>{{ i18n "related_posts" }}</h1>
|
||||
{{ partial "page-list.html" . }}
|
||||
|
@@ -1,2 +1,6 @@
|
||||
User-Agent: *
|
||||
Sitemap: {{ "sitemap.xml" | absLangURL }}
|
||||
|
||||
{{/* It complains about the raw markdown output having no title tag */ -}}
|
||||
User-Agent: Bingbot
|
||||
Disallow: /blog/*.md$
|
||||
|
Reference in New Issue
Block a user