瀏覽代碼

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 3 年之前
父節點
當前提交
46769a2b6d
共有 1 個文件被更改,包括 1 次插入1 次删除
  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>