summaryrefslogtreecommitdiffstats
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_includes/commentsthread.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/_includes/commentsthread.html b/_includes/commentsthread.html
new file mode 100644
index 0000000..84647f7
--- /dev/null
+++ b/_includes/commentsthread.html
@@ -0,0 +1,79 @@
+{% comment %}
+ argv: id_of_object_whose_posts_you_want,__isinathread
+ return: nothing. outputs html directly.
+{% endcomment %}
+{% capture taplaceholder %}Vpišite besedilo komentarja (markdown omogočen).
+POMEMBNO: Zaradi tehničnih razlogov (veriga blokov) dokončen izbris komentarja (niti vzdevka avtorja) iz Interneta ni mogoč!{% endcapture %}
+{% capture nepodpiraiframe %}Vaš brskalnik ne podpira <pre>iframe</pre> elementa, ki je potreben za vpogled v status oddaje komentarja.{% endcapture %}
+{% capture editnotice %}
+Komentar lahko uredi samo tisti, ki ga je napisal. Komentar uredite v brskalniku, v katerem ste ga napisali. Bodisi piškotek bodisi IP naslov mora biti enak prejšnji oddaji komentarja. Če se objavo uredi še naslednjič, se to lahko stori iz katerega koli IP naslova in piškotka, ki se je uporabil pri predhodnih urejanjih.{% endcapture %}
+{% assign comments = site.data.comments | where: "parent", argv[0] %}
+{% unless argv[1] %}
+ {% assign uid = 0 | minus: 1 %} <!-- začnemo z -1, ker se prvi sam poveča -->
+ {% assign depth = 0 | minus: 1 %} <!-- začnemo z -1, da bo prvi na 0 -->
+{% endunless %}
+{% for comment in comments %}
+ {% assign depth = depth | plus: 1 %}
+ <div class="comment
+ {% assign depthmodulo = depth | modulo: 2 %}
+ {% if 0 == depthmodulo %}
+ odd
+ {% else %}
+ even
+ {% endif %}
+ "> <!-- depth: {{ depth }} -->
+ {% assign argv = comment.date | split: "," %} {% include datumincas.html %}
+ <small class=dimmedtext style=width:100% >
+ V {{ return }} je {{ comment.author || replace: "<", "&lt;" }} komentiral:
+ </small>
+ <p>
+ {{ comment.message | replace: "<", "&lt;" | replace: "!", "&#33;" | markdownify }}
+ </p>
+ <small class=dimmedtext>
+ <a href="mailto:anton@sijanec.eu?subject=Prijava%20neprimernega%20komentarja%20na%20blogu.">
+ prijavi</a>
+ |
+ {% assign uid = uid | plus: 1 %}
+ <label for=checkbox{{ uid }} >
+ <a>
+ odgovori</a>
+ </label>
+ <input type=checkbox id=checkbox{{ uid }} class=commentreplycheckbox >
+ <div hidden=hidden class=commentform>
+ <!--
+ <form target=comstatus{{ uid }} action=/api?m=commentreply type=POST>
+ <input type=text name=vzdevek placeholder="Vzdevek pošiljatelja" />
+ <input type=submit value=Objavi! />
+ <textarea placeholder="{{ taplaceholder }}" name=message ></textarea>
+ {% assign thisid = "comment|" | append: comment.author | append: "|" | append: comment.date %}
+ <input type=hidden name=parent value="{{ thisid | replace: '"', "&quot;" }}" />
+ <iframe id=comstatus{{ uid }}>{{ nepodpiraiframe }}</iframe>
+ </form>
+ -->
+ Objavljanje komentarjev še ni izdelano.
+ </div>
+ |
+ <label for=edit{{ uid }}>
+ <a>uredi</a>
+ </label>
+ <input type=checkbox id=edit{{ uid }} class=commentreplycheckbox >
+ <div class=commentform >
+ <!--
+ <form action=POST action=/api?m=commentedit target=editstatus{{ uid }} >
+ <input type=text name=vzdevek value="{{ comment.author | replace: '"', "&quot;" }}" />
+ <input type=submit value=Uredi! />
+ <textarea placeholder="{{ taplaceholder }}{{editnotice}}" name=message ></textarea>
+ <input type=hidden name=commentid value="{{ thisid | replace: '"', '&quot;' }}"/>
+ <iframe id=editstatus{{ uid }} >{{ nepodpiraiframe }}</iframe>
+ </form>
+ -->
+ Urejanje komentarjev še ni izdelano.
+ </div>
+ </small>
+ {% assign argv = "true" | split: "," %}
+ {% assign argv = argv | unshift: thisid %}
+ {% include commentsthread.html %}
+ </div>
+ {% assign depth = depth | minus: 1 %}
+{% endfor %}
+{% assign return = uid | plus: 1 %}