_includes/author.html in jasper-theme-0.0.1 vs _includes/author.html in jasper-theme-0.0.2
- old
+ new
@@ -3,59 +3,24 @@
{% assign writers = site.data.authors[include.author] %}
{% assign author_name_size = author_name | size %}
{% if author_name_size > 1 %}
- <!-- {% for author in author_name %}
- <li class="author-list-item">
- {% for writer in writers %}
- {% if author == writer.user_name %}
- <div class="author-name-tooltip">
- {{ writer.name }}
- </div>
- {% assign writer_image = writer.image | slice: 0, 5 %}
- {% if writer_image == "https" %}
- <a href="/author/{{ writer.user_name }}/" class="static-avatar">
- <img class="author-profile-image" src="{{ writer.image }}" alt="{{ writer.name }}" />
- </a>
- {% else %}
- <a href="/author/{{ writer.user_name }}/" class="static-avatar author-profile-image">{% include icons/avatar.svg %}</a>
- {% endif %}
- {% endif %}
- {% endfor %}
- </li>
- {% endfor %} -->
-
{% else%}
-
<li class="author-list-item">
- {% if site.tooltip %}
+ {% if site.tooltip and site.author_image %}
<div class="author-name-tooltip">
{{ writers.name }}
</div>
{% endif %}
- {% assign writers_image = writers.image | slice: 0, 5 %}
- {% if writers_image == "https" %}
- <a href="/author/{{ writers.user_name }}/" class="static-avatar">
- <img class="author-profile-image" src="{{ writers.image }}" alt="{{ writers.name }}" />
+
+ {% assign author_url = "/author/" %}
+ {% include author-icon.html %}
+ {% if site.tooltip or site.author_image == false %}
+ <a class="author-profile-name" href="{{ writers.user_name | prepend: author_url | relative_url }}">
+ {{ writers.name | truncate: 15 }}
</a>
- {% unless site.tooltip %}
- <span class="author-profile-name">
- <a href="/author/{{ writers.user_name }}/">{{ writers.name | truncate: 15 }}</a>
- </span>
- {% endunless %}
- {% else %}
- <a href="/author/{{ writers.user_name }}/" class="static-avatar author-profile-image">
- <img src="{% include icons/avatar.svg %}" alt="{{ writers.name }}">
- </a>
- {% unless site.tooltip %}
- <span class="author-profile-name">
- <a href="/author/{{ writers.user_name }}/">{{ writers.name | truncate: 15 }}</a>
- </span>
- {% endunless %}
{% endif %}
</li>
-
{% endif %}
-
-</ul>
\ No newline at end of file
+</ul>