aboutsummaryrefslogtreecommitdiff
path: root/sphinx_ascii_theme/postinfo.html
blob: 8effd2a8ce254b38ea29153738903ed3502b5770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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 %}