From af25b3d2b52e8a09d57f2b3ab2697bf71ce4939f Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 16 Feb 2026 14:01:30 +0200 Subject: [PATCH] layouts: update to hextra 0.11 --- config.toml | 16 +++---- layouts/partials/navbar-title.html | 19 ++++++++ layouts/partials/navbar.html | 72 ------------------------------ layouts/partials/version.html | 7 ++- 4 files changed, 28 insertions(+), 86 deletions(-) create mode 100644 layouts/partials/navbar-title.html delete mode 100644 layouts/partials/navbar.html diff --git a/config.toml b/config.toml index c5830826..3f65308c 100644 --- a/config.toml +++ b/config.toml @@ -25,16 +25,6 @@ useEmbedded = "fallback" [markup.highlight] noClasses = false -[[menu.main]] -identifier = "version" -name = "Latest git" -url = "https://wiki.hypr.land/version-selector/" -weight = 1 -[[menu.main.params]] -type = "version" -outdated = false # set for any version that isn't the current one -version = "" # only change when setting the version, otherwise it is "Latest git" by default - [[menu.main]] identifier = "Home" name = "Home" @@ -79,6 +69,12 @@ displayUpdatedDate = true dateFormat = "January 2, 2006" keywords = ["hyprland", "wiki", "hypr", "land"] +[params.version] +name = "Latest git" +url = "/version-selector/" +outdated = false # set for any version that isn't the current one +version = "" # only change when setting the version, otherwise it is "Latest git" by default + [params.navbar] displayTitle = true displayLogo = true diff --git a/layouts/partials/navbar-title.html b/layouts/partials/navbar-title.html new file mode 100644 index 00000000..93b35480 --- /dev/null +++ b/layouts/partials/navbar-title.html @@ -0,0 +1,19 @@ +{{- $logoPath := .Site.Params.navbar.logo.path | default "images/logo.svg" -}} +{{- $logoLink := .Site.Params.navbar.logo.link | default .Site.Home.RelPermalink -}} +{{- $logoWidth := .Site.Params.navbar.logo.width | default "20" -}} +{{- $logoHeight := .Site.Params.navbar.logo.height | default "20" -}} +{{- $logoDarkPath := .Site.Params.navbar.logo.dark | default $logoPath -}} + + + {{- $displayTitle := (.Site.Params.navbar.displayTitle | default true) }} + {{- if (.Site.Params.navbar.displayLogo | default true) }} + {{ cond $displayTitle `Logo` .Site.Title }} + {{ cond $displayTitle `Dark Logo` .Site.Title }} + {{- end }} + {{- if $displayTitle }} + {{ .Site.Title }} + {{- end }} + + + +{{- partial "version.html" (dict "params" .Site.Params.version) -}} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html deleted file mode 100644 index 9472cdfe..00000000 --- a/layouts/partials/navbar.html +++ /dev/null @@ -1,72 +0,0 @@ -{{- $logoPath := .Site.Params.navbar.logo.path | default "images/logo.svg" -}} -{{- $logoLink := .Site.Params.navbar.logo.link | default .Site.Home.RelPermalink -}} -{{- $logoWidth := .Site.Params.navbar.logo.width | default "20" -}} -{{- $logoHeight := .Site.Params.navbar.logo.height | default "20" -}} -{{- $logoDarkPath := .Site.Params.navbar.logo.dark | default $logoPath -}} - -{{- $navWidth := "hx-max-w-[90rem]" -}} -{{- with .Site.Params.navbar.width -}} - {{ if eq . "normal" -}} - {{ $navWidth = "hx-max-w-screen-xl" -}} - {{ else if eq . "full" -}} - {{ $navWidth = "max-w-full" -}} - {{ end -}} -{{- end -}} - - diff --git a/layouts/partials/version.html b/layouts/partials/version.html index 0ba3003f..f91d890d 100644 --- a/layouts/partials/version.html +++ b/layouts/partials/version.html @@ -1,11 +1,10 @@ -{{- $version := .params.version | default "Latest git" -}} -{{- $url := .url | default "https://wiki.hypr.land/version-selector" -}} +{{- $version := .params.version | default .params.name -}} {{- $outdated := "" -}} {{- if .params.outdated -}} {{- $outdated = "outdated" -}} {{- end -}} - - {{ $version }} + + {{ $version }}