|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="{{ .Site.LanguageCode | default "en" }}" class="h-full"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + |
| 7 | + <!-- Google Tag Manager --> |
| 8 | + {{ partial "google-tag-manager" . }} |
| 9 | + |
| 10 | + <!-- Google Analytics --> |
| 11 | + {{ partial "google-analytics" . }} |
| 12 | + |
| 13 | + <!-- Title --> |
| 14 | + <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title> |
| 15 | + |
| 16 | + <!-- Meta Tags --> |
| 17 | + <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> |
| 18 | + <meta name="author" content="{{ .Site.Params.author | default .Site.Title }}"> |
| 19 | + <meta name="robots" content="{{ with .Params.robots }}{{ . }}{{ else }}index, follow{{ end }}"> |
| 20 | + |
| 21 | + <!-- Open Graph --> |
| 22 | + <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}"> |
| 23 | + <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> |
| 24 | + <meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}"> |
| 25 | + <meta property="og:url" content="{{ .Permalink }}"> |
| 26 | + <meta property="og:site_name" content="{{ .Site.Title }}"> |
| 27 | + {{ with .Params.image }} |
| 28 | + <meta property="og:image" content="{{ . | absURL }}"> |
| 29 | + {{ else }} |
| 30 | + {{ with .Site.Params.image }} |
| 31 | + <meta property="og:image" content="{{ . | absURL }}"> |
| 32 | + {{ end }} |
| 33 | + {{ end }} |
| 34 | + |
| 35 | + <!-- Twitter Card --> |
| 36 | + <meta name="twitter:card" content="summary_large_image"> |
| 37 | + <meta name="twitter:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}"> |
| 38 | + <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> |
| 39 | + {{ with .Site.Params.twitter }} |
| 40 | + <meta name="twitter:site" content="@{{ . }}"> |
| 41 | + {{ end }} |
| 42 | + {{ with .Params.image }} |
| 43 | + <meta name="twitter:image" content="{{ . | absURL }}"> |
| 44 | + {{ else }} |
| 45 | + {{ with .Site.Params.image }} |
| 46 | + <meta property="twitter:image" content="{{ . | absURL }}"> |
| 47 | + {{ end }} |
| 48 | + {{ end }} |
| 49 | + |
| 50 | + <!-- Favicon --> |
| 51 | + <link rel="icon" type="image/x-icon" href="{{ "images/favicon.ico" | relURL }}"> |
| 52 | + |
| 53 | + <!-- Canonical URL --> |
| 54 | + <link rel="canonical" href="{{ .Permalink }}"> |
| 55 | + |
| 56 | + <!-- Fonts --> |
| 57 | + <link rel="preconnect" href="https://fonts.googleapis.com"> |
| 58 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 59 | + <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap" rel="stylesheet"> |
| 60 | + |
| 61 | + <!-- Main CSS --> |
| 62 | + {{ $css := resources.Get "css/main.css" }} |
| 63 | + {{ $css = $css | css.PostCSS }} |
| 64 | + {{ if hugo.IsProduction }} |
| 65 | + {{ $css = $css | minify | fingerprint | resources.PostProcess }} |
| 66 | + {{ end }} |
| 67 | + <link rel="stylesheet" href="{{ $css.RelPermalink }}"> |
| 68 | + |
| 69 | + <!-- Additional Meta Tags from Front Matter --> |
| 70 | + {{ with .Params.customMeta }} |
| 71 | + {{ range . }} |
| 72 | + <meta {{ range $key, $value := . }} {{ $key }}="{{ $value }}"{{ end }}> |
| 73 | + {{ end }} |
| 74 | + {{ end }} |
| 75 | + |
| 76 | + <!-- Custom Head Content --> |
| 77 | + {{ partial "custom-head" . }} |
| 78 | +</head> |
| 79 | +<body class="min-h-screen flex flex-col"> |
| 80 | + <!-- Google Tag Manager (noscript) --> |
| 81 | + {{ if and hugo.IsProduction .Site.Params.googleTagManager }} |
| 82 | + <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.Params.googleTagManager }}" |
| 83 | + height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> |
| 84 | + {{ end }} |
| 85 | + <!-- End Google Tag Manager (noscript) --> |
| 86 | + <!-- Header --> |
| 87 | + <div class="fixed top-0 left-0 right-0 z-50"> |
| 88 | + {{ partial "header" . }} |
| 89 | + </div> |
| 90 | + |
| 91 | + <!-- Main Content --> |
| 92 | + <!-- Removed pt-20 since body padding already accounts for banner + navbar --> |
| 93 | + <div> |
| 94 | + {{ block "main" . }}{{ end }} |
| 95 | + </div> |
| 96 | + |
| 97 | + <!-- Footer --> |
| 98 | + {{ partial "footer" . }} |
| 99 | + |
| 100 | + <!-- Language Preference Script --> |
| 101 | + {{ if hugo.IsMultilingual }} |
| 102 | + {{ if .Site.Params.visitorapi_pid }} |
| 103 | + <script> |
| 104 | + // Inject VisitorAPI project ID from Hugo config |
| 105 | + window.HUGO_VISITOR_API_PID = "{{ .Site.Params.visitorapi_pid }}"; |
| 106 | + </script> |
| 107 | + {{ end }} |
| 108 | + <script src="{{ "js/language-preference.js" | relURL }}"></script> |
| 109 | + {{ end }} |
| 110 | + |
| 111 | + <!-- Mobile Menu Script --> |
| 112 | + <script> |
| 113 | + const mobileMenuButton = document.getElementById('mobile-menu-button'); |
| 114 | + if (mobileMenuButton) { |
| 115 | + mobileMenuButton.addEventListener('click', function() { |
| 116 | + const mobileMenu = document.getElementById('mobile-menu'); |
| 117 | + if (mobileMenu) { |
| 118 | + mobileMenu.classList.toggle('hidden'); |
| 119 | + } |
| 120 | + }); |
| 121 | + } |
| 122 | + </script> |
| 123 | +</body> |
| 124 | +</html> |
0 commit comments