aboutsummaryrefslogtreecommitdiff
path: root/sphinx_ascii_theme/postinfo.html
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx_ascii_theme/postinfo.html')
-rw-r--r--sphinx_ascii_theme/postinfo.html91
1 files changed, 91 insertions, 0 deletions
diff --git a/sphinx_ascii_theme/postinfo.html b/sphinx_ascii_theme/postinfo.html
new file mode 100644
index 0000000..8effd2a
--- /dev/null
+++ b/sphinx_ascii_theme/postinfo.html
@@ -0,0 +1,91 @@
+ {% if pagename in ablog %}
+ <div class="postcard">
+ {% set fa = ablog.fontawesome %}
+ {% set post = ablog[pagename] %}
+
+ <ul>
+ <li>
+ {% if post.published %}
+ {% if fa %}<i class="fa fa-calendar"></i>{% endif %}
+ {{gettext('Published on') }}: <br/> {{ post.date.strftime(ablog.post_date_format) }}
+ {% else %}
+ {% if fa %}<i class="fa fa-pencil"></i>{% endif %}
+ {% if post.date %}{{gettext('Draft from') }}: <br/> {{ post.date.strftime(ablog.post_date_format) }}
+ {% else %} {{ gettext('Draft') }} {% endif %}
+ {% endif %}
+ </li>
+
+ {% if post.published and post.date != post.update %}
+ <li id="published" ><span>{% if fa %}<i class="fa fa-pencil-square-o"></i>{% else %}{{ gettext('Update') }}:{% endif %}</span>
+ {{ post.update.strftime(ablog.post_date_format) }}</li>
+ {% endif %}
+
+ {% if post.author %}
+ <!-- usless since I'm the onlu author
+ <li id="author"><span>{% if fa %}<i class="fa-fw fa fa-user"></i>{% else %}{{ gettext('Author') }}:{% endif %}</span>
+ {% for coll in post.author %}
+ {% if coll|length %}
+ <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.author|length %},{% endif %}
+ {% else %}{{ coll }}{% if loop.index < post.author|length %},{% endif %}{% endif %}
+ {% endfor %}</li>
+ -->
+ {% endif %}
+
+ {% if post.location %}
+ <li id="location"><span>{% if fa %}<i class="fa-fw fa fa-location-arrow"></i>{% else %}{{ gettext('Location') }}:{% endif %}</span>
+ {% for coll in post.location %}
+ {% if coll|length %}
+ <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.location|length %},{% endif %}
+ {% else %}{{ coll }}{% if loop.index < post.location|length %},{% endif %}{% endif %}
+ {% endfor %}</li>
+ {% endif %}
+
+ {% if post.language %}
+ <li id="language"><span>{% if fa %}<i class="fa-fw fa fa-language"></i>{% else %}{{ gettext('Language') }}:{% endif %}</span>
+ {% for coll in post.language %}
+ {% if coll|length %}
+ <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.language|length %},{% endif %}
+ {% else %}{{ coll }}{% if loop.index < post.language|length %},{% endif %}{% endif %}
+ {% endfor %}</li>
+ {% endif %}
+
+ {% if post.category %}
+ <li id="category"><span>{% if fa %}<i class="fa-fw fa fa-folder-open"></i>{% else %}{{ gettext('Category') }}:{% endif %}</span>
+ {% for coll in post.category %}
+ {% if coll|length %}
+ <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.category|length %},{% endif %}
+ {% else %}{{ coll }}{% if loop.index < post.category|length %},{% endif %}{% endif %}
+ {% endfor %}</li>
+ {% endif %}
+
+ {% if post.tags %}
+ <li id="tags"><span>{% if post.tags|length > 1 %}{% if fa %}<i class="fa-fw fa fa-tags"></i>{% else %}{{ gettext('Tags') }}:{% endif %}
+ {% else %}{% if fa %}<i class="fa-fw fa fa-tag"></i>{% else %}{{ gettext('Tag') }}:{% endif %}{% endif %}</span>
+ {% for coll in post.tags %}
+ {% if coll|length %}
+ <a href="{{ pathto(coll.docname) }}">{{ coll }}</a>{% if loop.index < post.tags|length %}{% endif %}
+ {% else %}{{ coll }}{% if loop.index < post.tags|length %}{% endif %}{% endif %}
+ {% endfor %}</li>
+ {% endif %}
+ {% if ablog.disqus_shortname and (ablog[pagename].published or ablog.disqus_drafts) %}
+ <li id="comments">
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = '{{ ablog.disqus_shortname }}'; // required: replace example with your forum shortname
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function () {
+ var s = document.createElement('script'); s.async = true;
+ s.type = 'text/javascript';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+ }());
+ </script>
+ {% if fa %}<i class="fa-fw fa fa-comments"></i>{% endif %}
+ <a href="{% if pagename != post.docname%}{{ pathto(post.docname) }}{% endif %}#disqus_thread" data-disqus-identifier="/{{post.docname}}/"> {% if not fa %}Comments{% endif %}</a>
+ </li>
+ {% endif %}
+
+ </ul>
+</div>
+{% endif %}