Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make default header dark #64

Merged
merged 2 commits into from
Dec 30, 2022
Merged
Changes from 1 commit
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
Next Next commit
make default header dark
  • Loading branch information
carlosgauci committed Dec 10, 2022
commit 9ddf7ff1db5089ca3cffa0e991f77bb4cc08d51d
7 changes: 1 addition & 6 deletions themes/haystack/layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{{/* Website Header */}}

{{/* Default color */}}
{{ $theme := "light" }}
{{ $theme := "dark" }}

{{/* Get color from frontmatter if specified */}}
{{ with .Params.Header }}
{{ $theme = . }}
{{ end }}

{{/* Set to dark on 404 page since there is no frontmatter */}}
{{ if eq .Page.Kind "404" }}
{{ $theme = "dark" }}
{{ end }}

<header class="site-header{{ if eq $theme "dark" }} header-dark{{ end }}">
<div class="container">
<a class="site-title" href="/">{{ partial "site-logo" (dict "context" . "theme" $theme) }}</a>
Expand Down