Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commented avatar not visible in sidebar for now. #1837

Merged
merged 3 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ social_icons:
#Title: http://example.com/

# Sidebar Avatar
# in theme directory(source/images): /images/avatar.jpg
# in site directory(source/uploads): /uploads/avatar.jpg
#avatar:
# in theme directory(source/images): /images/avatar.gif
# in site directory(source/uploads): /uploads/avatar.gif
#avatar: /images/avatar.gif

# Table Of Contents in the Sidebar
toc:
Expand Down
21 changes: 13 additions & 8 deletions layout/_macro/sidebar.swig
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,21 @@

<section class="site-overview sidebar-panel{% if not display_toc or toc(page.content).length <= 1 %} sidebar-panel-active{% endif %}">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}"
alt="{{ theme.author }}" />
<p class="site-author-name" itemprop="name">{{ theme.author }}</p>
{% if theme.seo %}
<p class="site-description motion-element" itemprop="description">{{ theme.signature }}</p>
{% else %}
<p class="site-description motion-element" itemprop="description">{{ theme.description }}</p>
{% if theme.avatar %}
<img class="site-author-image" itemprop="image"
src="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}"
alt="{{ theme.author }}" />
{% endif %}
<p class="site-author-name" itemprop="name">{{ theme.author }}</p>
<p class="site-description motion-element" itemprop="description">{#
#}{% if theme.seo %}{#
#}{{ theme.signature }}{#
#}{% else %}{#
#}{{ theme.description }}{#
#}{% endif %}{#
#}</p>
</div>

<nav class="site-state motion-element">

{% if config.archive_dir != '/' and site.posts.length > 0 %}
Expand Down