Переглянути джерело

feat: migrate to latest web best practices

Informed by Google Lighthouse insights.

Part 2 - also see 4b9ee3021cb4b9c085d318692ff71478b5d6abb5
George Cushen 4 роки тому
батько
коміт
70c465806c

+ 3 - 0
wowchemy/i18n/en.yaml

@@ -18,6 +18,9 @@
 - id: close
   translation: Close
 
+- id: languages
+  translation: Languages
+
 # General
 
 - id: related

+ 2 - 1
wowchemy/layouts/partials/navbar.html

@@ -181,7 +181,8 @@
 
       {{ if .IsTranslated }}
       <li class="nav-item dropdown i18n-dropdown">
-        <a href="#" class="nav-link {{ if $show_current_language }}dropdown-toggle{{end}}" data-toggle="dropdown" aria-haspopup="true">
+        <a href="#" class="nav-link {{ if $show_current_language }}dropdown-toggle{{end}}" data-toggle="dropdown"
+           aria-haspopup="true" aria-label="{{ i18n "languages" | default "Languages" }}">
           <i class="fas fa-globe mr-1" aria-hidden="true"></i>
           {{- if $show_current_language -}}
             <span class="d-none d-lg-inline">{{ index site.Data.i18n.languages .Lang }}</span>

+ 2 - 2
wowchemy/layouts/shortcodes/cta.html

@@ -1,12 +1,12 @@
 <ul class="cta-group">
   {{ if (.Get "cta_text") }}
   <li>
-    <a href="{{.Get "cta_link"}}" {{if eq (.Get "cta_new_tab") "true" }}target="_blank"{{end}} class="btn btn-primary px-3 py-3">{{ (.Get "cta_text") | markdownify | emojify }}</a>
+    <a href="{{.Get "cta_link"}}" {{if eq (.Get "cta_new_tab") "true" }}target="_blank" rel="noopener"{{end}} class="btn btn-primary px-3 py-3">{{ (.Get "cta_text") | markdownify | emojify }}</a>
   </li>
   {{ end }}
   {{ if (.Get "cta_alt_text") }}
   <li>
-    <a href="{{.Get "cta_alt_link"}}" {{if eq (.Get "cta_alt_new_tab") "true" }}target="_blank"{{end}}>
+    <a href="{{.Get "cta_alt_link"}}" {{if eq (.Get "cta_alt_new_tab") "true" }}target="_blank" rel="noopener"{{end}}>
       {{ (.Get "cta_alt_text") | markdownify | emojify }} <i class="fas fa-angle-right"></i>
     </a>
   </li>