瀏覽代碼

Improvement for social icons in about.html (#41)

* Apply aria-hidden to the whole list of social icons since it also affects 
 all descendants. Thus, the code becomes a bit shorter. See
http://stackoverflow.com/a/18933265 for more details.

* Shorten code for including social icons. This way icon packs which are 
included via `custom_css` are also supported.

Signed-off-by: Stephan Kulla <git.mail@kulla.me>
Stephan Kulla 8 年之前
父節點
當前提交
fe05501b9a
共有 1 個文件被更改,包括 2 次插入6 次删除
  1. 2 6
      layouts/partials/widgets/about.html

+ 2 - 6
layouts/partials/widgets/about.html

@@ -16,15 +16,11 @@
             {{ with .Site.Params.organization }}<h3 itemprop="worksFor">{{ . }}</h3>{{ end }}
           </div>
 
-          <ul class="social-icon">
+          <ul class="social-icon" aria-hidden="true">
             {{ range .Site.Params.social }}
             <li>
               <a href="{{ .link }}">
-                {{ if eq .icon_pack "ai" }}
-                <i class="ai ai-{{ .icon }} big-icon" aria-hidden="true"></i>
-                {{ else }}
-                <i class="fa fa-{{ .icon }} big-icon" aria-hidden="true"></i>
-                {{ end }}
+                <i class="{{ .icon_pack | default "fa" }} {{ .icon_pack | default "fa" }}-{{ .icon }} big-icon"></i>
               </a>
             </li>
             {{ end }}