From fc15ebbde0c982883cdd276840c8d2c74d965e13 Mon Sep 17 00:00:00 2001 From: Michele Date: Thu, 31 Jul 2025 00:25:18 +0200 Subject: [PATCH] Initial commit --- .gitignore | 6 +++ README.md | 11 +++++ assets/css/custom.css | 35 ++++++++++++++++ config/_default/hugo.toml | 62 ++++++++++++++++++++++++++++ content/_index.md | 17 ++++++++ content/about.md | 10 +++++ content/animals/_index.md | 12 ++++++ content/animals/cats/index.md | 18 ++++++++ content/animals/dogs/index.md | 11 +++++ content/categories/animals/_index.md | 4 ++ content/fashion-beauty/index.md | 13 ++++++ content/featured-album/index.md | 12 ++++++ content/imprint.md | 10 +++++ content/nature/index.md | 16 +++++++ content/private/index.md | 6 +++ go.mod | 7 ++++ layouts/partials/head-custom.html | 1 + package.json | 7 ++++ pull-images.sh | 57 +++++++++++++++++++++++++ 19 files changed, 315 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 assets/css/custom.css create mode 100644 config/_default/hugo.toml create mode 100644 content/_index.md create mode 100644 content/about.md create mode 100644 content/animals/_index.md create mode 100644 content/animals/cats/index.md create mode 100644 content/animals/dogs/index.md create mode 100644 content/categories/animals/_index.md create mode 100644 content/fashion-beauty/index.md create mode 100644 content/featured-album/index.md create mode 100644 content/imprint.md create mode 100644 content/nature/index.md create mode 100644 content/private/index.md create mode 100644 go.mod create mode 100644 layouts/partials/head-custom.html create mode 100644 package.json create mode 100755 pull-images.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c7fc78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules/ +public/ +resources/ +.hugo_build.lock +hugo_stats.json +content/**/*.jpg diff --git a/README.md b/README.md new file mode 100644 index 0000000..96fa7ea --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Example site for hugo-theme-gallery + +## Installation + +``` +# Install Hugo module +hugo mod get + +# Pull example images from Unsplash +./pull-images.sh +``` diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..849644d --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,35 @@ +/* High contrast colours +:root { + --surface-1-light: #fff; + --surface-2-light: #f5f5f5; + --text-1-light: #000; + --text-2-light: #737373; + --border-light: #bbb; + --surface-1-dark: #000; + --surface-2-dark: #171717; + --text-1-dark: #fff; + --text-2-dark: #a3a3a3; + --border-dark: #606060; +} +*/ + +/* Set maximum width for galleries to 1536px, add padding +section.gallery { + max-width: 1536px; + @media (min-width: 640px) { + padding-right: 1.5rem; + padding-left: 1.5rem; + } +} +*/ + +/* Larger header with circled buttons +body > header { + padding: 1.5rem; + .btn-square { + background: var(--surface-2); + border-radius: 9999px; + } + margin-bottom: 0; +} +*/ diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml new file mode 100644 index 0000000..442f34e --- /dev/null +++ b/config/_default/hugo.toml @@ -0,0 +1,62 @@ +copyright = "© Your Name" +defaultContentLanguage = "en" +disableKinds = ["taxonomy"] +enableRobotsTXT = true +languageCode = "en" +timeZone = "Europe/Berlin" +timeout = "120s" +title = "Gallery" + +[params] + defaultTheme = "dark" + description = "Example site for hugo-theme-gallery" + title = "My Gallery" + [params.author] + email = "user@example.com" + name = "Your Name" + [params.socialIcons] + facebook = "https://www.facebook.com/" + instagram = "https://www.instagram.com/" + github = "https://github.com/nicokaiser/hugo-theme-gallery/" + youtube = "https://www.youtube.com/" + email = "mailto:user@example.com" + #website = "https://example.com" + #mastodon = "https://example.com" + #pixelfed = "https://example.com" + #mixcloud = "https://example.com" + #flickr = "https://www.flickr.com" + #500px = "https://500px" + #whatsapp = "1234567890" + [params.gallery] + #boxSpacing = 10 + #targetRowHeight = 288 + #targetRowHeightTolerance = 0.25 + +[outputs] + home = ["HTML", "RSS"] + page = ["HTML"] + section = ["HTML"] + +[imaging] + quality = 75 + resampleFilter = "CatmullRom" + [imaging.exif] + disableDate = false + disableLatLong = true + includeFields = "ImageDescription|Orientation" + +[module] + [module.hugoVersion] + min = "0.121.2" + [[module.imports]] + path = "github.com/nicokaiser/hugo-theme-gallery/v4" + +[menu] + [[menu.footer]] + name = "GitHub" + url = "https://github.com/nicokaiser/hugo-theme-gallery/" + weight = 3 + +[services] + [services.rss] + limit = 100 diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..ab19cee --- /dev/null +++ b/content/_index.md @@ -0,0 +1,17 @@ +--- +description: An example site for hugo-theme-gallery. Images from Unsplash. +#lastmod: 2023-07-05 +title: Hugo Gallery +resources: + - src: martin-martz-wRuhOOaG-Z4-unsplash.jpg + params: + cover: true # cover of the home page is used for OpenGraph cards, etc. +menus: + main: + name: Home + weight: -1 +# sub-galleries on list pages are sorted by date and weight (descending) +#cascade: +# build: +# publishResources: false # do not include full images. Also disable download +--- diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..3eb1f4b --- /dev/null +++ b/content/about.md @@ -0,0 +1,10 @@ +--- +layout: prose +rss_ignore: true +title: About +menu: + main: + weight: 90 +--- + +This is a demonstration site for the Hugo Gallery theme. diff --git a/content/animals/_index.md b/content/animals/_index.md new file mode 100644 index 0000000..5b6d7be --- /dev/null +++ b/content/animals/_index.md @@ -0,0 +1,12 @@ +--- +description: This is the "Animals" album. It has two sub-albums. +keywords: [Animals, Photos, Cats, Dogs] +title: Animals +weight: 1 +menus: "main" +# list pages require at least one image to be displayed. +resources: + - src: janis-ringli-UC1pzyJFyvs-unsplash.jpg + params: + cover: true +--- diff --git a/content/animals/cats/index.md b/content/animals/cats/index.md new file mode 100644 index 0000000..e8b5620 --- /dev/null +++ b/content/animals/cats/index.md @@ -0,0 +1,18 @@ +--- +date: 2023-04-01 +title: Cats +sort_by: Name +categories: ["animals", "nature"] +resources: + - src: alexander-london-mJaD10XeD7w-unsplash.jpg + title: Brown tabby cat on white stairs by Alexander London + - src: amber-kipp-75715CVEJhI-unsplash.jpg + title: Selective focus photography of orange and white cat on brown table by Amber Kipp + - src: manja-vitolic-gKXKBY-C-Dk-unsplash.jpg + title: "Gipsy the Cat was sitting on a bookshelf one afternoon and just stared right at me, kinda saying: “Will you take a picture already?”" + params: + cover: true + hidden: true + - src: michael-sum-LEpfefQf4rU-unsplash.jpg + title: This is the cutest and loveliest cat I have ever met in my life. He is BU BU, a cat with 6 fingers, which is unusual, but in fact, smarter than any cat. He meows every time he sees me, and jumps to my bed and sits with me. +--- diff --git a/content/animals/dogs/index.md b/content/animals/dogs/index.md new file mode 100644 index 0000000..97dd0e2 --- /dev/null +++ b/content/animals/dogs/index.md @@ -0,0 +1,11 @@ +--- +date: 2023-01-12 +title: Dogs +categories: ["animals", "nature"] +resources: + - src: milli-2l0CWTpcChI-unsplash.jpg + params: + cover: true +--- + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. diff --git a/content/categories/animals/_index.md b/content/categories/animals/_index.md new file mode 100644 index 0000000..fd829eb --- /dev/null +++ b/content/categories/animals/_index.md @@ -0,0 +1,4 @@ +--- +title: Animals +description: Categories can also have custom titles and descriptions. The description of the Animals category lives in `content/categories/animals/_index.md`. +--- diff --git a/content/fashion-beauty/index.md b/content/fashion-beauty/index.md new file mode 100644 index 0000000..81d8979 --- /dev/null +++ b/content/fashion-beauty/index.md @@ -0,0 +1,13 @@ +--- +description: Fashion and Beauty are a powerful form of self-expression. This category documents style through inspiring shots of street fashion, skincare products, avant-garde editorial photographs, and more. +menus: "main" +title: Fashion & Beauty +weight: 2 +categories: ["beauty", "fashion"] +params: + theme: light +resources: + - src: mina-rad-V94CguEmeos-unsplash.jpg + params: + cover: true +--- diff --git a/content/featured-album/index.md b/content/featured-album/index.md new file mode 100644 index 0000000..b144962 --- /dev/null +++ b/content/featured-album/index.md @@ -0,0 +1,12 @@ +--- +date: 2023-01-12 +title: Featured Album +params: + featured: true + private: true # do not show in list, only as feature +description: This is a featured album. It is private, so it is only shown on the homepage. +resources: + - src: jeremy-bishop-pjszS6Q2g_Y-unsplash.jpg + params: + cover: true +--- diff --git a/content/imprint.md b/content/imprint.md new file mode 100644 index 0000000..f3660fc --- /dev/null +++ b/content/imprint.md @@ -0,0 +1,10 @@ +--- +title: Imprint +rss_ignore: true +layout: prose +menu: + footer: + weight: 1 +--- + +(Put your imprint here) diff --git a/content/nature/index.md b/content/nature/index.md new file mode 100644 index 0000000..8bb0250 --- /dev/null +++ b/content/nature/index.md @@ -0,0 +1,16 @@ +--- +description: Through photography, the beauty of Mother Nature can be frozen in time. This category celebrates the magic of our planet and beyond — from the immensity of the great outdoors, to miraculous moments in your own backyard. +menus: "main" +title: Nature +categories: ["nature"] +weight: 3 +params: + featured_image: azzedine-rouichi-ZS_XuDZmxpM-unsplash.jpg + theme: dark + sort_order: desc + sort_by: Name # Exif.Date +resources: + - src: azzedine-rouichi-ZS_XuDZmxpM-unsplash.jpg + params: + cover: true +--- diff --git a/content/private/index.md b/content/private/index.md new file mode 100644 index 0000000..000099c --- /dev/null +++ b/content/private/index.md @@ -0,0 +1,6 @@ +--- +description: A private gallery that is only available by direct link. +title: Private +params: + private: true # This gallery does not show in lists, RSS, sitemaps, etc. On list pages, use cascade to hide descendants. +--- diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8d3cd80 --- /dev/null +++ b/go.mod @@ -0,0 +1,7 @@ +module github.com/nicokaiser/hugo-gallery-starter + +go 1.20 + +require github.com/nicokaiser/hugo-theme-gallery/v4 v4.0.0 // indirect + +replace github.com/nicokaiser/hugo-theme-gallery/v4 => ../ diff --git a/layouts/partials/head-custom.html b/layouts/partials/head-custom.html new file mode 100644 index 0000000..64dc0f4 --- /dev/null +++ b/layouts/partials/head-custom.html @@ -0,0 +1 @@ + diff --git a/package.json b/package.json new file mode 100644 index 0000000..694ae5c --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "private": "true", + "scripts": { + "build": "hugo --gc --minify", + "dev": "hugo server" + } +} diff --git a/pull-images.sh b/pull-images.sh new file mode 100755 index 0000000..c3b5452 --- /dev/null +++ b/pull-images.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Home +wget --no-clobber --content-disposition --directory-prefix=content "https://unsplash.com/photos/wRuhOOaG-Z4/download?&force=true&w=1920" + +# Animals +wget --no-clobber --content-disposition --directory-prefix=content/animals "https://unsplash.com/photos/UC1pzyJFyvs/download?&force=true&w=1920" + +# Animals/Cats +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/gKXKBY-C-Dk/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/75715CVEJhI/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/mJaD10XeD7w/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/CEx86maLUSc/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/yMSecCHsIBc/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/rW-I87aPY5Y/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/p6yH8VmGqxo/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/LEpfefQf4rU/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/cats "https://unsplash.com/photos/nKC772R_qog/download?&force=true&w=1920" + +exiftool -ImageDescription="Brown tabby cat on white stairs by Alexander London" content/animals/cats/alexander-london-mJaD10XeD7w-unsplash.jpg +exiftool -ImageDescription="selective focus photography of orange and white cat on brown table by Amber Kipp" content/animals/cats/amber-kipp-75715CVEJhI-unsplash.jpg + +# Animals/Dogs +wget --no-clobber --content-disposition --directory-prefix=content/animals/dogs "https://unsplash.com/photos/Sg3XwuEpybU/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/dogs "https://unsplash.com/photos/Mv9hjnEUHR4/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/dogs "https://unsplash.com/photos/2l0CWTpcChI/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/animals/dogs "https://unsplash.com/photos/WX4i1Jq_o0Y/download?&force=true&w=1920" + +# Fashion & Beauty +wget --no-clobber --content-disposition --directory-prefix=content/fashion-beauty "https://unsplash.com/photos/FkxXePJJH5g/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/fashion-beauty "https://unsplash.com/photos/63obHScZWZw/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/fashion-beauty "https://unsplash.com/photos/7gqnlnCTvlg/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/fashion-beauty "https://unsplash.com/photos/V94CguEmeos/download?&force=true&w=1920" + +# Nature +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/ZS_XuDZmxpM/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/U7BG3FOT5r8/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/TUzsO59UFpo/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/P45gR9kH0SM/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/k_PbdrEs79g/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/4f8u5mFGKjw/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/f_C_lFxqThI/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/x7CyIC2jUaE/download?&force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/nature "https://unsplash.com/photos/RuaRTaKi-D4/download?force=true&w=1920" + +# Private +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/gRknIewfaBs/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/QQ0naV2n-mg/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/_lQgFjsTgEs/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/7pYqHNp37Pg/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/6dH1__uRYtg/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/private "https://unsplash.com/photos/t2WImwH1Fa0/download?force=true&w=1920" + +# Featured +wget --no-clobber --content-disposition --directory-prefix=content/featured-album "https://unsplash.com/photos/fcwZsjyqp0s/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/featured-album "https://unsplash.com/photos/IFlBNNOLHUo/download?force=true&w=1920" +wget --no-clobber --content-disposition --directory-prefix=content/featured-album "https://unsplash.com/photos/pjszS6Q2g_Y/download?force=true&w=1920"