summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-02-12 10:48:04 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-02-12 10:48:04 +0530
commit6f8edf1ffa88129a26eddf508e5d1833b86e486e (patch)
tree78c67592ce4573916f24d54983cf3642210e84a3
parent034da041800de60cfdfa6dbefc00f479f7c009cb (diff)
change theme-switch from 'a' to 'button'
and refactor
-rw-r--r--assets/css/header.css8
-rw-r--r--assets/css/reset.css1
-rw-r--r--layouts/partials/header.html4
3 files changed, 6 insertions, 7 deletions
diff --git a/assets/css/header.css b/assets/css/header.css
index 910e98c..beaf5bd 100644
--- a/assets/css/header.css
+++ b/assets/css/header.css
@@ -40,11 +40,9 @@
height: 18px;
}
-a#theme-toggle {
- font-size: 24px;
- user-select: none;
- margin: auto 4px;
- cursor: pointer
+button#theme-toggle {
+ font-size: 26px;
+ margin: auto 4px
}
body.dark #moon {
diff --git a/assets/css/reset.css b/assets/css/reset.css
index 4b8e09f..ee8e77b 100644
--- a/assets/css/reset.css
+++ b/assets/css/reset.css
@@ -10,6 +10,7 @@ html {
}
a,
+button,
body,
h1,
h2,
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index d91cc6f..301367c 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -61,7 +61,7 @@
{{- end }}
<span class="logo-switches">
{{- if (not .Site.Params.disableThemeToggle) }}
- <a id="theme-toggle" accesskey="t" title="(Alt + T)">
+ <button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
@@ -80,7 +80,7 @@
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
- </a>
+ </button>
{{- end}}
{{ $lang := .Lang}}
{{ $separator := or .Title (not .Site.Params.disableThemeToggle)}}