mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-04-20 22:09:15 +00:00
refactor: move theme switcher to a partial
This commit is contained in:
parent
1d12372ea5
commit
3ff8e8cb96
3 changed files with 8 additions and 12 deletions
|
@ -53,12 +53,7 @@
|
||||||
<img src="/static/icons/image.svg" alt="Toggle theme" />
|
<img src="/static/icons/image.svg" alt="Toggle theme" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
{{ template "themeSwitcher.html" .}}
|
||||||
<a href="/options/theme?redirect_url={{ .currentUrl }}">
|
|
||||||
<img src="/static/icons/{{ if eq .theme "dark" }}sun{{
|
|
||||||
else }}moon{{ end }}.svg" alt="Toggle theme" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="footer">
|
<p class="footer">
|
||||||
Brought to you by
|
Brought to you by
|
||||||
|
|
|
@ -21,12 +21,7 @@
|
||||||
alt="4 circles with alternating colors between green and white"
|
alt="4 circles with alternating colors between green and white"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div class="icon">
|
{{ template "themeSwitcher.html" .}}
|
||||||
<a href="/options/theme?redirect_url={{ .currentUrl }}">
|
|
||||||
<img src="/static/icons/{{ if eq .theme "dark" }}sun{{
|
|
||||||
else }}moon{{ end }}.svg" alt="Toggle theme" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
6
templates/themeSwitcher.html
Normal file
6
templates/themeSwitcher.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<div class="icon">
|
||||||
|
<a href="/options/theme?redirect_url={{ .currentUrl }}">
|
||||||
|
<img src="/static/icons/{{ if eq .theme "dark" }}sun{{
|
||||||
|
else }}moon{{ end }}.svg" alt="Toggle theme" />
|
||||||
|
</a>
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue