This commit is contained in:
Julieñ
2024-05-21 09:41:48 +02:00
parent 4c356a8af2
commit 1bb184cfe4
1646 changed files with 3456 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
public/
resources/
assets/jsconfig.json
.hugo_build.lock

View 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.

View File

@@ -0,0 +1,18 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/fe020ffb-29ff-409c-905b-6f00175091d0/deploy-status)](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.

View 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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View 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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@@ -0,0 +1,4 @@
---
title: The Gallery
headless: true
---

View File

@@ -0,0 +1,5 @@
module github.com/bep/gallerydeluxe_starter
go 1.19
require github.com/bep/gallerydeluxe v0.11.1 // indirect

View 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=

View File

@@ -0,0 +1,4 @@
go 1.19
use .
use ../gallerydeluxe

View 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">&times;</span>
{{ if $params.enable_exif }}
<div id="gd-modal-exif" class="gd-modal-exif"></div>
{{ end }}
</div>
</body>
</html>

View 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 }}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,6 @@
[build]
publish = "public"
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[build.environment]
HUGO_VERSION = "0.104.2"

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.1 KiB