Various template improvements
This commit is contained in:
parent
36e02b3d6f
commit
aad72ed12c
9 changed files with 43 additions and 9 deletions
|
@ -14,6 +14,9 @@
|
|||
|
||||
{{ $.Scratch.Set "paginator" (.Paginate $nsfw_art) }}
|
||||
{{ partial "art-gallery" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -16,11 +16,13 @@
|
|||
|
||||
{{ $.Scratch.Set "paginator" (.Paginate $originals) }}
|
||||
{{ partial "art-gallery" . }}
|
||||
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "details" }}
|
||||
{{ partial "art-sidebar" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
|
||||
{{ $.Scratch.Set "paginator" (.Paginate $artworks) }}
|
||||
{{ partial "art-gallery" . }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "details" }}
|
||||
{{ partial "art-sidebar" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
{{- partial "head.html" . -}}
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
{{- block "head" . }}{{- end }}
|
||||
</head>
|
||||
<body>
|
||||
<header>{{- partial "header.html" . -}}</header>
|
||||
<div id="content">
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
|
||||
{{ $.Scratch.Set "paginator" (.Paginate ((where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true))) }}
|
||||
{{ partial "art-gallery" . }}
|
||||
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "details" }}
|
||||
{{ partial "art-sidebar" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "head" }}
|
||||
{{ partial "gallery-js" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
{{ if hugo.IsProduction }}
|
||||
{{ $masonry = $masonry | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $masonry.RelPermalink }}" integrity="{{ $masonry.Data.Integrity }}"></script>
|
||||
|
||||
{{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $imagesloaded.RelPermalink }}" integrity="{{ $imagesloaded.Data.Integrity }}"></script>
|
||||
|
||||
{{ $site := resources.Get "js/gallery.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
{{ end }}
|
||||
|
||||
<link href="/blog/index.xml" rel="alternate" type="application/rss+xml" title="{{ $.Site.Params.author }}'s blog">
|
||||
<link href="/art/index.xml" rel="alternate" type="application/rss+xml" title="{{ $.Site.Params.author }}'s art">
|
||||
|
||||
{{ $style := resources.Get "css/site.css" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
|
@ -35,5 +36,19 @@
|
|||
<meta name="rating" content="adult">
|
||||
{{ end }}
|
||||
|
||||
<meta name="author" content="{{ $.Site.Params.author }}">
|
||||
<meta name="creator" content="{{ $.Site.Params.author }}">
|
||||
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
{{ with .Params.tags }}
|
||||
{{ $tags := delimit . "," }}
|
||||
<meta name="keywords" content="{{ $tags }}">
|
||||
{{ end }}
|
||||
{{ with .Params.arttags }}
|
||||
{{ $tags := delimit . "," }}
|
||||
<meta name="keywords" content="{{ $tags }}">
|
||||
{{ end }}
|
||||
<meta name="color-scheme" content="dark light">
|
||||
|
||||
{{ partial "opengraph.html" . }}
|
||||
</head>
|
||||
|
|
Loading…
Add table
Reference in a new issue