4 Commits

Author SHA1 Message Date
33d0f81444 Set video preload to metadata 2022-04-09 01:17:59 -05:00
5668feed1d Support additional-head.html 2022-04-08 01:18:20 -05:00
586bea37d5 Re-add margins on mobile 2022-04-04 21:54:52 -05:00
37c04460b5 Clean up some of the div layout 2022-04-04 21:47:26 -05:00
7 changed files with 21 additions and 22 deletions

View File

@ -52,6 +52,7 @@
} }
/* Post layout (in list pages) */ /* Post layout (in list pages) */
.list-page-content { .list-page-content {
display: flex; display: flex;
@ -202,10 +203,6 @@
/* Header formatting (website title and article section headers) */ /* Header formatting (website title and article section headers) */
.top {
margin: 20px;
}
.header a, .header a,
.section-header a { .section-header a {
color: inherit; color: inherit;
@ -242,15 +239,6 @@
padding: 8px 15px; padding: 8px 15px;
} }
.content,
footer {
margin: 20px;
}
footer {
text-align: center;
}
#back-to-top { #back-to-top {
position: fixed; position: fixed;
float: right; float: right;
@ -338,6 +326,7 @@ footer {
/* Basic elements */ /* Basic elements */
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
margin: 0 20px;
} }
@media screen and (prefers-reduced-motion: reduce) { @media screen and (prefers-reduced-motion: reduce) {
@ -350,11 +339,15 @@ body {
background-color: var(--background); background-color: var(--background);
color: var(--text-normal); color: var(--text-normal);
font-family: "Open Sans", "Noto Sans", sans-serif; font-family: "Open Sans", "Noto Sans", sans-serif;
margin: auto; margin: 0 auto 20px;
max-width: 720px; max-width: 720px;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
footer {
text-align: center;
}
img, img,
video { video {
max-width: 100%; max-width: 100%;
@ -504,9 +497,7 @@ li.disabled > .page-link:hover {
/* Breadcrumb navigation */ /* Breadcrumb navigation */
.breadcrumb { .breadcrumb {
margin-top: 40px; margin: 30px 0 20px;
margin-bottom: 20px;
margin-left: 20px;
} }
.breadcrumb ul { .breadcrumb ul {

View File

@ -14,15 +14,15 @@
{{ partial "breadcrumb.html" . }} {{ partial "breadcrumb.html" . }}
{{ end }} {{ end }}
<div class="content"> <div class="main">
{{ block "main" . }} {{ block "main" . }}
{{ .Content }} {{ .Content }}
{{ end }} {{ end }}
</div> </div>
{{ with .Site.Copyright }} {{ with .Site.Copyright }}
<hr>
<footer> <footer>
<hr>
<small> <small>
{{ . | safeHTML }} {{ . | safeHTML }}
</small> </small>

View File

@ -46,7 +46,9 @@
</div> </div>
{{ end }} {{ end }}
{{ .Content }} <div class="post-content">
{{ .Content }}
</div>
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }} {{ with $related }}

View File

@ -0,0 +1,4 @@
{{/*
Create a file named `layouts/partials/additional-head.html` at your site root to
add extra tags into <head>. Page variables are passed.
*/}}

View File

@ -11,7 +11,7 @@
{{ if eq .MediaType.MainType "image" }} {{ if eq .MediaType.MainType "image" }}
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" /> <img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
{{ else if eq .MediaType.MainType "video" }} {{ else if eq .MediaType.MainType "video" }}
<video controls> <video controls preload="metadata">
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}"> <source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
{{ i18n "browser_no_video_support" }} {{ i18n "browser_no_video_support" }}
</video> </video>

View File

@ -37,4 +37,6 @@
<meta name="language" content="{{ .Language.Lang }}"> <meta name="language" content="{{ .Language.Lang }}">
<meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}"> <meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
{{ partial "additional-head.html" . }}
</head> </head>

View File

@ -12,7 +12,7 @@
{{ if eq $type "image" }} {{ if eq $type "image" }}
<img src="{{ $src }}" alt="{{ $alt }}" /> <img src="{{ $src }}" alt="{{ $alt }}" />
{{ else if eq $type "video" }} {{ else if eq $type "video" }}
<video controls> <video controls preload="metadata">
<source src="{{ $src }}" alt="{{ $alt }}"> <source src="{{ $src }}" alt="{{ $alt }}">
{{ i18n "browser_no_video_support" }} {{ i18n "browser_no_video_support" }}
</video> </video>