mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-04 02:17:34 -05:00
Compare commits
4 Commits
bda5569d56
...
cleanup-bo
Author | SHA1 | Date | |
---|---|---|---|
f9481a6e7f
|
|||
8083b1a299
|
|||
314b533698
|
|||
00a0f64be4
|
@@ -295,15 +295,35 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-container {
|
/* body-module types:
|
||||||
margin: var(--page-margin) auto;
|
*
|
||||||
/* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
|
* full-width: no max-width, no margin from the sides of the page
|
||||||
padding: 0 var(--page-margin);
|
* full-padded: no max-width, but has margin from the left/right page edges
|
||||||
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
|
* 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 {
|
footer {
|
||||||
margin: var(--page-margin) 0;
|
margin-bottom: var(--page-margin);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
@@ -376,10 +396,6 @@ footer p {
|
|||||||
|
|
||||||
/* Breadcrumb navigation {{{ */
|
/* Breadcrumb navigation {{{ */
|
||||||
|
|
||||||
.breadcrumb {
|
|
||||||
margin: var(--page-margin) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.breadcrumb ul {
|
.breadcrumb ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 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>
|
<ul>
|
||||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<section class="body-module--center">
|
||||||
<h1>
|
<h1>
|
||||||
{{ partial "icon.html" "user-circle" }}
|
{{ partial "icon.html" "user-circle" }}
|
||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
@@ -21,4 +22,5 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -8,19 +8,22 @@
|
|||||||
|
|
||||||
{{ partial "top.html" . }}
|
{{ partial "top.html" . }}
|
||||||
|
|
||||||
<div class="main-container">
|
|
||||||
{{ if not .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ block "pre-body" . }}{{ end }}
|
||||||
|
|
||||||
<main id="main-content">
|
<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>
|
||||||
|
|
||||||
|
{{ block "post-body" . }}{{ end }}
|
||||||
|
|
||||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||||
<footer>
|
<footer class="body-module--center">
|
||||||
{{ with .Site.Copyright }}
|
{{ with .Site.Copyright }}
|
||||||
{{ . | safeHTML }}
|
{{ . | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -30,11 +33,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ block "post-body" . }}
|
|
||||||
{{/* currently this is only used for related posts */}}
|
|
||||||
{{ end }}
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,13 +1,15 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ with .Content }}
|
{{ with .Content }}
|
||||||
<article class="homepage-content">
|
<article class="body-module--center">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</article>
|
</article>
|
||||||
<hr>
|
<hr class="body-module--center">
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "post-body" }}
|
||||||
{{ if .Site.Params.homepageLatestPosts }}
|
{{ if .Site.Params.homepageLatestPosts }}
|
||||||
<div class="homepage-latest-posts">
|
<div class="body-module--center">
|
||||||
<h1>
|
<h1>
|
||||||
{{ i18n "latest_posts" }}
|
{{ i18n "latest_posts" }}
|
||||||
{{ partial "rss-link.html" . }}
|
{{ partial "rss-link.html" . }}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<article class="body-module--center">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>
|
<h1>
|
||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
@@ -69,13 +70,14 @@
|
|||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{ define "post-body" }}
|
{{ define "post-body" }}
|
||||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||||
{{ with $related }}
|
{{ with $related }}
|
||||||
<div class="related-posts">
|
<div class="body-module--full-width related-posts">
|
||||||
<hr>
|
<hr>
|
||||||
<h1>{{ i18n "related_posts" }}</h1>
|
<h1>{{ i18n "related_posts" }}</h1>
|
||||||
{{ partial "page-list.html" . }}
|
{{ partial "page-list.html" . }}
|
||||||
|
Reference in New Issue
Block a user