Initial commit: site code, layouts, content (images added separately)
Fixes duplicate placeholder cover image on the 3 newest blog posts, broken aspect-ratio classes on the albums listing page, and a non-responsive fixed sidebar on the chat page.
This commit is contained in:
207
layouts/_default/baseof.html
Normal file
207
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; connect-src *; img-src * data:; frame-ancestors 'self';">
|
||||
<meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin">
|
||||
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
||||
<meta http-equiv="Permissions-Policy" content="camera=(), microphone=(), geolocation=()">
|
||||
|
||||
<!-- Primary Meta Tags -->
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}">
|
||||
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary | truncate 160 }}{{ else }}{{ .Site.Params.description | default "Sterile hydroponics expert helping growers achieve award-winning results. 20 years of experience." }}{{ end }}">
|
||||
<meta name="keywords" content="{{ if .Params.keywords }}{{ delimit .Params.keywords ", " }}{{ else }}sterile hydroponics, hydroponic growing, cannabis cultivation, hydroponic consulting, sterile growing, hydroponic systems{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Params.author | default "Dr. Jones" }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary | truncate 160 }}{{ else }}{{ .Site.Params.description | default "Sterile hydroponics expert helping growers achieve award-winning results." }}{{ end }}">
|
||||
{{ if .Params.image }}
|
||||
<meta property="og:image" content="{{ .Params.image | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ "/images/IMG_1767.jpeg" | absURL }}">
|
||||
{{ end }}
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:url" content="{{ .Permalink }}">
|
||||
<meta property="twitter:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta property="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary | truncate 160 }}{{ else }}{{ .Site.Params.description | default "Sterile hydroponics expert helping growers achieve award-winning results." }}{{ end }}">
|
||||
{{ if .Params.image }}
|
||||
<meta property="twitter:image" content="{{ .Params.image | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="twitter:image" content="{{ "/images/IMG_1767.jpeg" | absURL }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Structured Data (JSON-LD) -->
|
||||
{{ if .IsHome }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"description": "{{ .Site.Params.description | default "Sterile hydroponics expert helping growers achieve award-winning results." }}",
|
||||
"sameAs": [
|
||||
"https://www.instagram.com/drj0nes/"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{ else if .IsPage }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "{{ if eq .Section "blog" }}BlogPosting{{ else }}Article{{ end }}",
|
||||
"headline": "{{ .Title }}",
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"dateModified": "{{ if .Lastmod }}{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}{{ else }}{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}{{ end }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.author | default "Dr. Jones" }}"
|
||||
},
|
||||
"description": "{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary | truncate 160 }}{{ end }}"
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ $styles := resources.Get "css/main.css" | css.PostCSS }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}">
|
||||
|
||||
<!-- Alpine.js -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
|
||||
<!-- Membership System -->
|
||||
<script src="/js/membership.js"></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body class="flex flex-col min-h-screen font-sans" x-data="{ mobileMenuOpen: false }">
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="sticky top-0 z-50 bg-gray-900/90 backdrop-blur-md border-b border-gray-800 shadow-sm">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between h-16">
|
||||
<div class="flex">
|
||||
<a href="/" class="flex-shrink-0 flex items-center gap-2">
|
||||
<div class="w-8 h-8 bg-primary rounded-lg flex items-center justify-center text-white font-bold text-xl">P</div>
|
||||
<span class="font-bold text-xl tracking-tight text-gray-100">Pure<span class="text-primary">Hydro</span></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Menu -->
|
||||
<div class="hidden md:flex md:items-center md:space-x-8">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}" class="text-gray-300 hover:text-primary px-3 py-2 rounded-md text-sm font-medium transition-colors {{ if or (eq $.RelPermalink .URL) (eq $.RelPermalink (printf "%s/" .URL)) }}text-primary font-semibold{{ end }}">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
<!-- Membership Login/Logout -->
|
||||
<div class="membership-login" style="display: none;">
|
||||
<a href="/membership/" class="text-gray-300 hover:text-primary px-3 py-2 rounded-md text-sm font-medium transition-colors">
|
||||
Login
|
||||
</a>
|
||||
</div>
|
||||
<div class="membership-logout" style="display: none;">
|
||||
<span class="text-gray-300 px-3 py-2 text-sm">
|
||||
<span class="user-name"></span>
|
||||
</span>
|
||||
<button onclick="window.MembershipAPI.logout()" class="text-gray-300 hover:text-primary px-3 py-2 rounded-md text-sm font-medium transition-colors">
|
||||
Logout
|
||||
</button>
|
||||
</div>
|
||||
<a href="/services/" class="bg-primary text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-emerald-700 transition-colors shadow-sm hover:shadow-md">
|
||||
Work With Me
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Menu Button -->
|
||||
<div class="flex items-center md:hidden">
|
||||
<button @click="mobileMenuOpen = !mobileMenuOpen" type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-300 hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary">
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Menu -->
|
||||
<div x-show="mobileMenuOpen"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="opacity-0 -translate-y-2"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in duration-150"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 -translate-y-2"
|
||||
class="md:hidden bg-gray-900 border-b border-gray-800 shadow-lg absolute w-full"
|
||||
style="display: none;">
|
||||
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}" class="text-gray-300 hover:text-primary hover:bg-gray-800 block px-3 py-2 rounded-md text-base font-medium">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
<!-- Mobile Membership Login/Logout -->
|
||||
<div class="membership-login" style="display: none;">
|
||||
<a href="/membership/" class="text-gray-300 hover:text-primary hover:bg-gray-800 block px-3 py-2 rounded-md text-base font-medium">
|
||||
Login
|
||||
</a>
|
||||
</div>
|
||||
<div class="membership-logout" style="display: none;">
|
||||
<span class="text-gray-300 block px-3 py-2 text-base">
|
||||
<span class="user-name"></span>
|
||||
</span>
|
||||
<button onclick="window.MembershipAPI.logout()" class="text-gray-300 hover:text-primary hover:bg-gray-800 block px-3 py-2 rounded-md text-base font-medium w-full text-left">
|
||||
Logout
|
||||
</button>
|
||||
</div>
|
||||
<a href="/services/" class="text-white bg-primary block px-3 py-2 rounded-md text-base font-medium mt-4 text-center">
|
||||
Work With Me
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="flex-grow">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="bg-gray-900 border-t border-gray-800 mt-12">
|
||||
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center flex-col md:flex-row gap-6">
|
||||
<div class="text-center md:text-left">
|
||||
<span class="font-bold text-xl tracking-tight text-gray-100">Pure<span class="text-primary">Hydro</span></span>
|
||||
<p class="mt-2 text-sm text-gray-400">Cultivating clean, sterile, and abundant gardens.</p>
|
||||
</div>
|
||||
<div class="flex items-center flex-wrap justify-center gap-4">
|
||||
<a href="https://www.buymeacoffee.com/r26xrthzttg" target="_blank" rel="noopener noreferrer" class="inline-flex items-center px-4 py-2 bg-[#FFDD00] hover:bg-[#FFCC00] text-gray-900 rounded-lg font-semibold transition-colors shadow-sm hover:shadow-md">
|
||||
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M18.5 3H6c-1.1 0-2 .9-2 2v5.71c0 3.83 2.95 7.18 6.78 7.29 3.96.12 7.22-3.06 7.22-7v-1h.5c1.38 0 2.5-1.12 2.5-2.5S19.88 3 18.5 3zM16 5v3H6V5h10zm2.5 5H18V5h.5c.28 0 .5.22.5.5s-.22.5-.5.5zM4 19h16v2H4v-2z"/>
|
||||
</svg>
|
||||
Buy Me a Coffee
|
||||
</a>
|
||||
<a href="https://www.instagram.com/drj0nes/" target="_blank" rel="noopener noreferrer" class="text-gray-400 hover:text-gray-300">
|
||||
Instagram
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-8 border-t border-gray-800 pt-8 text-center text-sm text-gray-500">
|
||||
© {{ now.Year }} Pure Hydroponics. All rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user