Add i18n to skiplink

This commit is contained in:
Caio Lente 2023-09-29 19:57:55 -03:00
parent 64583d8a0a
commit 6f981964e0
No known key found for this signature in database
GPG Key ID: E66D381776EFC03A
6 changed files with 17 additions and 11 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.hugo_build.lock .hugo_build.lock
.DS_Store .DS_Store
resources/ resources/
todo.md

View File

@ -146,17 +146,16 @@ h3.blog-filter {
opacity: 0.7; opacity: 0.7;
} }
/* "skip to main content" link */ /* "Skip to main content" link */
.skiplink { .skip-link {
position: absolute; position: absolute;
top: 5; top: 5;
transform: translateY(-600%); transform: translateY(-600%);
transition: transform 0.5s; transition: transform 0.5s;
background-color: #121212; background-color: #1d1f27;
font-size: larger;
padding: 6px; padding: 6px;
} }
.skiplink:focus { .skip-link:focus {
transform: translateY(0%); transform: translateY(0%);
} }

View File

@ -6,3 +6,6 @@
[email-subject] [email-subject]
other = "Reply to " other = "Reply to "
[skip-link]
other = "Skip to main content"

View File

@ -6,3 +6,6 @@
[email-subject] [email-subject]
other = "Resposta a " other = "Resposta a "
[skip-link]
other = "Pular para conteúdo principal"

View File

@ -36,7 +36,7 @@
<header> <header>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
</header> </header>
<main id="maincontent"> <main id="main-content">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</main> </main>
<footer> <footer>

View File

@ -1,4 +1,4 @@
<a class="skiplink" href="#maincontent">Skip to Main Content</a> <a class="skip-link" href="#main-content">{{ i18n "skip-link" }}</a>
<a href="{{ relURL .Site.Home.Permalink }}" class="title"><h1>{{ .Site.Title }}</h1></a> <a href="{{ relURL .Site.Home.Permalink }}" class="title"><h1>{{ .Site.Title }}</h1></a>
<nav>{{- partial "nav.html" . -}}</nav> <nav>{{- partial "nav.html" . -}}</nav>