Initial Hugo gallery site with custom landing page
- Hugo site with nicokaiser/hugo-theme-gallery (git submodule) - Full-viewport hero with parallax scrolling (bg at 70%, text at 85% speed) - Entrance animations on hero title and subtitle - Bouncing scroll arrow that fades out on scroll - Header suppressed on homepage, shown on all other pages - Intro text section between hero and album grid - Cats placeholder album with 8 images - .gitignore excludes public/, resources/, .hugo_build.lock, .idea/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{{ define "main" }}
|
||||
{{ $heroImage := .Resources.GetMatch "hero*" }}
|
||||
{{ if $heroImage }}
|
||||
{{ $img := $heroImage.Filter (slice images.AutoOrient (images.Process "fit 1920x1080")) }}
|
||||
<section class="hero">
|
||||
<div class="hero-bg" style="background-image: url({{ $img.RelPermalink }})"></div>
|
||||
<div class="hero-fg">
|
||||
<div class="hero-content">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Params.tagline }}<p>{{ . }}</p>{{ end }}
|
||||
</div>
|
||||
<div class="hero-scroll" aria-hidden="true">
|
||||
<span class="hero-scroll-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 9l6 6 6-6"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ else }}
|
||||
{{ partial "title.html" . }}
|
||||
{{ end }}
|
||||
{{ with .Content }}
|
||||
<section class="home-intro">
|
||||
<div class="prose">{{ . }}</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ partial "categories.html" }}
|
||||
{{ partial "featured.html" . }}
|
||||
<section class="galleries">
|
||||
{{ range where .Pages "Params.private" "ne" true }}
|
||||
{{ partial "album-card.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{ if not .IsHome }}
|
||||
<header>
|
||||
{{ with .Parent }}
|
||||
<a class="btn btn-square" href="{{ .RelPermalink | default .Site.Home.RelPermalink }}" title="{{ .Title }}">
|
||||
<svg width="24" height="24" data-slot="icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path clip-rule="evenodd" fill-rule="evenodd" d="M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
{{ else }}
|
||||
<a class="btn" href="{{ .Site.Home.RelPermalink }}">
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if site.Menus.main }}
|
||||
<ul>
|
||||
<li>
|
||||
<button class="btn btn-square" id="menu-toggle" aria-expanded="false" type="button" title="{{ T "menu" }}">
|
||||
<svg class="icon-menu" width="24" height="24" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path clip-rule="evenodd" fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z"></path>
|
||||
</svg>
|
||||
<svg class="icon-close hidden" width="24" height="24" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path clip-rule="evenodd" fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ partial "menu.html" . }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user