guesthouse_lite-8.x-1.0/templates/node--article.html.twig
templates/node--article.html.twig
{#
/**
* @file
* GuestHouse+s's theme implementation to display a Article node.
*/
#}
{% extends "node.html.twig" %}
{% block node_side %}
{% if view_mode == "full" %}
<div class="node__side">
{% if mt_setting.reading_time or mt_setting.font_resize or mt_setting.post_progress %}
{% if mt_setting.reading_time %}
{{ attach_library('guesthouse_lite/reading-time') }}
<div class="reading-time">
{% if minutes < 1 %}
{% trans %}
1<div class="reading-time__text">min read</div>
{% endtrans %}
{% else %}
{% trans %}
{{ minutes }}<div class="reading-time__text">min read</div>
{% endtrans %}
{% endif %}
</div>
{% endif %}
{% if mt_setting.affix_side %}
{{ attach_library('guesthouse_lite/node-side-affix') }}
<div id="affix">
{% endif %}
{% if mt_setting.font_resize %}
{{ attach_library('guesthouse_lite/font-resize') }}
<div class="content-font-settings">
<div class="font-resize">
<a href="#" id="decfont">A-</a>
<a href="#" id="incfont">A+</a>
</div>
</div>
{% endif %}
{% if mt_setting.post_progress %}
{{ attach_library('guesthouse_lite/post-progress') }}
<div class="post-progress">
<div class="post-progress__value"></div>
<div class="post-progress__text">{% trans %}read{% endtrans %}</div>
<div class="post-progress__bar"></div>
</div>
{% endif %}
{% if mt_setting.affix_side %}
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
{% endblock %}
{% block meta_area %}
{{ title_prefix }}
{% if not page %}
<h2{{ title_attributes.addClass('node__title') }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
{% if display_submitted %}
{{ author_picture }}
{% endif %}
{% if display_submitted or node.comment %}
<div class="node__meta">
<ul class="inline-list">
{% if display_submitted %}
<li class="inline-list__item">
<span{{ author_attributes.addClass('node__submitted-info') }}>
{% trans %}<span class="node__submitted-info-text">By</span> {{ author_name }}{% endtrans %}
<span class="node__submitted-date">
{{ node.createdtime|format_date('custom', 'M d, Y') }}
</span>
</span>
{{ metadata }}
</li>
{% endif %}
{% if node.comment and comment_count > 0 %}
<li class="inline-list__item">
<span class="comments-count__counter">
<i class="fa fa-comment-o"></i>
{% trans %}
1 comment
{% plural comment_count %}
{{ comment_count }} comments
{% endtrans %}
</span>
</li>
{% endif %}
</ul>
</div>
{% endif %}
{% endblock %}
{% block content %}
{{ attach_library('guesthouse_lite/node-article') }}
<div class="node__main-content-section">
{{ content|without('comment') }}
</div>
{{ content.comment }}
{% endblock %}
