mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
Adding gravatar support (#268)
* Gravatar support Adding gravatar as alternative avatar * Update CONTRIBUTORS.md
This commit is contained in:
@@ -58,3 +58,4 @@
|
|||||||
- [FIGBERT](https://figbert.com/)
|
- [FIGBERT](https://figbert.com/)
|
||||||
- [Yash Mehrotra](https://yashmehrotra.com)
|
- [Yash Mehrotra](https://yashmehrotra.com)
|
||||||
- [Paolo Mainardi](https://paolomainardi.com)
|
- [Paolo Mainardi](https://paolomainardi.com)
|
||||||
|
- [Ka-Wai Lin](https://github.com/kwlin)
|
||||||
@@ -21,6 +21,7 @@ disqusShortname = "yourdiscussshortname"
|
|||||||
keywords = "blog,developer,personal"
|
keywords = "blog,developer,personal"
|
||||||
info = "Full Stack DevOps and Magician"
|
info = "Full Stack DevOps and Magician"
|
||||||
avatarurl = "images/avatar.jpg"
|
avatarurl = "images/avatar.jpg"
|
||||||
|
#gravatar = "john.doe@example.com"
|
||||||
footercontent = "Enter a text here."
|
footercontent = "Enter a text here."
|
||||||
|
|
||||||
dateformat = "January 2, 2006"
|
dateformat = "January 2, 2006"
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
<section class="container centered">
|
<section class="container centered">
|
||||||
<div class="about">
|
<div class="about">
|
||||||
|
{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
|
||||||
{{ with .Site.Params.avatarurl }}
|
{{ with .Site.Params.avatarurl }}
|
||||||
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
|
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.gravatar }}
|
||||||
|
<div class="avatar"><img src="https://www.gravatar.com/avatar/{{md5 .}}?s=240&d=mp" alt="gravatar"></div>
|
||||||
|
{{ end }}
|
||||||
<h1>{{ .Site.Params.author }}</h1>
|
<h1>{{ .Site.Params.author }}</h1>
|
||||||
<h2>{{ .Site.Params.info }}</h2>
|
<h2>{{ .Site.Params.info }}</h2>
|
||||||
{{ with .Site.Params.social }}
|
{{ with .Site.Params.social }}
|
||||||
|
|||||||
Reference in New Issue
Block a user