Explorar o código

fix: correct tel: URL for translated about section (#518)

In the about section, a correct `tel:` URL was only generated if the
name of the sociallink was "Phone". Now, a correct link will also be
generated if the name of the sociallink corresponds to the translation
of "phone" in one of the i18n files.

Co-authored-by: stueja <jan@jBook.local>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
Jan %!s(int64=3) %!d(string=hai) anos
pai
achega
46769a2b6d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      layouts/partials/sections/about.html

+ 1 - 1
layouts/partials/sections/about.html

@@ -31,7 +31,7 @@
           <li>
             {{ if eq .name "Email" }}
               <a href="mailto:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
-            {{ else if eq .name "Phone" }}
+            {{ else if eq .name (i18n "phone") }}
               <a href="tel:{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>
             {{ else }}
               <a href="{{ .url }}" title="{{ .name }}" target="_blank" rel="noopener"><i class="{{ .icon }}"></i></a>