Browse Source

contact widget: Support Telegram (#70)

Kirill Kirilenko 8 years ago
parent
commit
bdb68fdf7d
2 changed files with 10 additions and 0 deletions
  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"
   phone = "888 888 88 88"
   skype = "echo123"
+  telegram = ""
 
   # Enable Keybase in Contact section by entering your keybase.io username.
   keybase = ""

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

@@ -49,6 +49,15 @@
       </li>
       {{ 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 }}
       <li>
         <i class="fa-li fa fa-map-marker fa-2x" aria-hidden="true"></i>