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) }}
|
{{ $.Scratch.Set "paginator" (.Paginate $nsfw_art) }}
|
||||||
{{ partial "art-gallery" . }}
|
{{ partial "art-gallery" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
{{ partial "gallery-js" . }}
|
{{ partial "gallery-js" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,13 @@
|
||||||
|
|
||||||
{{ $.Scratch.Set "paginator" (.Paginate $originals) }}
|
{{ $.Scratch.Set "paginator" (.Paginate $originals) }}
|
||||||
{{ partial "art-gallery" . }}
|
{{ partial "art-gallery" . }}
|
||||||
|
|
||||||
{{ partial "gallery-js" . }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "details" }}
|
{{ define "details" }}
|
||||||
{{ partial "art-sidebar" . }}
|
{{ partial "art-sidebar" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
|
{{ partial "gallery-js" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
|
|
||||||
{{ $.Scratch.Set "paginator" (.Paginate $artworks) }}
|
{{ $.Scratch.Set "paginator" (.Paginate $artworks) }}
|
||||||
{{ partial "art-gallery" . }}
|
{{ partial "art-gallery" . }}
|
||||||
{{ partial "gallery-js" . }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "details" }}
|
{{ define "details" }}
|
||||||
{{ partial "art-sidebar" . }}
|
{{ partial "art-sidebar" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
|
{{ partial "gallery-js" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
<html lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||||
|
<head>
|
||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
|
|
||||||
|
{{- block "head" . }}{{- end }}
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>{{- partial "header.html" . -}}</header>
|
<header>{{- partial "header.html" . -}}</header>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
{{ partial "gallery-js" . }}
|
{{ partial "gallery-js" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,12 @@
|
||||||
|
|
||||||
{{ $.Scratch.Set "paginator" (.Paginate ((where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true))) }}
|
{{ $.Scratch.Set "paginator" (.Paginate ((where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true))) }}
|
||||||
{{ partial "art-gallery" . }}
|
{{ partial "art-gallery" . }}
|
||||||
|
|
||||||
{{ partial "gallery-js" . }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "details" }}
|
{{ define "details" }}
|
||||||
{{ partial "art-sidebar" . }}
|
{{ partial "art-sidebar" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
|
{{ partial "gallery-js" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "head" }}
|
||||||
{{ partial "gallery-js" . }}
|
{{ partial "gallery-js" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
{{ if hugo.IsProduction }}
|
{{ if hugo.IsProduction }}
|
||||||
{{ $masonry = $masonry | fingerprint | resources.PostProcess }}
|
{{ $masonry = $masonry | fingerprint | resources.PostProcess }}
|
||||||
{{ end }}
|
{{ 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" }}
|
{{ $imagesloaded := resources.Get "js/imagesloaded.min.js" }}
|
||||||
{{ if hugo.IsProduction }}
|
{{ if hugo.IsProduction }}
|
||||||
{{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
|
{{ $imagesloaded = $imagesloaded | fingerprint | resources.PostProcess }}
|
||||||
{{ end }}
|
{{ 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" }}
|
{{ $site := resources.Get "js/gallery.js" }}
|
||||||
{{ if hugo.IsProduction }}
|
{{ if hugo.IsProduction }}
|
||||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||||
{{ end }}
|
{{ 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 }}
|
{{ end }}
|
||||||
|
|
||||||
<link href="/blog/index.xml" rel="alternate" type="application/rss+xml" title="{{ $.Site.Params.author }}'s blog">
|
<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" }}
|
{{ $style := resources.Get "css/site.css" }}
|
||||||
{{ if hugo.IsProduction }}
|
{{ if hugo.IsProduction }}
|
||||||
|
@ -35,5 +36,19 @@
|
||||||
<meta name="rating" content="adult">
|
<meta name="rating" content="adult">
|
||||||
{{ end }}
|
{{ 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" . }}
|
{{ partial "opengraph.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Add table
Reference in a new issue