diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index e296fde..348f9bd 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2122,6 +2122,10 @@ video { margin-left: 1rem; } +.ml-auto { + margin-left: auto; +} + .mr-1 { margin-right: 0.25rem; } @@ -3412,6 +3416,14 @@ body { } } +:is(html[class~="dark"] .dark\:block) { + display: block; +} + +:is(html[class~="dark"] .dark\:hidden) { + display: none; +} + :is(html[class~="dark"] .dark\:border-blue-200\/30) { border-color: rgb(191 219 254 / 0.3); } diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 2c9fa1a..23527ce 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -75,6 +75,16 @@ menu: weight: 3 params: + navbar: + displayTitle: true + displayLogo: true + logo: + path: images/logo.svg + dark: images/logo-dark.svg + # link: / + # width: 40 + # height: 20 + footer: disabled: false displayCopyright: true @@ -94,4 +104,4 @@ params: editURL: disabled: false - base: "https://github.com/imfing/hextra/edit/dev/exampleSite/content" + base: "https://github.com/imfing/hextra/edit/main/exampleSite/content" diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index 3df6ec5..0c20037 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -153,6 +153,7 @@ "dark:bg-primary-400/10", "dark:bg-red-900/30", "dark:bg-yellow-700/30", + "dark:block", "dark:border-blue-200/30", "dark:border-gray-100/20", "dark:border-neutral-800", @@ -162,6 +163,7 @@ "dark:border-yellow-200/30", "dark:contrast-more:border-neutral-400", "dark:focus:bg-dark", + "dark:hidden", "dark:hover:bg-gray-100/5", "dark:hover:bg-neutral-900", "dark:hover:bg-primary-100/5", @@ -340,6 +342,7 @@ "min-w-full", "ml-1", "ml-4", + "ml-auto", "mr-1", "mr-2", "mt-1.5", diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 37783b7..f3eb681 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,12 +1,20 @@ +{{- $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 -}} + +
diff --git a/static/images/logo-dark.svg b/static/images/logo-dark.svg new file mode 100644 index 0000000..2857264 --- /dev/null +++ b/static/images/logo-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/images/logo.svg b/static/images/logo.svg new file mode 100644 index 0000000..1ed7daf --- /dev/null +++ b/static/images/logo.svg @@ -0,0 +1,3 @@ + + +