Skip to content

Commit 1d7b720

Browse files
committed
Merge pull request pythonclub#48 from luzfcb/pelican
corrigido integração com Gravatar
2 parents 025d865 + ba93457 commit 1d7b720

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

theme/templates/archives.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ <h1 class="content-subhead">Todos as postagens</h1>
1212
{% for article in dates %}
1313
<div class="archive-item">
1414
<a href="{{ SITEURL }}/{{ article.author.url }}" title="See posts by {{ article.author }}">
15+
{% if article.author_gravatar %}
1516
<img class="avatar" alt="{{ article.author }}" src="{{ article.author_gravatar }}">
17+
{% endif %}
1618
</a>
1719
<h5 class="archive-date">{{ article.date|strftime('%Y') }}</h5>
1820
<h4 class="archive-date">{{ article.date|strftime('%d %B') }}</h4>

theme/templates/article.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
<header class="header-article">
3232
<hgroup>
3333
<a href="{{ SITEURL }}/{{ article.author.url }}" title="See posts by {{ article.author }}">
34-
<img class="article-avatar" alt="{{ article.author }}" src="{{ article.author_gravatar }}">
34+
{% if article.author_gravatar %}
35+
<img class="article-avatar" alt="{{ article.author }}" src="{{ article.author_gravatar }}">
36+
{% endif %}
3537
</a>
3638
<h2 class="article-info">{{ article.author }}</h2>
3739
<div>

theme/templates/post.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<section class="post">
22
<header class="post-header">
33
<a href="{{ SITEURL }}/{{ article.author.url }}" title="See posts by {{ article.author }}">
4-
<img class="avatar" alt="{{ article.author }}" src="{{ article.author_gravatar }}">
4+
{% if article.author_gravatar %}
5+
<img class="avatar" alt="{{ article.author }}" src="{{ article.author_gravatar }}">
6+
{% endif %}
57
</a>
68
<h3><a class="post-title" href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h3>
79
<p class="post-meta">{{ article.summary }}</p>

0 commit comments

Comments
 (0)