diff --git a/assets/js/gallery.js b/assets/js/gallery.js new file mode 100644 index 0000000..6177906 --- /dev/null +++ b/assets/js/gallery.js @@ -0,0 +1,36 @@ +$(function(){ + $.get('./index.json', function(data) { + var items = $.map(data.images, function(img) { + return { + src: img.url, + srct: img.thumbnail, + height: img.height, + width: img.width, + } + }); + + $('#gallery').nanogallery2({ + thumbnailHeight: 200, + thumbnailWidth: 'auto', + + thumbnailGutterWidth: 10, + thumbnailGutterHeight: 10, + + thumbnailDisplayTransition: 'scaleUp', + thumbnailDisplayTransitionDuration: 700, + + thumbnailHoverEffect2: 'toolsAppear|scale120|borderLighter', + + // thumbnailToolbarImage: { + // topLeft: 'share|download', + // }, + + viewerGallery: 'bottom', + viewerTools: { + topRight: 'zoomButton, fullscreenButton, downloadButton, closeButton', + }, + + items, + }) + }) +}) diff --git a/layouts/_default/list.json b/layouts/_default/list.json new file mode 100644 index 0000000..e69de29 diff --git a/layouts/albums/list.html b/layouts/albums/list.html new file mode 100644 index 0000000..5d037b8 --- /dev/null +++ b/layouts/albums/list.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
Copyright {{ now.Year }}. All rights reserved.
+ diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index 91b928d..6808918 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,9 +1,18 @@ -{{- with resources.Get "css/main.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - +{{- with resources.Get "css/main.scss" }} + {{- $sassOptions := dict "targetPath" "css/style.css" "outputStyle" (cond hugo.IsProduction "compressed" "nested") "enableSourceMap" (not hugo.IsProduction) "transpiler" "dartsass" -}} + {{- with . | css.Sass $sassOptions -}} + {{- if hugo.IsProduction }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- else }} + {{- end }} {{- end }} {{- end }} +{{ with (resources.Get "css/nanogallery2.min.css" | fingerprint ) }} + +{{ end}} +{{ with (resources.Get "css/nanogallery2.woff.min.css" | fingerprint ) }} + +{{ end}} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 18fe842..da2625c 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -10,3 +10,7 @@ {{- end }} {{- end }} {{- end }} + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7980a00..124722f 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,2 +1 @@ -