Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Fastbyte01/KeepIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Pignataro <rogepix@gmail.com>2019-03-15 13:06:37 +0300
committerGiuseppe Pignataro <rogepix@gmail.com>2019-03-15 13:06:37 +0300
commit7fa7590d2fcee805a0c924492a8765d80d08905c (patch)
treec6e547ef630246396944fe7d8cd6123fae386c29 /layouts
parentd27cd5358a4518bafe812caa66a9d0ee35922592 (diff)
Added gravatar support
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/home_post.html8
-rw-r--r--layouts/partials/home_profile.html8
2 files changed, 7 insertions, 9 deletions
diff --git a/layouts/partials/home_post.html b/layouts/partials/home_post.html
index 60cc8ae..594b298 100644
--- a/layouts/partials/home_post.html
+++ b/layouts/partials/home_post.html
@@ -1,11 +1,10 @@
<div class="post-warp">
<div class="intro">
- {{ $cdn_url := .Scratch.Get "cdn_url" }}
- {{ with .Site.Params.avatar}}
- {{ $avatar := .}}
+ {{ $cdn_url := .Scratch.Get "cdn_url" }}
+
<div class="avatar">
- <a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
+ <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar">
</div>
{{ end }}
{{ with .Site.Params.subtitle}}
@@ -63,3 +62,4 @@
{{ partial "paginator.html" . }}
</div>
+
diff --git a/layouts/partials/home_profile.html b/layouts/partials/home_profile.html
index f4307d3..fc92926 100644
--- a/layouts/partials/home_profile.html
+++ b/layouts/partials/home_profile.html
@@ -1,11 +1,9 @@
<div class="intro">
{{ $cdn_url := .Scratch.Get "cdn_url" }}
- {{ with .Site.Params.avatar}}
- {{ $avatar := .}}
+
<div class="avatar">
- <a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
+ <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar">
</div>
- {{ end }}
{{ with .Site.Params.subtitle}}
<h2 class="description">
{{ . }}
@@ -14,4 +12,4 @@
<div class="social-links">
{{ partial "social.html" . }}
</div>
-</div> \ No newline at end of file
+</div>