Skip to content
Snippets Groups Projects
Commit 172629ca authored by alexisben's avatar alexisben
Browse files

polish darkmode

parent c4609d03
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,9 @@
display: none
.logo-text
@include h2
@media (prefers-color-scheme: dark)
> img:first-child
display: none
.logo-darkmode
display: block
\ No newline at end of file
&.with-darkmode
@media (prefers-color-scheme: dark)
> img:first-child
display: none
.logo-darkmode
display: block
\ No newline at end of file
......@@ -8,7 +8,7 @@
{{ $file_darkmode = $logo.darkmode }}
{{ end }}
<a class="logo" href="{{ site.Home.Permalink }}">
<a class="logo {{- if $file_darkmode }} with-darkmode {{ end -}}" href="{{ site.Home.Permalink }}">
{{ if $file }}
{{ $fileDimensions := partial "GetImageDimensions" (dict "context" . "file" $file "static" true) }}
<img src="{{ $file }}" alt="{{ site.Title }}" height="{{ index $fileDimensions 1 }}" width="{{ index $fileDimensions 0 }}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment