Skip to content

Commit 7d9521b

Browse files
committed
fix(style) remove white padding below navbar
1 parent 9478e07 commit 7d9521b

File tree

3 files changed

+129
-3
lines changed

3 files changed

+129
-3
lines changed

assets/css/main.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99

1010
body {
1111
@apply font-sans text-gray-700 antialiased;
12-
padding-top: 11rem; /* Mobile: banner + header spacing */
12+
/* Mobile: banner at top-24 (6rem) + navbar height h-20 (5rem) = 11rem total */
13+
padding-top: 11rem;
1314
}
1415

1516
@media (min-width: 768px) {
1617
body {
17-
padding-top: 9rem; /* Desktop: banner (3rem) + header (6rem) */
18+
/* Desktop: banner at top-12 (3rem) + navbar height h-20 (5rem) = 8rem total */
19+
padding-top: 8rem;
1820
}
1921
}
2022

layouts/_default/baseof.html

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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>

layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{ $dropdownConfig := $headerConfig.menu.dropdown }}
1111
<div class="mobile-menu-wrapper">
1212
<!-- Training Banner -->
13-
<div class="fixed w-full top-0 z-50 bg-gradient-to-r from-blue-600 to-blue-700 text-white py-4 px-4 flex items-center justify-center text-sm md:text-base font-medium">
13+
<div class="fixed w-full top-0 z-[60] bg-gradient-to-r from-blue-600 to-blue-700 text-white py-4 px-4 flex items-center justify-center text-sm md:text-base font-medium">
1414
3-Days OPC UA and open62541 Developer Training 3.3.26 - 5.3.26 in Karlsruhe <a href="https://www.o6-automation.com/event/3-days-opc-ua-and-open62541-developer-training-1/register" target="_blank" rel="noopener noreferrer" class="underline hover:text-blue-100 font-bold ml-2">Register now</a>
1515
</div>
1616

0 commit comments

Comments
 (0)