hugo-saasify-theme/layouts/_default/baseof.html

101 lines
3.9 KiB
HTML
Raw Normal View History

2024-11-17 16:31:17 +11:00
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en" }}" class="h-full">
2024-11-17 16:31:17 +11:00
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-11-30 22:31:23 +11:00
<!-- Google Analytics -->
{{ partial "google-analytics" . }}
<!-- Title -->
2024-11-17 16:31:17 +11:00
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
<!-- Meta Tags -->
2024-11-17 16:31:17 +11:00
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
<meta name="author" content="{{ .Site.Params.author | default .Site.Title }}">
<meta name="robots" content="{{ with .Params.robots }}{{ . }}{{ else }}index, follow{{ end }}">
<!-- Open Graph -->
<meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{ with .Params.image }}
<meta property="og:image" content="{{ . | absURL }}">
{{ else }}
{{ with .Site.Params.image }}
<meta property="og:image" content="{{ . | absURL }}">
{{ end }}
{{ end }}
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}">
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}">
{{ end }}
{{ with .Params.image }}
<meta name="twitter:image" content="{{ . | absURL }}">
{{ else }}
{{ with .Site.Params.image }}
<meta name="twitter:image" content="{{ . | absURL }}">
{{ end }}
{{ end }}
2024-11-17 16:31:17 +11:00
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="{{ "images/favicon.ico" | relURL }}">
<!-- Canonical URL -->
<link rel="canonical" href="{{ .Permalink }}">
2024-11-17 16:31:17 +11:00
<!-- 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@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap" rel="stylesheet">
<!-- Main CSS -->
2024-11-17 22:49:12 +11:00
{{ $css := resources.Get "css/main.css" }}
{{ $css = $css | css.PostCSS }}
2024-11-17 22:49:12 +11:00
{{ if hugo.IsProduction }}
{{ $css = $css | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
<!-- Additional Meta Tags from Front Matter -->
{{ with .Params.customMeta }}
{{ range . }}
<meta {{ range $key, $value := . }} {{ $key }}="{{ $value }}"{{ end }}>
{{ end }}
{{ end }}
2024-11-17 16:31:17 +11:00
</head>
<body class="min-h-screen flex flex-col">
2024-11-17 16:31:17 +11:00
<!-- Header -->
<div class="fixed top-0 left-0 right-0 z-50">
{{ partial "header" . }}
</div>
2024-11-17 16:31:17 +11:00
<!-- Main Content -->
<div class="pt-20">
2024-11-17 16:31:17 +11:00
{{ block "main" . }}{{ end }}
</div>
2024-11-17 16:31:17 +11:00
<!-- Footer -->
{{ partial "footer" . }}
2024-11-17 16:31:17 +11:00
<!-- Mobile Menu Script -->
<script>
const mobileMenuButton = document.getElementById('mobile-menu-button');
if (mobileMenuButton) {
mobileMenuButton.addEventListener('click', function() {
const mobileMenu = document.getElementById('mobile-menu');
if (mobileMenu) {
mobileMenu.classList.toggle('hidden');
}
});
}
2024-11-17 16:31:17 +11:00
</script>
</body>
</html>