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

View file

@ -26,7 +26,7 @@
{% for post in posts %}
<item>
<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>
<dc:creator><![CDATA[{{ post.author.name }}]]></dc:creator>
<guid isPermaLink="true">{{ site.url }}/{{ post.slug }}</guid>

View file

@ -11,7 +11,7 @@
<title>{{ post.name }} | {{ site.domain }}</title>
{% 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 }}" />
<meta name="author" content="{{ post.author.name }}">
@ -24,7 +24,7 @@
<meta property="og:title" content="{{ post.title }}" />
<meta property="og:type" content="blog" />
{% 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.Title" content="{{ post.title }}">
@ -32,8 +32,8 @@
<meta name="DC.Description" content="{{ post.excerpt|default(post.title) }}">
<meta name="DC.Date" content="{{ post.published|date("%Y-%m-%d") }}">
<meta name="DC.Type" content="{{ dctype }}">
<meta name="DC.Identifier" content="{{ site.url }}/{{ post.slug }}">
<meta name="DC.Source" 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.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.">
@ -46,7 +46,7 @@
<h1 class="reaction">{% include 'block_reaction.html' %}</h1>
{% elif post.title|length %}
<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>
</a>
</h1>
@ -92,7 +92,7 @@
<h6 class="pubdate-title">Published</h6>
<p>
<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"
datetime="{{ post.published|date("c") }}">
{{ post.published|date("%Y-%m-%d %H:%M") }}
@ -129,11 +129,12 @@
</p>
</aside>
</footer>
</article>
{% if ( post.comments ) %}
{% include 'block_comments.html' %}
{% endif %}
{% if ( post.comments ) %}
{% include 'block_comments.html' %}
{% endif %}
</article>
<aside class="content-note">
<hr />

View file

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