comments re-added
Peter Molnar hello@petermolnar.eu
Fri, 02 Jun 2017 10:20:47 +0000
3 files changed,
119 insertions(+),
13 deletions(-)
A
block_comments.html
@@ -0,0 +1,55 @@
+<section class="comments"> + {% 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 }}"> + <span class="p-name fn">{{ reply.author.name }}</span> + </a> + {% else %} + <span class="p-name fn">{{ reply.author.name }}</span> + {% endif %} + <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"> + {{ 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> + </li> + {% endfor %} + </ol> + {% endif %} + + {% if post.reacjis|length > 0 %} + <h6 class="comments-reacji"><a name="reacji"></a>Reacji</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"> + <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> + <a class="u-in-reply-to" href="{{ post.url }}"></a> + </li> + {% endfor %} + </ul> + </dd> + {% endfor %} + </dl> + {% endif %} + +</section>
M
singular.html
→
singular.html
@@ -129,16 +129,12 @@ <a href="{{ site.url }}/{{ post.shortslug }}">{{ site.url }}/{{ post.shortslug }}</a>
</p> </aside> </footer> - {% if post.offlinecopies %} - {% for url, copy in post.offlinecopies %} - <!-- {{ url }} + </article> - {{ copy }} + {% if ( post.comments ) %} + {% include 'block_comments.html' %} + {% endif %} - --> - {% endfor %} - {% endif %} - </article> <aside class="content-note"> <hr /> <p>Want to leave a comment or get in touch? Reply with your own blog using@@ -147,6 +143,7 @@ <a href="mailto:{{ post.author.email }}?subject=RE: {{ post.title }}"
>email</a>. </p> </aside> + </section>
M
style.css
→
style.css
@@ -233,7 +233,8 @@ margin-top: -0.3rem;
overflow: auto; } -code.sourceCode { +code.sourceCode, +pre code { background-color: transparent; border: none; direction: ltr;@@ -466,10 +467,11 @@ max-width: 72ch;
margin: 1rem auto; } -.h-entry { +.h-entry, +.comments { font-size: 0.86rem; padding: 0.6rem; - margin: 0 0 1rem 0; + /*! margin: 0 0 1rem 0; */ } .h-entry header h1 {@@ -527,7 +529,8 @@ margin: 0.3rem 0;
} .h-entry .e-summary { - margin: 0.6rem 0.6rem 0 0.6rem; + margin: 2rem 0.6rem; + font-size: 1rem; } .h-entry .e-summary img {@@ -724,6 +727,57 @@ .footer-contact dl dd:first-of-type {
border-bottom: none; } +.comments { + font-size: 0.9rem; +} + +.comments ol li { + margin: 1rem 0 0 0; +} + +.comments ol li .p-name { + font-weight: bold; + display: block; +} + +.comments ol li time { + font-family: mono; + font-size: 0.7rem; + display: inline-block; +} + +.comments ol li .u-repost-of { + display: block; + font-size: 0.9rem; + border:none; + opacity: 0.7; +} + +.comments ol .u-in-reply-to { + display:none; + visibility:hidden; +} + +.comments dl dt { + display: inline-block; + clear: both; + float:left; +} + +.comments dl dd ul { + padding: 0 0 0 1rem; + list-style-type: none; + display: inline-block; +} +.comments dl dd li { + display: inline-block; +} + +.comments dl dd time { + display:none; + visibility: hidden; +} + @media all and (min-width: 50rem) { .footer-contact, .footer-notes {@@ -792,7 +846,7 @@ .footnotes {
page-break-inside: avoid !important; } - .e-content { + .h-entry { -webkit-columns: 2 20rem; -moz-columns: 2 20rem; columns: 2 20rem;