82 lines
3.6 KiB
Plaintext
82 lines
3.6 KiB
Plaintext
<div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
|
{%- if theme.avatar.url %}
|
|
<img class="site-author-image" itemprop="image" alt="{{ author }}"
|
|
src="{{ url_for(theme.avatar.url) }}">
|
|
{%- endif %}
|
|
<p class="site-author-name" itemprop="name">{{ author }}</p>
|
|
<div class="site-description" itemprop="description">{{ description }}</div>
|
|
</div>
|
|
|
|
{%- if theme.site_state %}
|
|
<div class="site-state-wrap animated">
|
|
<nav class="site-state">
|
|
{%- if config.archive_dir != '/' and site.posts.length > 0 %}
|
|
<div class="site-state-item site-state-posts">
|
|
{%- set archive_dir = theme.menu.archives.split('||')[0] | trim if theme.menu.archives else config.archive_dir + '/' %}
|
|
<a href="{{ url_for(archive_dir) }}">
|
|
<span class="site-state-item-count">{{ site.posts.length }}</span>
|
|
<span class="site-state-item-name">{{ __('state.posts') }}</span>
|
|
</a>
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if site.categories.length > 0 %}
|
|
{%- set categoriesPageQuery = site.pages.find({type: 'categories'}, {lean: true}) %}
|
|
{%- set hasCategoriesPage = categoriesPageQuery.length > 0 %}
|
|
<div class="site-state-item site-state-categories">
|
|
{%- set category_dir = theme.menu.categories.split('||')[0] | trim if theme.menu.categories else config.category_dir + '/' %}
|
|
{%- if hasCategoriesPage %}
|
|
<a href="{{ url_for(category_dir) }}">
|
|
{%- endif %}
|
|
<span class="site-state-item-count">{{ site.categories.length }}</span>
|
|
<span class="site-state-item-name">{{ __('state.categories') }}</span>
|
|
{%- if hasCategoriesPage %}</a>{% endif %}
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if site.tags.length > 0 %}
|
|
{%- set tagsPageQuery = site.pages.find({type: 'tags'}, {lean: true}) %}
|
|
{%- set hasTagsPage = tagsPageQuery.length > 0 %}
|
|
<div class="site-state-item site-state-tags">
|
|
{%- set tag_dir = theme.menu.tags.split('||')[0] | trim if theme.menu.tags else config.tag_dir + '/' %}
|
|
{%- if hasTagsPage %}
|
|
<a href="{{ url_for(tag_dir) }}">
|
|
{%- endif %}
|
|
<span class="site-state-item-count">{{ site.tags.length }}</span>
|
|
<span class="site-state-item-name">{{ __('state.tags') }}</span>
|
|
{%- if hasTagsPage %}</a>{% endif %}
|
|
</div>
|
|
{%- endif %}
|
|
</nav>
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable) %}
|
|
<div class="sidebar-button animated">
|
|
<button>
|
|
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{% endif %}
|
|
{{ __('widget.chat') }}
|
|
</button>
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if theme.social %}
|
|
<div class="links-of-author animated">
|
|
{%- for name, link in theme.social %}
|
|
<span class="links-of-author-item">
|
|
{%- set sidebarURL = link.split('||')[0] | trim %}
|
|
{%- set sidebarIcon = '<i class="' + link.split('||')[1] | trim + ' fa-fw"></i>' if theme.social_icons.enable and link.split('||')[1] else '' %}
|
|
{%- set sidebarText = '' if (theme.social_icons.enable and theme.social_icons.icons_only) else name %}
|
|
{{ next_url(sidebarURL, sidebarIcon + sidebarText, {title: name + ' → ' + sidebarURL, rel: 'noopener me'}) }}
|
|
</span>
|
|
{%- endfor %}
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if theme.creative_commons.license and theme.creative_commons.sidebar %}
|
|
<div class="cc-license animated" itemprop="license">
|
|
{%- set ccImage = '<img src="' + theme.vendors.creative_commons.url + '" alt="Creative Commons">' %}
|
|
{{ next_url(ccURL, ccImage, {class: 'cc-opacity'}) }}
|
|
</div>
|
|
{%- endif %}
|