Cleaned code and added div for mastodon comments

This commit is contained in:
Jeff MacKinnon 2022-05-26 14:39:17 -03:00
parent 13cb47aaef
commit 4da221ebee

View file

@ -51,28 +51,21 @@
{% endif %} {% endif %}
<meta property="og:description" content="{{ article.summary|striptags }}" /> <meta property="og:description" content="{{ article.summary|striptags }}" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<section id="content" class="body"> <section id="content" class="body">
<header> <header>
<h1 class="entry-title"> <h1 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }} {{ translations.translations_for(article) }}
Published: <time class="published" datetime="{{ article.date.isoformat() }}"> Published: <time class="published" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
{{ article.locale_date }}
</time>
{% if article.modified %} {% if article.modified %}
<br />Updated: <time class="modified" datetime="{{ article.modified.isoformat() }}"> <br />Updated: <time class="modified" datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time>
{{ article.locale_modified }}
</time>
{% endif %} {% endif %}
{% if article.authors %} {% if article.authors %}
<address class="vcard author"> <address class="vcard author">By {% for author in article.authors %}
By {% for author in article.authors %}
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %} {% endfor %}
</address><br /> </address><br />
@ -87,15 +80,10 @@ Published: <time class="published" datetime="{{ article.date.isoformat() }}">
{% else %} {% else %}
{% endif %} {% endif %}
{% if article.photo_image %} {% if article.photo_image %}
<img style="max-width:90%; display: block; margin: 0px auto;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" /> <img style="max-width:90%; display: block; margin: 0px auto;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" />
<br /><br /> <br /><br />
{% endif %} {% endif %}
</header> </header>
<div class="entry-content"> <div class="entry-content">
{{ article.content }} {{ article.content }}
@ -108,12 +96,10 @@ Published: <time class="published" datetime="{{ article.date.isoformat() }}">
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% if article.series %} {% if article.series %}
<div class="post series"> <div class="post series">
<br /><br /> <br /><br />
<p>This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:</p> <p>This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:</p>
<ol class="parts"> <ol class="parts">
{% for part_article in article.series.all %} {% for part_article in article.series.all %}
@ -122,12 +108,8 @@ Published: <time class="published" datetime="{{ article.date.isoformat() }}">
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</div> </div>
{% endif %} {% endif %}
<footer class="post-info"> <footer class="post-info">
{% if article.category %} {% if article.category %}
<div class="category"> <div class="category">
@ -143,13 +125,13 @@ Published: <time class="published" datetime="{{ article.date.isoformat() }}">
</div> </div>
{% endif %} {% endif %}
</footer><!-- /.post-info --> </footer><!-- /.post-info -->
{% if MASTODON_COMMENTS is sameas True %} {% if MASTODON_COMMENTS is sameas True %}
<div class="mastodon-comments">
<br /> <br />
<p><strong><a href="{{ SITEURL }}/mastodon-comments/bot.php?title={{ article.title|striptags }}&url={{ SITEURL }}/{{ article.url }}{% if article.photo_image %}&image=../{{ article.photo_image[1] }}{% endif %}">Click Here to Comment on Mastodon.</a></strong></p> <p><strong><a href="{{ SITEURL }}/mastodon-comments/bot.php?title={{ article.title|striptags }}&url={{ SITEURL }}/{{ article.url }}{% if article.photo_image %}&image=../{{ article.photo_image[1] }}{% endif %}">Click Here to Comment on Mastodon.</a></strong></p>
<p>If its your first time commenting, <a href="https://jeffmackinnon.com/commenting-on-blog-with-mastodon.html">click here</a> to figure it out.</p> <p>If its your first time commenting, <a href="https://jeffmackinnon.com/commenting-on-blog-with-mastodon.html">click here</a> to figure it out.</p>
</div>
{% endif %} {% endif %}
</div><!-- /.entry-content --> </div><!-- /.entry-content -->
</section> </section>
{% endblock %} {% endblock %}