diff options
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/404.html | 6 | ||||
| -rw-r--r-- | layouts/_default/all-posts.html | 4 | ||||
| -rw-r--r-- | layouts/_default/home.html | 2 | ||||
| -rw-r--r-- | layouts/_default/list.html | 6 | ||||
| -rw-r--r-- | layouts/_default/search.html | 12 | ||||
| -rw-r--r-- | layouts/partials/list/pagination.html | 12 | ||||
| -rw-r--r-- | layouts/partials/list/post-card.html | 6 | ||||
| -rw-r--r-- | layouts/partials/list/recent-posts.html | 6 | ||||
| -rw-r--r-- | layouts/partials/navmenu.html | 2 | ||||
| -rw-r--r-- | layouts/partials/select-theme.html | 6 | ||||
| -rw-r--r-- | layouts/partials/single/next-prev.html | 10 | ||||
| -rw-r--r-- | layouts/partials/single/tags.html | 2 | ||||
| -rw-r--r-- | layouts/tags/list.html | 10 | ||||
| -rw-r--r-- | layouts/tags/term.html | 12 |
14 files changed, 48 insertions, 48 deletions
diff --git a/layouts/404.html b/layouts/404.html index 388844b..8e46d6d 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,10 +1,10 @@ {{- define "main" }} <div class="page-not-found"> - <h1>{{ lang.Translate "404.title" | default "Page not found" }}</h1> - <p>{{ lang.Translate "404.description" | default "The requested page does not exist" }}</p> + <h1>{{ lang.Translate "404_title" | default "Page not found" }}</h1> + <p>{{ lang.Translate "404_description" | default "The requested page does not exist" }}</p> <p> <a href="{{ site.Home.RelPermalink }}"> - {{ lang.Translate "404.homepage" | default "Back to the homepage" }} + {{ lang.Translate "404_homepage" | default "Back to the homepage" }} </a> </p> </div> diff --git a/layouts/_default/all-posts.html b/layouts/_default/all-posts.html index 319a8d5..d2ce8ee 100644 --- a/layouts/_default/all-posts.html +++ b/layouts/_default/all-posts.html @@ -9,7 +9,7 @@ {{ . }} </div> {{- else }} - {{- $description := or .Description (lang.Translate "posts.all_description" | default "All posts on this website, from newest to oldest.") }} + {{- $description := or .Description (lang.Translate "posts_all_description" | default "All posts on this website, from newest to oldest.") }} <p class="all-posts__description"> {{ $description }} </p> @@ -29,7 +29,7 @@ </div> {{ else }} <p class="all-posts__empty-message"> - {{ lang.Translate "posts.empty" | default "This site does not have any posts yet." }} + {{ lang.Translate "posts_empty" | default "This site does not have any posts yet." }} </p> {{- end }} </section> diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 031e3b5..880f124 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -16,7 +16,7 @@ {{- partial "list/recent-posts.html" (dict "count" 5 - "title" (lang.Translate "posts.recent" | default "Recent Articles") + "title" (lang.Translate "posts_recent" | default "Recent Articles") "show_view_all" true ) -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a8cb92a..fb53b40 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,14 +9,14 @@ {{ . }} </div> {{- else }} - {{- $description := or .Description .Summary (lang.Translate "list.default_description" .Title | default (printf "All posts in %s" .Title)) }} + {{- $description := or .Description .Summary (lang.Translate "list_description" .Title | default (printf "All posts in %s" .Title)) }} <p class="list-page__description"> {{ $description }} </p> {{- end }} </header> - <section class="list-page__content" aria-label="{{ lang.Translate "posts.name" | default "Posts" }}"> + <section class="list-page__content" aria-label="{{ lang.Translate "posts" | default "Posts" }}"> {{- /* 15 posts per site */ -}} {{- $paginator := .Paginate .Pages 15 }} {{- with $paginator.Pages }} @@ -29,7 +29,7 @@ </ul> {{ else }} <p class="list-page__empty-message"> - {{ lang.Translate "list.empty" | default "No posts found in this section." }} + {{ lang.Translate "list_empty" | default "No posts found in this section." }} </p> {{- end }} </section> diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 7ddaba2..90a6357 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -9,17 +9,17 @@ {{ . }} </div> {{- else }} - {{- $description := or .Description (lang.Translate "search.description" | default "Find posts by search term.") }} + {{- $description := or .Description (lang.Translate "search_description" | default "Find posts by search term.") }} <p class="search-page__description"> {{ $description }} </p> {{- end }} </header> - <section class="search-page__container" aria-label="{{ lang.Translate "search.label" | default "Search all posts" }}"> + <section class="search-page__container" aria-label="{{ lang.Translate "search_label" | default "Search all posts" }}"> <form id="search-form" class="search-form" role="search" autocomplete="off"> <label for="search-input" class="search-form__label" hidden> - {{ lang.Translate "search.label" | default "Search all posts" }} + {{ lang.Translate "search_label" | default "Search all posts" }} </label> <div class="search-form__input-wrapper"> <input @@ -27,13 +27,13 @@ class="search-form__input" type="search" data-index-url="{{ site.Home.RelPermalink }}index.json" - placeholder="{{ lang.Translate "search.placeholder" | default "Type to search..." }}" + placeholder="{{ lang.Translate "search_placeholder" | default "Type to search..." }}" /> <button id="search-reset" type="button" class="search-form__reset" - aria-label="{{ lang.Translate "search.reset" | default "Clear search" }}" + aria-label="{{ lang.Translate "search_reset" | default "Clear search" }}" > <span class="search-clear__icon" aria-hidden="true">×</span> </button> @@ -45,7 +45,7 @@ <div id="search-results" class="search-page__results" aria-live="polite"> <p class="search-results__count" hidden> <span id="search-results-number">0</span> - {{ lang.Translate "search.matches" | default "matches" }} + {{ lang.Translate "search_matches" | default "matches" }} </p> <ul class="search-results__list" hidden></ul> diff --git a/layouts/partials/list/pagination.html b/layouts/partials/list/pagination.html index d1170e1..dfe8178 100644 --- a/layouts/partials/list/pagination.html +++ b/layouts/partials/list/pagination.html @@ -1,27 +1,27 @@ {{- $paginator := . }} {{- if gt $paginator.TotalPages 1 }} -<nav class="pagination" aria-label="{{ lang.Translate "pagination.label" | default "Page navigation" }}"> +<nav class="pagination" aria-label="{{ lang.Translate "page_navigation" | default "Page navigation" }}"> {{- if $paginator.HasPrev }} <a href="{{ $paginator.Prev.URL }}" class="pagination__link" rel="prev" - aria-label="{{ lang.Translate "pagination.previous_page" | default "Previous page" }}" + aria-label="{{ lang.Translate "page_previous" | default "Previous page" }}" > - ← {{ lang.Translate "common.previous" | default "Previous" }} + ← {{ lang.Translate "previous" | default "Previous" }} </a> {{- end }} <p class="pagination__current"> - {{ lang.Translate "pagination.position" $paginator.PageNumber $paginator.TotalPages | default (printf "Page %d of %d" $paginator.PageNumber $paginator.TotalPages) }} + {{ lang.Translate "page_position" $paginator.PageNumber $paginator.TotalPages | default (printf "Page %d of %d" $paginator.PageNumber $paginator.TotalPages) }} </p> {{- if $paginator.HasNext }} <a href="{{ $paginator.Next.URL }}" class="pagination__link" rel="next" - aria-label="{{ lang.Translate "pagination.next_page" | default "Next page" }}" + aria-label="{{ lang.Translate "page_next" | default "Next page" }}" > - {{ lang.Translate "common.next" | default "Next" }} → + {{ lang.Translate "next" | default "Next" }} → </a> {{- end }} </nav> diff --git a/layouts/partials/list/post-card.html b/layouts/partials/list/post-card.html index 254cc6b..955e868 100644 --- a/layouts/partials/list/post-card.html +++ b/layouts/partials/list/post-card.html @@ -13,11 +13,11 @@ <!-- Uncomment for post meta info <p class="post-card__meta-info"> <span class="post-card__reading-time"> - {{ lang.Translate "list.reading_time" $post.ReadingTime | default (printf "Estimated reading time: %s min" $post.ReadingTime) }} + {{ lang.Translate "reading_time" $post.ReadingTime | default (printf "Estimated reading time: %s min" $post.ReadingTime) }} </span> | <span class="post-card__word-count"> - {{ lang.Translate "list.word_count" $post.WordCount | default (printf "%s words" $post.WordCount) }} + {{ lang.Translate "word_count" $post.WordCount | default (printf "%s words" $post.WordCount) }} </span> </p> --> @@ -41,7 +41,7 @@ {{- if gt (len .) 3 }} <li class="post-card__tags-item post-card__tags-more"> <span class="post-card__tags-more-count"> - +{{ sub (len .) 3 }} {{ lang.Translate "common.more" | default "more" }} + +{{ sub (len .) 3 }} {{ lang.Translate "more" | default "more" }} </span> </li> {{- end }} diff --git a/layouts/partials/list/recent-posts.html b/layouts/partials/list/recent-posts.html index 2404910..5426f70 100644 --- a/layouts/partials/list/recent-posts.html +++ b/layouts/partials/list/recent-posts.html @@ -9,7 +9,7 @@ List of specified number of the most recent and published posts. Accepts a dict */ -}} {{- $count := .count | default 10 -}} -{{- $title := .title | default (lang.Translate "posts.recent" | default "Recent Articles") -}} +{{- $title := .title | default (lang.Translate "posts_recent" | default "Recent Articles") -}} {{- $showViewAll := .show_view_all | default true -}} <section class="recent-posts" aria-labelledby="recent-posts-heading"> <header class="recent-posts__header"> @@ -32,14 +32,14 @@ List of specified number of the most recent and published posts. Accepts a dict {{- if $showViewAll }} {{- with site.GetPage "/all-posts"}} <a href="{{ .RelPermalink }}" class="recent-posts__view-all-link"> - {{ lang.Translate "posts.view_all" | default "View all posts" }} » + {{ lang.Translate "posts_all_view" | default "View all posts" }} » </a> {{- end }} {{- end }} </div> {{ else }} <p class="recent-posts__empty-message"> - {{ lang.Translate "list.empty" | default "No posts in this section." }} + {{ lang.Translate "list_empty" | default "No posts in this section." }} </p> {{- end }} </section> diff --git a/layouts/partials/navmenu.html b/layouts/partials/navmenu.html index e833168..af0fc2e 100644 --- a/layouts/partials/navmenu.html +++ b/layouts/partials/navmenu.html @@ -11,7 +11,7 @@ Simplified version of the `hugo new template` menu.html default. Renders a menu {{- $menuID := .menuID }} {{- with index site.Menus $menuID }} -<nav role="navigation" aria-label="{{ lang.Translate "header.navmenu" | default "Site navigation" }}" class="header__navigation"> +<nav role="navigation" aria-label="{{ lang.Translate "navmenu" | default "Site navigation" }}" class="header__navigation"> <ul class="header__navigation-list"> {{- range . }} {{- $isCurrentPage := $currentPage.IsMenuCurrent .Menu . }} diff --git a/layouts/partials/select-theme.html b/layouts/partials/select-theme.html index 3d82bd6..914eacc 100644 --- a/layouts/partials/select-theme.html +++ b/layouts/partials/select-theme.html @@ -2,9 +2,9 @@ type="button" id="theme-toggle" class="theme-toggle" - aria-label="{{ lang.Translate "theme.toggle_dark" }}" - data-label-dark="{{ lang.Translate "theme.toggle_dark" }}" - data-label-light="{{ lang.Translate "theme.toggle_light" }}" + aria-label="{{ lang.Translate "toggle_dark" }}" + data-label-dark="{{ lang.Translate "toggle_dark" }}" + data-label-light="{{ lang.Translate "toggle_light" }}" > <svg class="icon icon-moon" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 16 16" aria-hidden="true"> <path fill="currentColor" d="M6 .278a.768.768 0 0 1 .08.858a7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277c.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316a.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71C0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"></path> diff --git a/layouts/partials/single/next-prev.html b/layouts/partials/single/next-prev.html index 452ce7e..55a3fff 100644 --- a/layouts/partials/single/next-prev.html +++ b/layouts/partials/single/next-prev.html @@ -1,13 +1,13 @@ {{- /* Navigation for next & previous post and back to top */ -}} {{- if ne .Params.excludeFromLists true }} -<nav class="post__navigation" aria-label="{{ lang.Translate "post.navigation" | default "Post navigation" }}"> +<nav class="post__navigation" aria-label="{{ lang.Translate "posts_navigation" | default "Post navigation" }}"> <hr /> <ul class="post__navigation-list"> {{- with .PrevInSection }} <li class="post__navigation-prev"> <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="prev"> <span class="post__navigation-label"> - ← {{ lang.Translate "post.previous" | default "Previous post:" }} + ← {{ lang.Translate "posts_previous" | default "Previous post:" }} </span> <span class="post__navigation-title"> {{ .Title }} @@ -20,7 +20,7 @@ <li class="post__navigation-next"> <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="next"> <span class="post__navigation-label"> - {{ lang.Translate "post.next" | default "Next post:" }} + {{ lang.Translate "posts_next" | default "Next post:" }} </span> <span class="post__navigation-title"> {{ .Title }} → @@ -34,8 +34,8 @@ <a href="#" class="post__scroll-top" - aria-label="{{ lang.Translate "posts.top" | default "Back to top" }}" - title="{{ lang.Translate "posts.top" | default "Back to top" }}" + aria-label="{{ lang.Translate "back_top" | default "Back to top" }}" + title="{{ lang.Translate "back_top" | default "Back to top" }}" > <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> <path d="M17 15L12 10L7 15" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> diff --git a/layouts/partials/single/tags.html b/layouts/partials/single/tags.html index 16cd872..0c10d20 100644 --- a/layouts/partials/single/tags.html +++ b/layouts/partials/single/tags.html @@ -1,7 +1,7 @@ {{- with .GetTerms "tags" }} <section class="post__tags" aria-labelledby="tags-heading"> <p id="tags-heading" class="post__tags-heading"> - {{ lang.Translate "tags.name" | default "Tags" }} + {{ lang.Translate "tags" | default "Tags" }} </p> <ul class="post__tags-list"> diff --git a/layouts/tags/list.html b/layouts/tags/list.html index 651f427..87f74de 100644 --- a/layouts/tags/list.html +++ b/layouts/tags/list.html @@ -3,14 +3,14 @@ <article class="tags-index"> <header class="tags-index__header"> <h1 class="tags-index__headline"> - {{ lang.Translate "tags.all_title" | default "All Tags" }} + {{ lang.Translate "tags_all" | default "All Tags" }} </h1> <p class="tags-index__description"> - {{ lang.Translate "tags.all_description" | default "Overview of all topics covered on this site." }} + {{ lang.Translate "tags_all_description" | default "Overview of all topics covered on this site." }} </p> </header> - <section class="tags-index__content" aria-label="{{ lang.Translate "tags.all" | default "All Tags" }}"> + <section class="tags-index__content" aria-label="{{ lang.Translate "tags_all" | default "All Tags" }}"> {{- with site.Taxonomies.tags }} {{- $tags := .Alphabetical }} <ul class="tags-index__list"> @@ -20,7 +20,7 @@ <span class="tags-index__name"> {{ .Page.Title }} </span> - <span class="tags-index__count" aria-label="{{ lang.Translate "tags.postcount_title" | default "Number of posts" }}"> + <span class="tags-index__count" aria-label="{{ lang.Translate "tags_postcount_title" | default "Number of posts" }}"> ({{ .Count }}) </span> </a> @@ -29,7 +29,7 @@ </ul> {{- else }} <p class="tags-index__empty"> - {{ lang.Translate "tags.empty" | default "No tags found." }} + {{ lang.Translate "tags_empty" | default "No tags found." }} </p> {{- end }} </section> diff --git a/layouts/tags/term.html b/layouts/tags/term.html index 11dffa2..cb7d1b0 100644 --- a/layouts/tags/term.html +++ b/layouts/tags/term.html @@ -4,18 +4,18 @@ <header class="tag-page__header"> <h1 class="tag-page__headline"> <span class="tag-page__label"> - {{ lang.Translate "tags.tagged_with" | default "Tagged with:" }} + {{ lang.Translate "tags_with" | default "Tagged with:" }} </span> <span class="tag-page__name"> #{{ .Title }} </span> </h1> <p class="tag-page__count"> - {{ lang.Translate "tags.postcount_number" .Pages.Len | default (printf "%d posts found" .Pages.Len) }} + {{ lang.Translate "tags_postcount_number" .Pages.Len | default (printf "%d posts found" .Pages.Len) }} </p> </header> - <section class="tag-page__content" aria-label="{{ lang.Translate "tags.posts_list" | default "Posts with this tag:" }}"> + <section class="tag-page__content" aria-label="{{ lang.Translate "tags_posts_list" | default "Posts with this tag:" }}"> {{- with .Pages }} <ul class="tag-page__posts-list"> {{- range . }} @@ -26,15 +26,15 @@ </ul> {{- else }} <p class="tag-page__empty"> - {{ lang.Translate "tags.no_posts" | default "No posts found with this tag." }} + {{ lang.Translate "tags_no_posts" | default "No posts found with this tag." }} </p> {{- end }} </section> <footer class="tag-page__footer"> - <nav class="tag-page__navigation" aria-label="{{ lang.Translate "tags.navigation" | default "Tag navigation" }}"> + <nav class="tag-page__navigation" aria-label="{{ lang.Translate "tags_navigation" | default "Tag navigation" }}"> <a href="{{ .Parent.RelPermalink }}" class="tag-page__view-all-link"> - {{ lang.Translate "tags.all_title" | default "All tags" }} » + {{ lang.Translate "tags_all" | default "All tags" }} » </a> </nav> </footer> |
