diff --git a/themes/red/assets/js/site.js b/themes/red/assets/js/site.js
new file mode 100644
index 0000000..99996ad
--- /dev/null
+++ b/themes/red/assets/js/site.js
@@ -0,0 +1,8 @@
+imagesLoaded(document.querySelector('.grid'), function(instance) {
+ new Masonry('.grid', {
+ itemSelector: '.grid-item',
+ columnWidth: 300,
+ fitWidth: true,
+ gutter: 10
+ });
+});
diff --git a/themes/red/layouts/_default/art.html b/themes/red/layouts/_default/art.html
index 857f603..f26c336 100644
--- a/themes/red/layouts/_default/art.html
+++ b/themes/red/layouts/_default/art.html
@@ -108,15 +108,9 @@
Next
{{ end }}
-
-
+ {{ $site := resources.Get "js/site.js" }}
+ {{ if hugo.IsProduction }}
+ {{ $site = $site | minify | fingerprint | resources.PostProcess }}
+ {{ end }}
+
{{ end }}
diff --git a/themes/red/layouts/_default/arttag.html b/themes/red/layouts/_default/arttag.html
index 2e24ef1..e75059f 100644
--- a/themes/red/layouts/_default/arttag.html
+++ b/themes/red/layouts/_default/arttag.html
@@ -40,16 +40,9 @@
{{ template "_internal/pagination.html" . }}
-
-
+ {{ $site := resources.Get "js/site.js" }}
+ {{ if hugo.IsProduction }}
+ {{ $site = $site | minify | fingerprint | resources.PostProcess }}
+ {{ end }}
+
{{ end }}
diff --git a/themes/red/layouts/_default/gallery.html b/themes/red/layouts/_default/gallery.html
index 2e06abe..35a263b 100644
--- a/themes/red/layouts/_default/gallery.html
+++ b/themes/red/layouts/_default/gallery.html
@@ -3,93 +3,89 @@
{{ .Content }}
- {{ if in .File.Dir "art" }}
+ {{ $selected_year := $.Param "selectedyear" }}
+ {{ $art := (index site.Data ($.Param "json")) }}
+ {{ $pixiv_icon := resources.Get "pixiv.webp" }}
+ {{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
- {{ else }}
- {{ $selected_year := $.Param "selectedyear" }}
- {{ $art := (index site.Data ($.Param "json")) }}
- {{ $pixiv_icon := resources.Get "pixiv.webp" }}
- {{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
+ Table of Contents
+
+ {{ range $art.categories }}
+ {{ $without_space := replaceRE "(\\s)" "" .name }}
+
+ Table of Contents
-
- {{ range $art.categories }}
- {{ $without_space := replaceRE "(\\s)" "" .name }}
-
-
Thumbnail not found!
- {{ end }} - {{ else }} -Thumbnail not found!
+ {{ end }} + {{ else }} +