Skip to content

Commit

Permalink
Added aria-label for socials, relabeled dark mode
Browse files Browse the repository at this point in the history
Resolves #277

Signed-off-by: Patrick Smyth <patrick@iotaschool.com>
  • Loading branch information
smythp committed Nov 24, 2023
1 parent d433005 commit 64a3eb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/header/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ <h2 class="h5 offcanvas-title ps-2" id="offcanvasDoksLabel"><a class="text-dark"
<ul class="nav flex-column flex-lg-row">
{{ range .Site.Menus.social -}}
<li class="nav-item">
<a class="nav-link social-link" href="{{ .URL | relURL }}">{{ .Pre | safeHTML }}<small class="ms-2 d-lg-none">{{ .Name | safeHTML }}</small></a>
<a class="nav-link social-link" href="{{ .URL | relURL }}" aria-label="{{ .Name | safeHTML }}">{{ .Pre | safeHTML }}<small class="ms-2 d-lg-none">{{ .Name | safeHTML }}</small></a>
</li>
{{ end -}}
</ul>

{{ if .Site.Params.options.darkMode -}}
<hr class="text-black-50 my-4 d-lg-none">
<button id="mode" class="btn btn-link" type="button" aria-label="Toggle user interface mode">
<button id="mode" class="btn btn-link" type="button" aria-label="Toggle light/dark mode">
<span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span>
<span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><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></span>
</button>
Expand Down

0 comments on commit 64a3eb6

Please sign in to comment.