update publication info

This commit is contained in:
bkfox 2017-03-31 16:35:39 +02:00
parent a62ae13079
commit 99709c4f51
6 changed files with 300 additions and 234 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

File diff suppressed because it is too large Load Diff

View File

@ -406,14 +406,22 @@ main .body ~ section:not(.comments) {
display: inline-block; display: inline-block;
} }
.meta > .share {
margin-top: 0.8em;
}
.meta .author .summary { .meta .author .summary {
display: none; display: none;
} }
.meta .link_list > a {
font-size: 0.9em;
margin: 0em 0.1em;
padding: 0.2em;
line-height: 1.4em;
}
.meta .link_list > a:hover {
border-radius: 0.2em;
background-color: rgba(0, 126, 223, 0.1);
}
/** content: others **/ /** content: others **/
.list_item.track .title { .list_item.track .title {

View File

@ -5,39 +5,68 @@
{% load wagtailsettings_tags %} {% load wagtailsettings_tags %}
{% block content %} {% block content %}
{% spaceless %}
<div class="meta"> <div class="meta">
<div class="link_list">
<img src="{% static "aircox/images/home.png" %}"
alt="{% trans "Parent pages" %}"
title="{% trans "Parent pages" %}"
class="small_icon">
{% for page in page.get_ancestors %}
{% if not forloop.first %}
<a href="{{ page.url }}">{{ page.title }}</a>
{% if not forloop.last %} &gt; {% endif %}
{% endif %}
{% endfor %}
</div>
{% with list_page=settings.cms.WebsiteSettings.list_page %}
{% if list_page and page.tags.count %}
<div class="link_list tags">
<img src="{% static "aircox/images/tags.png" %}"
alt="{% trans "Tags" %}"
title="{% trans "Tags" %}"
class="small_icon">
{% for tag in page.tags.all %}
<a href="{{ list_page }}?tag={{ tag }}">{{ tag }}</a>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</div>
{% endif %}
{% endwith %}
<div class="author"> <div class="author">
{% if page.publish_as %} {% if page.publish_as %}
{% with item=page.publish_as item_date_format='' %} {% with item=page.publish_as item_date_format='' %}
{% include "aircox_cms/snippets/list_item.html" %} {% include "aircox_cms/snippets/list_item.html" %}
{% endwith %} {% endwith %}
{% elif page.owner %} {% elif page.owner %}
{% trans "Published by" %} <img src="{% static "aircox/images/info.png" %}"
{{ page.owner }} alt="{% trans "Author" %}"
title="{% trans "Author" %}"
class="small_icon">
{% blocktrans with author=page.owner trimmed %}
Published by {{ author }}
{% endblocktrans %}
{% endif %} {% endif %}
</div> </div>
{% with page_date=page.specific.date %} {% with page_date=page.specific.date %}
{% if page_date %} {% if page_date %}
<time datetime="{{ page_date }}"> <time datetime="{{ page_date }}">
<b>{% trans "Published on " %}</b> <img src="{% static "aircox/images/calendar_day.png" %}"
alt="{% trans "Date of publication" %}"
title="{% trans "Date of publication" %}"
class="small_icon">
{{ page_date|date:'l d F, H:i' }} {{ page_date|date:'l d F, H:i' }}
</time> </time>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% with list_page=settings.cms.WebsiteSettings.list_page %} <div class="share link_list">
{% if list_page and page.tags.count %} <img src="{% static "aircox/images/share.png" %}"
<div class="tags"><b>{% trans "Tags" %}</b> alt="{% trans "Share" %}"
{% for tag in page.tags.all %} title="{% trans "Share" %}" class="small_icon">
<a href="{{ list_page }}?tag={{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<div class="share">
<img src="{% static "aircox/images/share.png" %}" alt="{% trans "Share" %}"
class="small_icon">
<a href="mailto:?&body={{ page.full_url|urlencode }}" <a href="mailto:?&body={{ page.full_url|urlencode }}"
target="new"> target="new">
<img src="{% static "aircox/images/mail.png" %}" alt="Mail" class="small_icon"> <img src="{% static "aircox/images/mail.png" %}" alt="Mail" class="small_icon">
@ -56,5 +85,6 @@
</a> </a>
</div> </div>
</div> </div>
{% endspaceless %}
{% endblock %} {% endblock %}