did all this shit without even commiting once ffs
This commit is contained in:
commit
26e489f0bf
12 changed files with 2978 additions and 0 deletions
180
themes/one-pager/layouts/index.html
Normal file
180
themes/one-pager/layouts/index.html
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- SEO -->
|
||||
{{ partial "seo.html" . }}
|
||||
|
||||
|
||||
<meta name="robots" content="index" />
|
||||
<meta name="geo.region" content="CH-GE" />
|
||||
<meta name="geo.placename" content="Geneva" />
|
||||
<meta name="geo.position" content="46.203918;6.133011" />
|
||||
<meta name="ICBM" content="46.203918, 6.133011" />
|
||||
<link rel="canonical" href="https://setto.basspistol.com" />
|
||||
<link rel="alternate" hreflang="x-default" href="https://setto.basspistol.com" />
|
||||
{{ $style := resources.Get "css/style.css" | resources.Minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<main>
|
||||
<!-- BLOG SECTION - Longform -->
|
||||
<section id="blog" class="section">
|
||||
<h2>Now Log</h2>
|
||||
<div class="blog-grid">
|
||||
{{ $blogPosts := slice }}
|
||||
{{ range $path, $entries := hugo.Data.longform }}
|
||||
{{ range $entries }}
|
||||
{{ $blogPosts = $blogPosts | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sortedPosts := sort $blogPosts "created_at" "desc" }}
|
||||
{{ range first 2 $sortedPosts }}
|
||||
{{ $title := "" }}
|
||||
{{ $summary := "" }}
|
||||
{{ $image := "" }}
|
||||
{{ $tags := slice }}
|
||||
{{ $d := "" }}
|
||||
{{ $createdAt := int .created_at }}
|
||||
|
||||
{{ range .tags }}
|
||||
{{ if eq (index . 0) "title" }}
|
||||
{{ $title = index . 1 }}
|
||||
{{ else if eq (index . 0) "summary" }}
|
||||
{{ $summary = index . 1 }}
|
||||
{{ else if eq (index . 0) "image" }}
|
||||
{{ $image = index . 1 }}
|
||||
{{ else if eq (index . 0) "t" }}
|
||||
{{ $tags = $tags | append (index . 1) }}
|
||||
{{ else if eq (index . 0) "d" }}
|
||||
{{ $d = index . 1 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="blog-card">
|
||||
{{ if $image }}
|
||||
<img src="{{ $image }}" alt="{{ $title }}" class="blog-header-image" loading="lazy">
|
||||
{{ end }}
|
||||
<div class="blog-content">
|
||||
<h3>{{ $title }}</h3>
|
||||
<p class="blog-meta">
|
||||
{{ dateFormat "January 2, 2006" (time (int .created_at)) }}
|
||||
</p>
|
||||
{{ if $summary }}
|
||||
<p class="blog-description">{{ $summary }}</p>
|
||||
{{ end }}
|
||||
<div class="blog-tags">
|
||||
{{ range $tags }}
|
||||
<span class="tag"><span>{{ . }}</span></span>
|
||||
{{ end }}
|
||||
</div>
|
||||
<button class="read-more-toggle">Read More</button>
|
||||
<div class="blog-full-content" style="display: none;">
|
||||
{{ .content | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- MUSIC SECTION -->
|
||||
<section id="music" class="section">
|
||||
<h2>Music Traxxx</h2>
|
||||
<div style="text-align: right; margin-bottom: 1rem;">
|
||||
<button onclick="refreshMusic()" class="refresh-button">
|
||||
<span>🎲 Randomize</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="music-grid" id="musicGrid">
|
||||
{{ $allMusic := slice }}
|
||||
{{ range $path, $entries := hugo.Data.music }}
|
||||
{{ range $entries }}
|
||||
{{ $allMusic = $allMusic | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $musicData := jsonify $allMusic }}
|
||||
<script>
|
||||
window.allMusicData = {{ $musicData | safeJS }};
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- PICTURES SECTION -->
|
||||
<section id="pictures" class="section">
|
||||
<h2>Pix & Doodles</h2>
|
||||
<div style="text-align: right; margin-bottom: 1rem;">
|
||||
<button onclick="refreshPictures()" class="refresh-button">
|
||||
<span>🎲 Randomize</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="photo-grid" id="photoGrid">
|
||||
{{ $allPictures := slice }}
|
||||
{{ range $path, $entries := hugo.Data.pictures }}
|
||||
{{ range $entries }}
|
||||
{{ $allPictures = $allPictures | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Store all pictures data in a JSON array -->
|
||||
{{ $picturesData := jsonify $allPictures }}
|
||||
<script>
|
||||
window.allPicturesData = {{ $picturesData | safeJS }};
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- VIDEO SECTION -->
|
||||
<section id="videos" class="section">
|
||||
<h2>Vidz</h2>
|
||||
<div style="text-align: right; margin-bottom: 1rem;">
|
||||
<button onclick="refreshVideos()" class="refresh-button">
|
||||
<span>🎲 Randomize</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="video-grid" id="videoGrid">
|
||||
{{ $allVideos := slice }}
|
||||
{{ range $path, $entries := hugo.Data.videos }}
|
||||
{{ range $entries }}
|
||||
{{ $allVideos = $allVideos | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Store all videos data in a JSON array -->
|
||||
{{ $videosData := jsonify $allVideos }}
|
||||
<script>
|
||||
window.allVideosData = {{ $videosData | safeJS }};
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
<!-- Custom Lightbox -->
|
||||
<div class="custom-lightbox" id="customLightbox">
|
||||
<span class="custom-lightbox-close" id="lightboxClose">✕</span>
|
||||
<button class="custom-lightbox-prev" id="lightboxPrev">‹</button>
|
||||
<button class="custom-lightbox-next" id="lightboxNext">›</button>
|
||||
<div class="custom-lightbox-content">
|
||||
<img id="lightboxImage" src="" alt="">
|
||||
<div class="custom-lightbox-caption">
|
||||
<span id="lightboxCaption"></span>
|
||||
<span class="lightbox-meta" id="lightboxMeta"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-lightbox-counter" id="lightboxCounter">1 / 1</div>
|
||||
</div>
|
||||
|
||||
{{ $js := resources.Get "js/scripts.js" | resources.Minify | fingerprint }}
|
||||
<script src="{{ $js.RelPermalink }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
55
themes/one-pager/layouts/partials/footer.html
Normal file
55
themes/one-pager/layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<footer class="site-footer">
|
||||
<!-- Glow effect -->
|
||||
<div class="footer-glow"></div>
|
||||
|
||||
<div class="footer-content">
|
||||
<!-- Left Column -->
|
||||
<div class="footer-left">
|
||||
<div class="footer-brand">
|
||||
<span class="copyleft">🄯</span> Basspistol
|
||||
<span class="year">{{ now.Format "2006" }}</span>
|
||||
</div>
|
||||
<div class="footer-tagline">
|
||||
<span>✦</span> No cookies, no trackers <span>✦</span>
|
||||
</div>
|
||||
<div class="footer-statement">
|
||||
{{ .Site.Params.description | default "A cyberpunk nostr experience" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Column -->
|
||||
<div class="footer-right">
|
||||
<div class="footer-meta-item">
|
||||
<span class="icon">🕒</span>
|
||||
<span class="label">Updated</span>
|
||||
<span class="value">{{ now.Format "Jan 2, 2006 · 15:04" }}</span>
|
||||
</div>
|
||||
<div class="footer-meta-item">
|
||||
<span class="icon">⚡</span>
|
||||
<span class="label">Powered by</span>
|
||||
<span class="value">
|
||||
<a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>
|
||||
<span style="color:var(--accent-grey);opacity:0.3;margin:0 0.3rem;">&</span>
|
||||
<a href="https://nostr.org/" target="_blank" rel="noopener noreferrer">Nostr</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="footer-meta-item">
|
||||
<span class="icon">📡</span>
|
||||
<span class="label">Relay</span>
|
||||
<span class="value" style="font-size:0.65rem;opacity:0.7;">wss://basspistol.org</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Bar -->
|
||||
<div class="footer-bottom">
|
||||
<div class="footer-bottom-text">
|
||||
<span>✦</span> Built with <span>♥</span> for the nostr community <span>✦</span>
|
||||
</div>
|
||||
<div class="footer-social">
|
||||
<a href="https://nostr.basspistol.org/users/nprofile1qqsr7ydtkt3rtk3dfhd96m0t9ufrzu68df695099dz26r58kx2jz7sqpz3mhxue69uhkyctnwdcxjum5dakzummjvuy2xely" target="_blank" rel="noopener noreferrer">Nostr</a>
|
||||
<a href="Code" target="_blank" rel="noopener noreferrer">GitHub</a>
|
||||
<a href="https://basspistol.com" target="_blank" rel="noopener noreferrer">Bpist</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
85
themes/one-pager/layouts/partials/header.html
Normal file
85
themes/one-pager/layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{{ $displayName := "" }}
|
||||
{{ $name := "" }}
|
||||
{{ $picture := "" }}
|
||||
{{ $banner := "" }}
|
||||
{{ $about := "" }}
|
||||
{{ $website := "" }}
|
||||
{{ $nip05 := "" }}
|
||||
{{ $lud16 := "" }}
|
||||
|
||||
{{ range hugo.Data.profile }}
|
||||
{{ range . }}
|
||||
{{ range .tags }}
|
||||
{{ if eq (index . 0) "display_name" }}
|
||||
{{ $displayName = index . 1 }}
|
||||
{{ else if eq (index . 0) "name" }}
|
||||
{{ $name = index . 1 }}
|
||||
{{ else if eq (index . 0) "picture" }}
|
||||
{{ $picture = index . 1 }}
|
||||
{{ else if eq (index . 0) "banner" }}
|
||||
{{ $banner = index . 1 }}
|
||||
{{ else if eq (index . 0) "about" }}
|
||||
{{ $about = index . 1 }}
|
||||
{{ else if eq (index . 0) "website" }}
|
||||
{{ $website = index . 1 }}
|
||||
{{ else if eq (index . 0) "nip05" }}
|
||||
{{ $nip05 = index . 1 }}
|
||||
{{ else if eq (index . 0) "lud16" }}
|
||||
{{ $lud16 = index . 1 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- If display_name is empty, use name -->
|
||||
{{ if not $displayName }}
|
||||
{{ $displayName = $name }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Sticky Navigation -->
|
||||
<nav class="sticky-nav" id="stickyNav" role="navigation">
|
||||
<div class="nav-container">
|
||||
<a href="#" class="nav-brand">
|
||||
<span>✦</span> {{ if $displayName }}{{ $displayName | truncate 12 }}{{ else }}{{ .Site.Title }}{{ end }}
|
||||
</a>
|
||||
<div class="nav-links">
|
||||
<a href="#blog"><span>📝 Now</span></a>
|
||||
<a href="#music"><span>🎵 Music</span></a>
|
||||
<a href="#pictures"><span>🖼️ Pix</span></a>
|
||||
<a href="#videos"><span>🎬 Vidz</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<!-- Main Header -->
|
||||
<header class="main-header" style="position:relative;overflow:hidden;">
|
||||
<!-- Background image -->
|
||||
{{ if $banner }}
|
||||
<div style="position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background-image:url('{{ $banner }}');background-size:cover;background-position:center;"></div>
|
||||
<!-- Dark overlay for readability -->
|
||||
<div style="position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background:linear-gradient(to bottom,rgba(0,0,0,0.4) 0%,rgba(0,0,0,0.2) 50%,rgba(0,0,0,0.4) 100%);pointer-events:none;"></div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
<!-- Decorative '>' -->
|
||||
<div></div>
|
||||
|
||||
<div class="header-content">
|
||||
<div class="header-profile">
|
||||
{{ if $picture }}
|
||||
<img src="{{ $picture }}" alt="{{ $displayName }}" class="profile-picture" loading="lazy">
|
||||
{{ end }}
|
||||
<div class="header-text">
|
||||
|
||||
{{ if $about }}
|
||||
<div class="profile-about tagline"><h1>{{ if $displayName }}{{ $displayName }}{{ else }}{{ .Site.Title }}{{ end }}</h1>{{ $about | markdownify }}</div>
|
||||
{{ else }}
|
||||
<div class="profile-about tagline">{{ .Site.Params.description }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
148
themes/one-pager/layouts/partials/seo.html
Normal file
148
themes/one-pager/layouts/partials/seo.html
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
|
||||
|
||||
|
||||
{{/* Get profile data */}}
|
||||
{{ $displayName := "" }}
|
||||
{{ $name := "" }}
|
||||
{{ $picture := "" }}
|
||||
{{ $about := "" }}
|
||||
|
||||
{{ range hugo.Data.profile }}
|
||||
{{ range . }}
|
||||
{{ range .tags }}
|
||||
{{ if eq (index . 0) "display_name" }}
|
||||
{{ $displayName = index . 1 }}
|
||||
{{ else if eq (index . 0) "name" }}
|
||||
{{ $name = index . 1 }}
|
||||
{{ else if eq (index . 0) "picture" }}
|
||||
{{ $picture = index . 1 }}
|
||||
{{ else if eq (index . 0) "about" }}
|
||||
{{ $about = index . 1 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Fallback if display_name is empty */}}
|
||||
{{ if not $displayName }}
|
||||
{{ $displayName = $name }}
|
||||
{{ end }}
|
||||
|
||||
{{/* If still empty, use site title */}}
|
||||
{{ if not $displayName }}
|
||||
{{ $displayName = .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Clean about text - remove markdown and HTML */}}
|
||||
{{ $cleanAbout := $about | plainify | htmlUnescape }}
|
||||
{{ $cleanAbout = trim $cleanAbout " \n\r\t" }}
|
||||
|
||||
{{/* Truncate to 160 chars for SEO */}}
|
||||
{{ $truncatedAbout := $cleanAbout }}
|
||||
{{ if gt (len $truncatedAbout) 160 }}
|
||||
{{ $truncatedAbout = substr $truncatedAbout 0 160 | printf "%s…" }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Hugo escaping functions */}}
|
||||
{{ $escapedTitle := $displayName | safeHTMLAttr }}
|
||||
{{ $escapedDescription := $truncatedAbout | safeHTMLAttr }}
|
||||
{{ $escapedPicture := $picture | safeURL }}
|
||||
{{ $escapedSiteTitle := .Site.Title | safeHTMLAttr }}
|
||||
|
||||
{{/* Build time in ISO 8601 format */}}
|
||||
{{ $buildTime := now.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $buildTimeRFC3339 := now.Format "2006-01-02T15:04:05Z07:00" }}
|
||||
|
||||
{{/* Hugo version */}}
|
||||
{{ $hugoVersion := hugo.Version }}
|
||||
|
||||
{{/* Base URL */}}
|
||||
{{ $baseURL := .Site.BaseURL | safeURL }}
|
||||
{{ $permalink := .Permalink | safeURL }}
|
||||
|
||||
<!-- Primary Meta Tags -->
|
||||
<title>{{ $escapedTitle }}{{ if ne $escapedTitle $escapedSiteTitle }} | {{ $escapedSiteTitle }}{{ end }}</title>
|
||||
<meta name="title" content="{{ $escapedTitle }}" />
|
||||
<meta name="description" content="{{ $escapedDescription }}" />
|
||||
<meta name="author" content="{{ $escapedTitle }}" />
|
||||
<meta name="generator" content="Hugo {{ $hugoVersion }}" />
|
||||
|
||||
<!-- Modified Date -->
|
||||
<meta name="dc.date.modified" scheme="ISO8601" content="{{ $buildTime }}" />
|
||||
<meta name="dcterms.modified" content="{{ $buildTime }}" />
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ $permalink }}" />
|
||||
<meta property="og:title" content="{{ $escapedTitle }}" />
|
||||
<meta property="og:description" content="{{ $escapedDescription }}" />
|
||||
{{ if $picture }}
|
||||
<meta property="og:image" content="{{ $escapedPicture }}" />
|
||||
{{ end }}
|
||||
<meta property="og:site_name" content="{{ $escapedTitle }}" />
|
||||
<meta property="article:published_time" content="{{ $buildTimeRFC3339 }}" />
|
||||
<meta property="article:modified_time" content="{{ $buildTimeRFC3339 }}" />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:url" content="{{ $permalink }}" />
|
||||
<meta name="twitter:title" content="{{ $escapedTitle }}" />
|
||||
<meta name="twitter:description" content="{{ $escapedDescription }}" />
|
||||
{{ if $picture }}
|
||||
<meta name="twitter:image" content="{{ $escapedPicture }}" />
|
||||
<meta name="twitter:image:alt" content="{{ $escapedTitle }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Additional SEO -->
|
||||
<link rel="canonical" href="{{ $permalink }}" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="language" content="English" />
|
||||
<meta name="revisit-after" content="7 days" />
|
||||
|
||||
<!-- Theme Color for mobile browsers -->
|
||||
<meta name="theme-color" content="#ffd700" />
|
||||
<meta name="msapplication-TileColor" content="#ffd700" />
|
||||
|
||||
<!-- Favicon fallback -->
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E⚡%3C/text%3E%3C/svg%3E" />
|
||||
|
||||
<!-- JSON-LD Structured Data -->
|
||||
<script type="application/ld+json">
|
||||
{{- $personSchema := dict
|
||||
"@context" "https://schema.org"
|
||||
"@type" "Person"
|
||||
"name" ($displayName | safeHTML)
|
||||
"description" ($cleanAbout | safeHTML)
|
||||
"url" $baseURL
|
||||
-}}
|
||||
{{- if $picture -}}
|
||||
{{- $personSchema = merge $personSchema (dict "image" ($picture | safeHTML)) -}}
|
||||
{{- end -}}
|
||||
{{- $personSchema | jsonify (dict "indent" " ") | safeJS -}}
|
||||
</script>
|
||||
|
||||
<script type="application/ld+json">
|
||||
{{- $websiteSchema := dict
|
||||
"@context" "https://schema.org"
|
||||
"@type" "WebSite"
|
||||
"name" ($displayName | safeHTML)
|
||||
"description" ($cleanAbout | safeHTML)
|
||||
"url" $baseURL
|
||||
"dateModified" $buildTimeRFC3339
|
||||
-}}
|
||||
{{- $websiteSchema | jsonify (dict "indent" " ") | safeJS -}}
|
||||
</script>
|
||||
|
||||
<script type="application/ld+json">
|
||||
{{- $breadcrumbSchema := dict
|
||||
"@context" "https://schema.org"
|
||||
"@type" "BreadcrumbList"
|
||||
"itemListElement" (slice (dict
|
||||
"@type" "ListItem"
|
||||
"position" 1
|
||||
"name" "Home"
|
||||
"item" $baseURL
|
||||
))
|
||||
-}}
|
||||
{{- $breadcrumbSchema | jsonify (dict "indent" " ") | safeJS -}}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue