mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Add accesskeys (attribute specifies a shortcut key to activate/focus an element.)
c - ToC Open/Close g- Go To Top h - Home (according to current lang) t - Theme toggle more: https://www.w3schools.com/tags/att_global_accesskey.asp
This commit is contained in:
parent
9acbc2c134
commit
b239f42f6b
@ -27,7 +27,7 @@
|
||||
<div class="toc">
|
||||
<details {{if .Params.TocOpen }} open{{ end }}>
|
||||
<summary>
|
||||
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||
<div class="details" accesskey="c">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||
</summary>
|
||||
<blockquote>
|
||||
{{- partial "toc.html" . }}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<span>·</span>
|
||||
<span>Theme️ <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a></span>
|
||||
</footer>
|
||||
<a href="#top" aria-label="go to top" title="Go to Top">
|
||||
<a href="#top" aria-label="go to top" title="Go to Top" accesskey="g">
|
||||
<button class="top-link" id="top-link" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6">
|
||||
<path d="M12 6H0l6-6z" /></svg>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<div class="logo">
|
||||
<a href="{{ "" | absLangURL }}">
|
||||
<a href="{{ "" | absLangURL }}" accesskey="h">
|
||||
{{- if .Site.Params.label.icon }}
|
||||
<img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo"
|
||||
height="{{- .Site.Params.label.iconHeight | default "30px" -}}">
|
||||
@ -43,7 +43,7 @@
|
||||
<span class="logo-switches">
|
||||
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
|
||||
<span class="theme-toggle">
|
||||
<a id="theme-toggle">
|
||||
<a id="theme-toggle" accesskey="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">
|
||||
|
Loading…
Reference in New Issue
Block a user