Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 98 additions & 7 deletions src/assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,98 @@
/* Calmer homepage styling */
/* ── Shared THectic navbar lockup ───────────────────────────────────────────
Styles the markup in layouts/_partials/navbar-title.html. Kept as plain CSS,
not Tailwind utilities: Hextra ships a precompiled bundle and never reruns
Tailwind against the site's own templates, so a `hx:` class the theme does
not already use (gap-2.5, hover:opacity-80, ...) silently compiles to
nothing. This block is standardised across the THectic repos — keep it
together with navbar-title.html. */

.brand-lockup {
display: flex;
align-items: center;
gap: 0.625rem;
min-width: 0;
}

.brand-mark,
.brand-title {
display: flex;
align-items: center;
transition: opacity 0.15s ease;
}

.brand-mark {
flex-shrink: 0;
}

.brand-mark:hover,
.brand-title:hover {
opacity: 0.75;
}

.brand-title span {
font-weight: 800;
user-select: none;
}

/* GitHub-style hover card on the monogram tile: appears on hover and on
keyboard focus, after a short delay. */
.brand-home {
position: relative;
display: inline-flex;
}

.brand-home-card {
position: absolute;
top: calc(100% + 0.5rem);
left: 0;
z-index: 30;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.75rem;
line-height: 1;
font-weight: 600;
white-space: nowrap;
color: #f6f8fa;
background: #1f2328;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
opacity: 0;
transform: translateY(-0.25rem);
pointer-events: none;
transition: opacity 0.15s ease, transform 0.15s ease;
}

.brand-home-card::before {
content: "";
position: absolute;
bottom: 100%;
left: 0.75rem;
border: 0.3125rem solid transparent;
border-bottom-color: #1f2328;
}

.brand-home:hover .brand-home-card,
.brand-home:focus-within .brand-home-card {
opacity: 1;
transform: translateY(0);
transition-delay: 0.35s;
}

.dark .brand-home-card {
color: #1f2328;
background: #f6f8fa;
}

.dark .brand-home-card::before {
border-bottom-color: #f6f8fa;
}

@media (prefers-reduced-motion: reduce) {
.brand-home-card {
transition: none;
}
}

/* ── Calmer homepage styling ────────────────────────────────────────────── */

/* Reduce hero title size */
.hx-hero-headline {
Expand Down Expand Up @@ -104,15 +198,12 @@
}


/* Language/theme controls live in the navbar — hide sidebar and footer duplicates */
/* The footer's duplicate language/theme switches are dropped in
_partials/footer.html; this only handles the sidebar's copy on mobile.
Language and theme both live in the navbar. */
.hextra-sidebar-container > [data-toggle-animation="show"] {
display: none !important;
}
.hextra-footer .hextra-language-switcher,
.hextra-footer .hextra-theme-toggle,
.hextra-footer hr {
display: none !important;
}

/* Hero badge sizing */
.hx-hero-badge {
Expand Down
8 changes: 7 additions & 1 deletion src/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ baseURL = 'https://zephyrus-linux.thectic.nl/'
title = 'Zephyrus Linux'
defaultContentLanguage = 'en'
enableRobotsTXT = true
disableKinds = ['taxonomy', 'term']
disableKinds = ['taxonomy', 'term', 'RSS']
enableGitInfo = true

# Hugo otherwise injects a tab-indented <meta name="generator"> into <head>,
# which trips HTML linters and tells every visitor the exact Hugo version.
disableHugoGeneratorInject = true

[languages]
[languages.en]
label = 'English'
weight = 1
title = 'Zephyrus Linux'
locale = 'en-US'
[languages.nl]
label = 'Nederlands'
weight = 2
title = 'Zephyrus Linux'
locale = 'nl-NL'

[menu]
[[menu.main]]
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/_partials/custom/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="hx:flex hx:w-full hx:items-center hx:justify-center hx:gap-1 hx:py-4 hx:text-sm hx:text-gray-500 hx:dark:text-gray-400">
{{ if eq site.Language.Lang "nl" }}Door{{ else }}By{{ end }}
<a href="https://stentijhuis.nl" target="_blank" rel="noopener noreferrer" class="hx:font-semibold hx:text-gray-600 hx:hover:text-gray-900 hx:dark:text-gray-300 hx:dark:hover:text-white">Sten Tijhuis</a>
&copy; {{ now.Year }}
<a href="https://thectic.nl" target="_blank" rel="noopener noreferrer" class="hx:font-semibold hx:text-gray-600 hx:hover:text-gray-900 hx:dark:text-gray-300 hx:dark:hover:text-white">THectic</a>
</div>
35 changes: 35 additions & 0 deletions src/layouts/_partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- /* Overrides the Hextra partial to drop the footer's language/theme
switches. Both already live in the navbar (GitHub, Language, Theme menu
items), and on pages without a sidebar Hextra otherwise repeats the
language switch down here. Everything else matches the theme version. */ -}}
{{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}}

{{- $copyright := (T "copyright") | default "© 2024 Hextra." -}}
{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}}

<footer class="hextra-footer hx:bg-gray-100 hx:pb-[env(safe-area-inset-bottom)] hx:dark:bg-neutral-900 hx:print:bg-transparent">
<div class="hextra-custom-footer hextra-max-footer-width hx:mx-auto hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-right),1.5rem)] hx:text-gray-600 hx:dark:text-gray-400">
{{- partial "custom/footer.html" (dict "context" . "switchesVisible" false "copyrightVisible" $copyrightSectionVisible) -}}
</div>
{{- if $copyrightSectionVisible -}}
<div
class="hextra-max-footer-width hx:mx-auto hx:flex hx:justify-center hx:py-12 hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-right),1.5rem)] hx:text-gray-600 hx:dark:text-gray-400 hx:md:justify-start"
>
<div class="hx:flex hx:w-full hx:flex-col hx:items-center hx:sm:items-start">
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="hx:font-semibold">{{ template "theme-credit" $poweredBy }}</div>{{- end -}}
{{- if .Site.Params.footer.displayCopyright }}<div class="hx:mt-6 hx:text-xs">{{ $copyright | markdownify }}</div>{{- end -}}
</div>
</div>
{{- end -}}
</footer>

{{- define "theme-credit" -}}
<a class="hx:flex hx:text-sm hx:items-center hx:gap-1 hx:text-current" target="_blank" rel="noopener noreferrer" title="Hextra GitHub Homepage" href="https://github.com/imfing/hextra">
<span>
{{- . | markdownify -}}
{{- if strings.Contains . "Hextra" -}}
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx:inline-block hx:ltr:ml-1 hx:rtl:mr-1 hx:align-[-2.5px]"`) -}}
{{- end -}}
</span>
</a>
{{- end -}}
38 changes: 38 additions & 0 deletions src/layouts/_partials/navbar-title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- /* Overrides the Hextra partial. The navbar's left edge is a logo lockup:
the THectic monogram tile links to the umbrella site (thectic.nl, which
fronts every project subdomain) and shows a GitHub-style hover card
naming that destination; the wordmark links to this site's own home.

Standardised across the THectic project repos: keep this file byte-for-
byte identical everywhere, and onboard a new repo by copying it in
alongside the .brand-* block in assets/css/custom.css.

The monogram is inlined twice, one variant per theme, so the tile stays
readable on both the light and the near-black navbar. Its plate colour
and glyph path match THectic.nl's own brand mark.

Layout lives in custom.css rather than Tailwind utility classes: Hextra
ships a precompiled bundle and never reruns Tailwind against the site's
own templates, so a `hx:` class not already used by the theme itself
(gap-2.5, hover:opacity-80, ...) silently compiles to nothing. */ -}}
{{- $displayTitle := .Site.Params.navbar.displayTitle | default true -}}
<div class="brand-lockup hx:ltr:mr-auto hx:rtl:ml-auto">
<span class="brand-home">
<a class="brand-mark" href="https://thectic.nl" aria-label="THectic — back to the main site">
<svg class="hx:block hx:dark:hidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="32" height="32" role="img" aria-label="THectic">
<rect width="64" height="64" rx="13" fill="#09111d" />
<path d="M12 18h24v4h-10v23h-4V22H12z M48 18h4v27h-4V34H35v11h-4V30h17z" fill="#ffffff" />
</svg>
<svg class="hx:hidden hx:dark:block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="32" height="32" role="img" aria-label="THectic">
<rect width="64" height="64" rx="13" fill="#f5f5f5" />
<path d="M12 18h24v4h-10v23h-4V22H12z M48 18h4v27h-4V34H35v11h-4V30h17z" fill="#09111d" />
</svg>
</a>
<span class="brand-home-card" aria-hidden="true">THectic</span>
</span>
{{- if $displayTitle }}
<a class="brand-title" href="{{ .Site.Home.RelPermalink }}">
<span>{{- .Site.Title -}}</span>
</a>
{{- end }}
</div>
Loading