Initial
4
themes/gallerydeluxe_starter/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
public/
|
||||
resources/
|
||||
assets/jsconfig.json
|
||||
.hugo_build.lock
|
||||
21
themes/gallerydeluxe_starter/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Bjørn Erik Pedersen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
18
themes/gallerydeluxe_starter/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
[](https://app.netlify.com/sites/gallerydeluxe/deploys)
|
||||
|
||||
This is a starter project for the [Gallery Deluxe](https://github.com/bep/gallerydeluxe) Hugo Module. You need [Hugo](https://gohugo.io/getting-started/installing/) and [Go](https://go.dev/dl/) to run this project.
|
||||
|
||||
1. Click on use "Use this template" and give your new GitHub project a suitable name.
|
||||
1. Edit `go.mod` and replace the path with your new GitHub project's path[^1].
|
||||
1. Edit `config.toml` etc. to match your setup and replace the images inside `content/images` with your own.
|
||||
1. Add your custom logo in [layouts/partials/logo.html](layouts/partials/logo.html)
|
||||
|
||||
This starter projects can be previewd at [gallerydeluxe.netlify.app](https://gallerydeluxe.netlify.app/). A bigger gallery can be found at [staticbattery.com](https://staticbattery.com/).
|
||||
|
||||
**Note:** This isn't a _theme_; it's meant to be used as a standalone Hugo project. You can edit/add/move files in this project as you please.
|
||||
|
||||
## Update theme
|
||||
|
||||
Run `hugo mod get -u` to update to a newer version of Gallery Deluxe if one exists.
|
||||
|
||||
[^1]: I wish GitHub's template project feature had support for variable replacements.
|
||||
28
themes/gallerydeluxe_starter/assets/css/styles.css
Normal file
@@ -0,0 +1,28 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #101010;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
|
||||
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
z-index: 2;
|
||||
color: #fff;
|
||||
text-shadow: 2px 2px;
|
||||
}
|
||||
|
||||
.gd-modal-loaded .logo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
cursor: pointer;
|
||||
color: #ffe0c9;
|
||||
}
|
||||
BIN
themes/gallerydeluxe_starter/assets/images/gopher-hero8.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
69
themes/gallerydeluxe_starter/config.toml
Normal file
@@ -0,0 +1,69 @@
|
||||
baseURL = "https://www.example.com/"
|
||||
title = "Gallery Deluxe"
|
||||
disableKinds = ["section", "taxonomy", "term"]
|
||||
|
||||
[params]
|
||||
# Set to enable Plausible Analytics.
|
||||
plausible_domain = ""
|
||||
|
||||
[params.gallerydeluxe]
|
||||
|
||||
# Shuffle the images in the gallery to give the impression of a new gallery each page load.
|
||||
shuffle = false
|
||||
|
||||
# Reverse the order of the images in the gallery.
|
||||
reverse = true
|
||||
|
||||
# Enable Exif data in the gallery.
|
||||
# See https://gohugo.io/content-management/image-processing/#exif-data for how to filter tags.
|
||||
enable_exif = true
|
||||
|
||||
# Optional watermark file for the large images.
|
||||
[params.gallerydeluxe.watermark]
|
||||
image = "images/gopher-hero8.png" # relative to /assets
|
||||
posx = "left" # one of "left", "center", "right"
|
||||
posy = "bottom" # one of "top", "center", "bottom"
|
||||
|
||||
[build]
|
||||
[[build.cacheBusters]]
|
||||
source = 'content/.*\.(png|jpg|jpeg)'
|
||||
target = '(json)'
|
||||
[[build.cacheBusters]]
|
||||
source = 'layouts/.*'
|
||||
target = '(json)'
|
||||
|
||||
[caches]
|
||||
[caches.images]
|
||||
dir = ':cacheDir/gallerydeluxe'
|
||||
maxAge = "4320h" # 6 months.
|
||||
|
||||
[imaging]
|
||||
resampleFilter = "CatmullRom"
|
||||
quality = 71
|
||||
anchor = "smart"
|
||||
[imaging.exif]
|
||||
disableDate = false
|
||||
disableLatLong = true
|
||||
includeFields = 'Artist|LensModel|FNumber|ExposureTime'
|
||||
|
||||
[server]
|
||||
[[server.headers]]
|
||||
for = '/**'
|
||||
[server.headers.values]
|
||||
Referrer-Policy = 'strict-origin-when-cross-origin'
|
||||
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = "assets"
|
||||
target = "assets"
|
||||
[[module.mounts]]
|
||||
source = "layouts"
|
||||
target = "layouts"
|
||||
[[module.mounts]]
|
||||
source = "content"
|
||||
target = "content"
|
||||
[[module.mounts]]
|
||||
source = "static"
|
||||
target = "static"
|
||||
[[module.imports]]
|
||||
path = "github.com/bep/gallerydeluxe"
|
||||
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 282 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 256 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 241 KiB |
|
After Width: | Height: | Size: 261 KiB |
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 251 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 288 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 260 KiB |
|
After Width: | Height: | Size: 260 KiB |
|
After Width: | Height: | Size: 255 KiB |
|
After Width: | Height: | Size: 330 KiB |
|
After Width: | Height: | Size: 174 KiB |
4
themes/gallerydeluxe_starter/content/images/index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: The Gallery
|
||||
headless: true
|
||||
---
|
||||
5
themes/gallerydeluxe_starter/go.mod
Normal file
@@ -0,0 +1,5 @@
|
||||
module github.com/bep/gallerydeluxe_starter
|
||||
|
||||
go 1.19
|
||||
|
||||
require github.com/bep/gallerydeluxe v0.11.1 // indirect
|
||||
18
themes/gallerydeluxe_starter/go.sum
Normal file
@@ -0,0 +1,18 @@
|
||||
github.com/bep/gallerydeluxe v0.6.0 h1:HM32hGtRP93rRoSdlLne/IzjmJBIbtiuCkSbj/tBtho=
|
||||
github.com/bep/gallerydeluxe v0.6.0/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.7.0 h1:X+HoxJQOmpi08Re7wJRk0QsrLbNKYIgAxupmQQ66xKc=
|
||||
github.com/bep/gallerydeluxe v0.7.0/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.8.1 h1:PD3x1GVebSrfAxHDsebt8Trc9aZmF+PA4mXw6l/bABo=
|
||||
github.com/bep/gallerydeluxe v0.8.1/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.9.0 h1:l/FD9aUq78Yy/ltXF0CTAk3FwInCXXxIwCDKLNkoqjU=
|
||||
github.com/bep/gallerydeluxe v0.9.0/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.9.1 h1:Ca78oSIglf4gPu7yopQ4M/fsqiPQLqvXNMT2xX3KYRQ=
|
||||
github.com/bep/gallerydeluxe v0.9.1/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.9.2 h1:5dep3RdyiwUpMqzAjrwoKgM0O9y8fvR9J5QZk13/lZk=
|
||||
github.com/bep/gallerydeluxe v0.9.2/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.10.0 h1:0CXOArpCD6S0XdhFpXuShnlqx8VJBCrWhKdgi/xdRjE=
|
||||
github.com/bep/gallerydeluxe v0.10.0/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.11.0 h1:A5me+REJREWnHTC73yKeuXcC7g3V3s0DjgY7EDMwJMQ=
|
||||
github.com/bep/gallerydeluxe v0.11.0/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
github.com/bep/gallerydeluxe v0.11.1 h1:Bls2hBDY7WJ01TKtbmQT0Cl/Nwy8S/r5yj5qBaP7elo=
|
||||
github.com/bep/gallerydeluxe v0.11.1/go.mod h1:sUfRcjREo6DwxPo0sMp0TAxNZiGreOY6DY2dWGpSeR8=
|
||||
4
themes/gallerydeluxe_starter/hugo.work
Normal file
@@ -0,0 +1,4 @@
|
||||
go 1.19
|
||||
|
||||
use .
|
||||
use ../gallerydeluxe
|
||||
36
themes/gallerydeluxe_starter/layouts/index.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,
|
||||
initial-scale=1.0" />
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="icon" href="favicon.svg" />
|
||||
{{ partial "gallerydeluxe/head.html" . }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<a class="logo" href="{{ site.Home.RelPermalink }}">
|
||||
{{ partial "logo.html" . }}
|
||||
</a>
|
||||
|
||||
{{/* init.hmlt takes either a slice of .images or a .sourcePath that points to a bundle with images.
|
||||
An .id will be calculated if not provided. This will be used to create the URL to the data file.
|
||||
*/}}
|
||||
{{ $bundle := site.GetPage "images" }}
|
||||
{{ $images := $bundle.Resources.ByType "image" }}
|
||||
{{ $gallery := partial "gallerydeluxe/init.html" (dict "sourcePath" "images") }}
|
||||
{{ $params := site.Params.gallerydeluxe }}
|
||||
{{/* We currently only support 1 gallery per page, which is create4 by an element with id 'gallerydeluxe',
|
||||
and a valid data url.
|
||||
*/}}
|
||||
<body id="gallerydeluxe" data-gd-image-data-url="{{ $gallery.imageDataUrl }}">
|
||||
<div id="gd-modal" class="gd-modal">
|
||||
<span id="gd-modal-close" class="gd-modal-close">×</span>
|
||||
{{ if $params.enable_exif }}
|
||||
<div id="gd-modal-exif" class="gd-modal-exif"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
themes/gallerydeluxe_starter/layouts/partials/head.html
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
{{ $css := resources.Get "css/styles.css" }}
|
||||
{{ if hugo.IsProduction}}
|
||||
{{ $css = $css | minify | fingerprint }}
|
||||
{{ end }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}"></link>
|
||||
{{ with site.Params.plausible_domain }}
|
||||
<script defer data-domain="{{ . }}" src="https://plausible.io/js/plausible.js"></script>
|
||||
{{ end }}
|
||||
|
||||
10
themes/gallerydeluxe_starter/layouts/partials/logo.html
Normal file
|
After Width: | Height: | Size: 11 KiB |
6
themes/gallerydeluxe_starter/netlify.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[build]
|
||||
publish = "public"
|
||||
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.104.2"
|
||||
5
themes/gallerydeluxe_starter/static/favicon.svg
Normal file
|
After Width: | Height: | Size: 9.1 KiB |