mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-31 04:58:14 +00:00
Reposition the main content
This commit is contained in:
parent
1f42703979
commit
0e07f56df1
@ -27,6 +27,9 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
|
|||||||
|
|
||||||
== Updated
|
== Updated
|
||||||
|
|
||||||
|
- Reposition certain components.
|
||||||
|
This is to (hopefully) fix certain layouts when the article is read in reader mode (in major web browsers such as Chrome and Firefox).
|
||||||
|
|
||||||
- Spacing between basic elements (i.e., `<p>`).
|
- Spacing between basic elements (i.e., `<p>`).
|
||||||
|
|
||||||
- Responsive font sizing.
|
- Responsive font sizing.
|
||||||
|
@ -1,24 +1,26 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<article class="post--single">
|
<div class="post--single">
|
||||||
<header>
|
|
||||||
<h1>{{ .Title }}</h1>
|
|
||||||
</header>
|
|
||||||
{{ partial "partials/components/post-meta.html" . }}
|
|
||||||
|
|
||||||
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
|
|
||||||
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
|
|
||||||
<style>
|
|
||||||
#TableOfContents:not(:empty)::before {
|
|
||||||
content: "{{ i18n "table_of_contents" | default "Table of contents" }}";
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{{ .TableOfContents }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ .Content }}
|
<article>
|
||||||
|
<header>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ partial "partials/components/post-meta.html" . }}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
|
||||||
|
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
|
||||||
|
<style>
|
||||||
|
#TableOfContents:not(:empty)::before {
|
||||||
|
content: "{{ i18n "table_of_contents" | default "Table of contents" }}";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{{ .TableOfContents }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
</article>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<hr aria-hidden="true"/>
|
<hr aria-hidden="true"/>
|
||||||
@ -53,6 +55,6 @@
|
|||||||
<p data-content-translations="{{ jsonify $langs }}">{{ i18n "available_translations" }}: {{ delimit $lang_links "," (printf " %s " (i18n "and")) }}</p>
|
<p data-content-translations="{{ jsonify $langs }}">{{ i18n "available_translations" }}: {{ delimit $lang_links "," (printf " %s " (i18n "and")) }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</div>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user