浏览代码

contact widget: Support Telegram (#70)

Kirill Kirilenko 8 年之前
父节点
当前提交
bdb68fdf7d
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 1 0
      exampleSite/config.toml
  2. 9 0
      layouts/partials/widgets/contact.html

+ 1 - 0
exampleSite/config.toml

@@ -28,6 +28,7 @@ defaultContentLanguageInSubdir = false
   office_hours = "Monday 10:00 to 13:00 or email for appointment"
   office_hours = "Monday 10:00 to 13:00 or email for appointment"
   phone = "888 888 88 88"
   phone = "888 888 88 88"
   skype = "echo123"
   skype = "echo123"
+  telegram = ""
 
 
   # Enable Keybase in Contact section by entering your keybase.io username.
   # Enable Keybase in Contact section by entering your keybase.io username.
   keybase = ""
   keybase = ""

+ 9 - 0
layouts/partials/widgets/contact.html

@@ -49,6 +49,15 @@
       </li>
       </li>
       {{ end }}
       {{ end }}
 
 
+      {{ with $.Site.Params.telegram }}
+      <li>
+        <i class="fa-li fa fa-telegram fa-2x" aria-hidden="true"></i>
+        <span>
+        {{- if $autolink }}<a href="https://telegram.me/{{ . }}" target="_blank">@{{ . }}</a>{{ else }}@{{ . }}{{ end -}}
+        </span>
+      </li>
+      {{ end }}
+
       {{ with $.Site.Params.address }}
       {{ with $.Site.Params.address }}
       <li>
       <li>
         <i class="fa-li fa fa-map-marker fa-2x" aria-hidden="true"></i>
         <i class="fa-li fa fa-map-marker fa-2x" aria-hidden="true"></i>