comments are back

This commit is contained in:
Peter Molnar 2017-06-03 11:07:38 +00:00
parent 0904cd2b31
commit 32d93d440e
4 changed files with 61 additions and 44 deletions

View file

@ -1,47 +1,59 @@
<section class="comments"> <section class="comments h-feed">
{% if post.replies|length > 0 %} {% if post.replies|length > 0 %}
<h6 class="comments-replies"><a name="replies"></a>Replies</h6> <h6 class="comments-replies"><a name="replies"></a>Replies</h6>
<ol> <ol>
{% for reply in post.replies %} {% for reply in post.replies %}
<li class="p-comment comment"> <li class="h-entry p-comment">
<div class="comment-author p-author h-card vcard"> <a class="u-url u-uuid" href="{{ site.url }}/{{ post.slug }}/#{{ reply.id }}" name="{{ reply.id }}"></a>
{% if reply.author.url %} <header>
<a class="url u-url" href="{{ reply.author.url }}"> <div class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span> <span class="p-name fn">{{ reply.author.name }}</span>
</a> {% endif %}
{% else %} </div>
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
<time class="dt-published" datetime="{{ reply.published|date("c") }}"> <time class="dt-published" datetime="{{ reply.published|date("c") }}">
{{ reply.published|date("%Y-%m-%d %H:%M") }} {{ reply.published|date("%Y-%m-%d %H:%M") }}
</time> </time>
</div> </header>
<div class="comment-content e-content"> <div class="e-content">
{{ reply.html }} {{ reply.html }}
</div> </div>
{% if reply.source|length > 0 %} <footer>
<a href="{{ reply.source }}" class="u-repost-of">{{ reply.source }}</a> {% if reply.source|length > 0 %}
{% endif %} <a href="{{ reply.source }}" class="u-repost-of">{{ reply.source }}</a>
<a class="u-in-reply-to" href="{{ post.url }}"></a> {% endif %}
<a class="u-in-reply-to" href="{{ post.url }}"></a>
</footer
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
{% endif %} {% endif %}
{% if post.reacjis|length > 0 %} {% if post.reacjis|length > 0 %}
<h6 class="comments-reacji"><a name="reacji"></a>Reacji</h6> <h6 class="comments-reacji"><a name="reacji"></a>Reactions</h6>
<dl> <dl>
{% for reacji, replies in post.reacjis.items() %} {% for reacji, replies in post.reacjis.items() %}
<dt><a name="{{ reacji }}"></a>{{ reacji }}</dt> <dt><a name="{{ reacji }}"></a>{{ reacji }}</dt>
<dd> <dd>
<ul> <ul>
{% for reply in replies %} {% for reply in replies %}
<li class="p-comment comment reacji"> <li class="p-comment h-entry ">
<a class="u-url u-uuid" href="{{ site.url }}/{{ post.slug }}/#{{ reply.id }}" name="{{ reply.id }}"></a>
<time class="dt-published" datetime="{{ reply.published|date("c") }}"> <time class="dt-published" datetime="{{ reply.published|date("c") }}">
{{ reply.published|date("%Y-%m-%d %H:%M") }} {{ reply.published|date("%Y-%m-%d %H:%M") }}
</time> </time>
<span class="comment-author p-author h-card vcard"> <span class="p-author h-card">
<a href="{{ reply.author.url }}" title="{{ reply.author.name }}">{{ reply.author.name }}</a> {% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</span> </span>
<a class="u-in-reply-to" href="{{ post.url }}"></a> <a class="u-in-reply-to" href="{{ post.url }}"></a>
</li> </li>
@ -51,5 +63,4 @@
{% endfor %} {% endfor %}
</dl> </dl>
{% endif %} {% endif %}
</section> </section>

View file

@ -26,7 +26,7 @@
{% for post in posts %} {% for post in posts %}
<item> <item>
<title>{% if post.title %}{{ post.title }}{% endif%}</title> <title>{% if post.title %}{{ post.title }}{% endif%}</title>
<link>{{ site.url }}/{{ post.slug }}</link> <link>{{ site.url }}/{{ post.slug }}/</link>
<pubDate>{{ post.published|date("%a, %d %b %Y %T %z") }}</pubDate> <pubDate>{{ post.published|date("%a, %d %b %Y %T %z") }}</pubDate>
<dc:creator><![CDATA[{{ post.author.name }}]]></dc:creator> <dc:creator><![CDATA[{{ post.author.name }}]]></dc:creator>
<guid isPermaLink="true">{{ site.url }}/{{ post.slug }}</guid> <guid isPermaLink="true">{{ site.url }}/{{ post.slug }}</guid>

View file

@ -11,7 +11,7 @@
<title>{{ post.name }} | {{ site.domain }}</title> <title>{{ post.name }} | {{ site.domain }}</title>
{% endif %} {% endif %}
<link rel="canonical" href="{{ site.url }}/{{ post.slug }}" /> <link rel="canonical" href="{{ site.url }}/{{ post.slug }}/" />
<link rel="shortlink" href="{{ site.url }}/{{ post.shortslug }}" /> <link rel="shortlink" href="{{ site.url }}/{{ post.shortslug }}" />
<meta name="author" content="{{ post.author.name }}"> <meta name="author" content="{{ post.author.name }}">
@ -24,7 +24,7 @@
<meta property="og:title" content="{{ post.title }}" /> <meta property="og:title" content="{{ post.title }}" />
<meta property="og:type" content="blog" /> <meta property="og:type" content="blog" />
{% if post.modified %}<meta name="og:updated_time" content="{{ post.modified|date("c") }}" />{%endif%} {% if post.modified %}<meta name="og:updated_time" content="{{ post.modified|date("c") }}" />{%endif%}
<meta property="og:url" content="{{ site.url }}/{{ post.shortslug }}" /> <meta property="og:url" content="{{ site.url }}/{{ post.shortslug }}/" />
<meta name="DC.Format" content="text/html" /> <meta name="DC.Format" content="text/html" />
<meta name="DC.Title" content="{{ post.title }}"> <meta name="DC.Title" content="{{ post.title }}">
@ -32,8 +32,8 @@
<meta name="DC.Description" content="{{ post.excerpt|default(post.title) }}"> <meta name="DC.Description" content="{{ post.excerpt|default(post.title) }}">
<meta name="DC.Date" content="{{ post.published|date("%Y-%m-%d") }}"> <meta name="DC.Date" content="{{ post.published|date("%Y-%m-%d") }}">
<meta name="DC.Type" content="{{ dctype }}"> <meta name="DC.Type" content="{{ dctype }}">
<meta name="DC.Identifier" content="{{ site.url }}/{{ post.slug }}"> <meta name="DC.Identifier" content="{{ site.url }}/{{ post.slug }}/">
<meta name="DC.Source" content="{{ site.url }}/{{ post.slug }}"> <meta name="DC.Source" content="{{ site.url }}/{{ post.slug }}/">
<meta name="DC.Language" content="{{ post.lang|default(site.lang) }}"> <meta name="DC.Language" content="{{ post.lang|default(site.lang) }}">
<meta name="DC.Rights" content="Copyright {{ post.published|date("%Y") }}, {{ post.author.name }} <{{ post.author.email }}>. All rights reserved."> <meta name="DC.Rights" content="Copyright {{ post.published|date("%Y") }}, {{ post.author.name }} <{{ post.author.email }}>. All rights reserved.">
@ -46,7 +46,7 @@
<h1 class="reaction">{% include 'block_reaction.html' %}</h1> <h1 class="reaction">{% include 'block_reaction.html' %}</h1>
{% elif post.title|length %} {% elif post.title|length %}
<h1> <h1>
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}"> <a href="{{ site.url }}/{{ post.slug }}/" title="{{ post.title }}">
<span class="p-name">{{ post.title }}</span> <span class="p-name">{{ post.title }}</span>
</a> </a>
</h1> </h1>
@ -92,7 +92,7 @@
<h6 class="pubdate-title">Published</h6> <h6 class="pubdate-title">Published</h6>
<p> <p>
<a class="u-url u-uuid" href="{{ site.url}}/{{ post.slug }}/"></a> <a class="u-url u-uuid" href="{{ site.url}}/{{ post.slug }}/"></a>
<a title="{{ post.title }}" href="{{ site.url }}/{{ post.slug }}"> <a title="{{ post.title }}" href="{{ site.url }}/{{ post.slug }}/">
<time class="dt-published" <time class="dt-published"
datetime="{{ post.published|date("c") }}"> datetime="{{ post.published|date("c") }}">
{{ post.published|date("%Y-%m-%d %H:%M") }} {{ post.published|date("%Y-%m-%d %H:%M") }}
@ -129,11 +129,12 @@
</p> </p>
</aside> </aside>
</footer> </footer>
</article>
{% if ( post.comments ) %} {% if ( post.comments ) %}
{% include 'block_comments.html' %} {% include 'block_comments.html' %}
{% endif %} {% endif %}
</article>
<aside class="content-note"> <aside class="content-note">
<hr /> <hr />

View file

@ -467,8 +467,7 @@ input[type=submit]:hover {
margin: 1rem auto; margin: 1rem auto;
} }
.h-entry, .h-entry {
.comments {
font-size: 0.86rem; font-size: 0.86rem;
padding: 0.6rem; padding: 0.6rem;
/*! margin: 0 0 1rem 0; */ /*! margin: 0 0 1rem 0; */
@ -584,6 +583,7 @@ input[type=submit]:hover {
} }
.h-entry footer h6, .h-entry footer h6,
.comments h6,
.h-entry .footnotes hr:before { .h-entry .footnotes hr:before {
font-size: 0.8rem; font-size: 0.8rem;
margin: 1rem 0 0 0; margin: 1rem 0 0 0;
@ -727,12 +727,15 @@ input[type=submit]:hover {
border-bottom: none; border-bottom: none;
} }
.comments {
font-size: 0.9rem;
}
.comments ol li { .comments ol li {
margin: 1rem 0 0 0; margin: 0;
padding: 0.3rem;
}
.comments ol li .e-content {
padding: 0;
margin: 0;
} }
.comments ol li .p-name { .comments ol li .p-name {
@ -758,19 +761,21 @@ input[type=submit]:hover {
visibility:hidden; visibility:hidden;
} }
.comments dl dt { .comments dl dt,
display: inline-block; .comments dl dd,
clear: both; .comments dl dd ul,
float:left; .comments dl dd ul li {
display: inline;
} }
.comments dl dd ul { .comments dl dd ul {
padding: 0 0 0 1rem; padding: 0;
list-style-type: none; list-style-type: none;
display: inline-block;
} }
.comments dl dd li { .comments dl dd li {
display: inline-block; padding: 0 0.3rem;
font-size: 0.8rem;
} }
.comments dl dd time { .comments dl dd time {