mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-30 08:37:34 -05:00
Compare commits
2 Commits
314b533698
...
f9481a6e7f
Author | SHA1 | Date | |
---|---|---|---|
f9481a6e7f
|
|||
8083b1a299
|
@@ -295,24 +295,31 @@ body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.body-module {
|
||||
}
|
||||
/* 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--marginless {
|
||||
margin: 0;
|
||||
.body-module--full-width,
|
||||
.body-module--full-padded,
|
||||
.body-module--center-wide {
|
||||
margin-block: var(--page-margin);
|
||||
}
|
||||
|
||||
.body-module--full-width {
|
||||
margin: 0 var(--page-margin);
|
||||
/*
|
||||
margin-left: var(--page-margin);
|
||||
margin-right: var(--page-margin);
|
||||
*/
|
||||
margin-inline: 0;
|
||||
}
|
||||
.body-module--wide {
|
||||
margin-left: var(--page-margin);
|
||||
margin-right: var(--page-margin);
|
||||
max-width: 720px;
|
||||
.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 {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<nav class="body-module body-module--wide 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,4 +1,4 @@
|
||||
<header class="body-module body-module--marginless top">
|
||||
<header class="top">
|
||||
<div class="brand">
|
||||
<a href="{{ .Site.Home.Permalink | absLangURL }}">
|
||||
{{ .Site.Title | markdownify }}
|
||||
|
@@ -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 }}
|
||||
|
@@ -20,12 +20,10 @@
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
{{ block "post-body" . }}
|
||||
{{/* currently this is only used for related posts */}}
|
||||
{{ end }}
|
||||
{{ block "post-body" . }}{{ end }}
|
||||
|
||||
{{ if or .Site.Copyright .Site.Params.footer }}
|
||||
<footer class="body-module body-module--wide">
|
||||
<footer class="body-module--center">
|
||||
{{ with .Site.Copyright }}
|
||||
{{ . | safeHTML }}
|
||||
{{ end }}
|
||||
|
@@ -1,15 +1,15 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
<article class="body-module body-module--wide">
|
||||
<article class="body-module--center">
|
||||
{{ . }}
|
||||
</article>
|
||||
<hr class="body-module body-module--wide">
|
||||
<hr class="body-module--center">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-body" }}
|
||||
{{ if .Site.Params.homepageLatestPosts }}
|
||||
<div class="body-module body-module--wide">
|
||||
<div class="body-module--center">
|
||||
<h1>
|
||||
{{ i18n "latest_posts" }}
|
||||
{{ partial "rss-link.html" . }}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{{ define "main" }}
|
||||
<article class="body-module body-module--wide">
|
||||
<article class="body-module--center">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
{{ .Title | markdownify }}
|
||||
@@ -77,7 +77,7 @@
|
||||
{{ define "post-body" }}
|
||||
{{ $related := .Site.RegularPages.Related . | first 10 }}
|
||||
{{ with $related }}
|
||||
<div class="related-posts body-module body-module--full-width">
|
||||
<div class="body-module--full-width related-posts">
|
||||
<hr>
|
||||
<h1>{{ i18n "related_posts" }}</h1>
|
||||
{{ partial "page-list.html" . }}
|
||||
|
Reference in New Issue
Block a user