Skip to content

Commit

Permalink
🐛 Fix appearance switcher title when switching
Browse files Browse the repository at this point in the history
Fixes #235
  • Loading branch information
jpanther committed Aug 18, 2022
1 parent dbe7527 commit ffaca3f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Fixed

- Appearance switcher title doesn't update when switching appearance ([#235](https://github.com/jpanther/congo/issues/235))
- Article updated date logic doesn't consider formatted date values ([#259](https://github.com/jpanther/congo/issues/259))

## [2.3.1] - 2022-07-30
Expand Down
4 changes: 2 additions & 2 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2894,8 +2894,8 @@ body:has(#menu-controller:checked) {
background-color: rgba(var(--color-secondary-400), 1);
}

.dark .dark\:inline {
display: inline;
.dark .dark\:flex {
display: flex;
}

.dark .dark\:hidden {
Expand Down
25 changes: 15 additions & 10 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,23 @@
{{/* Appearance switch */}}
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
<div
class="text-sm cursor-pointer text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400 {{ if .Site.Params.footer.showScrollToTop | default true -}}
class="{{ if .Site.Params.footer.showScrollToTop | default true -}}
ltr:mr-14 rtl:ml-14
{{- end }}"
{{- end }} cursor-pointer text-sm text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
>
<button
id="appearance-switcher"
class="w-12 h-12 "
type="button"
title="{{ i18n "footer.dark_appearance" }}"
>
<span class="inline dark:hidden">{{ partial "icon.html" "moon" }}</span>
<span class="hidden dark:inline">{{ partial "icon.html" "sun" }}</span>
<button id="appearance-switcher" type="button">
<div
class="flex items-center justify-center w-12 h-12 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}"
>
{{ partial "icon.html" "moon" }}
</div>
<div
class="items-center justify-center hidden w-12 h-12 dark:flex"
title="{{ i18n "footer.light_appearance" }}"
>
{{ partial "icon.html" "sun" }}
</div>
</button>
</div>
{{ end }}
Expand Down

0 comments on commit ffaca3f

Please sign in to comment.