diff options
author | Emruz Hossain <hossainemruz@gmail.com> | 2021-03-29 00:44:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 00:44:33 +0300 |
commit | fa946af5048095fc88e5f8b638e32d678f4b76c4 (patch) | |
tree | c21ec6751e256a44e67cd264f616b5ffa4c98a9b /layouts | |
parent | a735dde38b37ad5133b5b3916e31018271dbbf6d (diff) |
Fix various issues detected by html-proofer (#270)
* Add alt tag to the images
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
* Remove unnecessary /
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/404.html | 2 | ||||
-rw-r--r-- | layouts/_default/search.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/cards/post.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/navigators/floating-lang-selector.html | 6 | ||||
-rw-r--r-- | layouts/partials/navigators/lang-selector-2.html | 6 | ||||
-rw-r--r-- | layouts/partials/navigators/lang-selector.html | 6 | ||||
-rw-r--r-- | layouts/partials/navigators/navbar-2.html | 6 | ||||
-rw-r--r-- | layouts/partials/navigators/navbar.html | 6 | ||||
-rw-r--r-- | layouts/partials/sections/home.html | 1 |
11 files changed, 24 insertions, 17 deletions
diff --git a/layouts/404.html b/layouts/404.html index 8fd4a16..c602109 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -19,7 +19,7 @@ <div class="container"> <div class="notFound"> - <img src="{{ $notFoundImage }}" alt=""> + <img src="{{ $notFoundImage }}" alt="Page Not Found"> <div class="message"> <h1>404</h1> <h4>{{ i18n "err_404" }}</h4> diff --git a/layouts/_default/search.html b/layouts/_default/search.html index a0f55e4..41c04d0 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -43,7 +43,7 @@ <a href="${link}" class="post-card-link"> <div class="card" style="min-height: 352px;"><a href="${link}" class="post-card-link"> <div class="card-head"> - <img class="card-img-top" src="${hero}"> + <img class="card-img-top" src="${hero}" alt="Card Heading Image"> </div> <div class="card-body"> <h5 class="card-title">${title}</h5> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2e6b4ee..143d8b9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -43,7 +43,7 @@ <!--Content Start--> <div class="page-content"> <div class="author-profile ml-auto align-self-lg-center"> - <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}'/> + <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image"> <h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5> <p>{{ .Page.Date.Format "January 2, 2006" }}</p> </div> diff --git a/layouts/partials/cards/post.html b/layouts/partials/cards/post.html index 7bfe722..afabab9 100644 --- a/layouts/partials/cards/post.html +++ b/layouts/partials/cards/post.html @@ -2,7 +2,7 @@ <a href="{{ .RelPermalink | relLangURL }}" class="post-card-link"> <div class="card"> <div class="card-head"> - <img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}'/> + <img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}' alt="Hero Image"> </div> <div class="card-body"> <h5 class="card-title">{{ .Title }}</h5> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0988dab..d361d6c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -93,7 +93,7 @@ <div class="row text-left"> <div class="col-md-4"> <a id="theme" href="https://github.com/hossainemruz/toha" target="#"> - <img src="{{ $themeLogo }}"> + <img src="{{ $themeLogo }}" alt="Toha Theme Logo"> Toha </a> </div> diff --git a/layouts/partials/navigators/floating-lang-selector.html b/layouts/partials/navigators/floating-lang-selector.html index ec891d6..b76dfec 100644 --- a/layouts/partials/navigators/floating-lang-selector.html +++ b/layouts/partials/navigators/floating-lang-selector.html @@ -5,13 +5,15 @@ <div class="dropdown languageSelector"> <a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/16.png" alt="{{ $countryCode }}"> {{ site.Language.LanguageName }} </a> <div class="dropdown-menu" aria-labelledby="languageSelector"> {{ range .Translations }} <a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/24.png" alt="{{ $countryCode }}"> {{ .Language.LanguageName }} </a> {{ end }} diff --git a/layouts/partials/navigators/lang-selector-2.html b/layouts/partials/navigators/lang-selector-2.html index d94bd05..e98d3f2 100644 --- a/layouts/partials/navigators/lang-selector-2.html +++ b/layouts/partials/navigators/lang-selector-2.html @@ -5,13 +5,15 @@ <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/16.png" alt="{{ $countryCode }}"> {{ site.Language.LanguageName }} </a> <div class="dropdown-menu" aria-labelledby="languageSelector"> {{ range .Translations }} <a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/24.png" alt="{{ $countryCode }}"> {{ .Language.LanguageName }} </a> {{ end }} diff --git a/layouts/partials/navigators/lang-selector.html b/layouts/partials/navigators/lang-selector.html index 87abe4d..afce12c 100644 --- a/layouts/partials/navigators/lang-selector.html +++ b/layouts/partials/navigators/lang-selector.html @@ -1,12 +1,14 @@ <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/16.png" alt="{{ $countryCode }}"> {{ site.Language.LanguageName }} </a> <div class="dropdown-menu" aria-labelledby="languageSelector"> {{ range site.Home.AllTranslations }} <a class="dropdown-item nav-link languages-item" href="{{ .RelPermalink }}"> - <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png"> + {{ $countryCode := partial "helpers/country-code.html" .Language }} + <img class="flag" src="https://www.countryflags.io/{{ $countryCode }}/flat/24.png" alt="{{ $countryCode }}"> {{ .Language.LanguageName }} </a> {{ end }} diff --git a/layouts/partials/navigators/navbar-2.html b/layouts/partials/navigators/navbar-2.html index 40e83b5..86b4626 100644 --- a/layouts/partials/navigators/navbar-2.html +++ b/layouts/partials/navigators/navbar-2.html @@ -30,7 +30,7 @@ <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}"> - <img src="{{ $mainLogo }}"> + <img src="{{ $mainLogo }}" alt="Logo"> {{- site.Title -}} </a> <button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()"> @@ -46,6 +46,6 @@ </div> </div> <!-- Store the logo information in a hidden img for the JS --> - <img src="{{ $mainLogo }}" class="d-none" id="main-logo"> - <img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo"> + <img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo"> + <img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo"> </nav> diff --git a/layouts/partials/navigators/navbar.html b/layouts/partials/navigators/navbar.html index 7384acb..3debe37 100644 --- a/layouts/partials/navigators/navbar.html +++ b/layouts/partials/navigators/navbar.html @@ -36,7 +36,7 @@ <nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar"> <div class="container"> <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}"> - <img src="{{ $invertedLogo }}" id="logo"> + <img src="{{ $invertedLogo }}" id="logo" alt="Logo"> {{- site.Title -}} </a> <button @@ -109,6 +109,6 @@ </div> </div> <!-- Store the logo information in a hidden img for the JS --> - <img src="{{ $mainLogo }}" class="d-none" id="main-logo"> - <img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo"> + <img src="{{ $mainLogo }}" class="d-none" id="main-logo" alt="Logo"> + <img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo"> </nav> diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index ec45a45..4976c09 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -107,6 +107,7 @@ <div class="container content text-center"> <img src="{{ $authorImage.RelPermalink }}" class="rounded-circle mx-auto d-block img-fluid" + alt="Author Image" /> <h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1> <div class="typing-carousel"> |