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

View File

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

View File

@ -46,7 +46,9 @@
</div>
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ 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" }}
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
{{ else if eq .MediaType.MainType "video" }}
<video controls>
<video controls preload="metadata">
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
{{ i18n "browser_no_video_support" }}
</video>

View File

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

View File

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