forked from rc/aircox
72 lines
2.2 KiB
HTML
72 lines
2.2 KiB
HTML
{% load i18n %}
|
|
{% comment %}
|
|
Content related context:
|
|
- object: object to display
|
|
- cover: cover
|
|
- title: title
|
|
- subtitle: subtitle
|
|
- content: content to display
|
|
|
|
Components:
|
|
- no_cover: don't show cover
|
|
- no_content: don't show content
|
|
|
|
Styling related context:
|
|
- is_active: add "active" css class
|
|
- is_small: add "small" css class
|
|
- is_tiny: add "tiny" css class
|
|
- tag
|
|
- tag_class: css class to set to main tag
|
|
- tag_extra: extra tag attributes
|
|
|
|
{% endcomment %}
|
|
{% load aircox %}
|
|
|
|
{% block outer %}
|
|
<{{ tag|default:"article" }} id="{{ object|object_id }}" class="preview {% if not cover %}no-cover {% endif %}{% if is_active %}active {% endif %}{% if is_tiny %}tiny{% elif is_small %}small{% endif %}{% block tag-class %}{{ tag_class|default:"" }} {% endblock %}" {% block tag-extra %}{% endblock %}>
|
|
{% block inner %}
|
|
{% block headings-container %}
|
|
<header class="headings{% block headings-class %}{% endblock %}"{% block headings-tag-extra %}{% endblock %}>
|
|
{% block headings %}
|
|
{% block title-container %}
|
|
<a href="{{ url|escape }}" class="heading title {% block title-class %}{% endblock %}"{% if title %} title="{{ title|escape }}"{% endif %}>
|
|
{% block title %}{{ title|default:"" }}{% endblock %}
|
|
</a>
|
|
{% endblock %}
|
|
{% block subtitle-container %}
|
|
<span class="heading subtitle {% block subtitle-class %}{% endblock %}">
|
|
{% block subtitle %}{{ subtitle|default:"" }}{% endblock %}
|
|
</span>
|
|
{% endblock %}
|
|
{% endblock %}
|
|
</header>
|
|
{% endblock %}
|
|
|
|
{% block content-container %}
|
|
<section class="content headings-container">
|
|
{% block content %}
|
|
{% if content and not no_content %}
|
|
{% autoescape off %}
|
|
{{ content|striptags|linebreaks }}
|
|
{% endautoescape %}
|
|
{% endif %}
|
|
|
|
|
|
{% spaceless %}
|
|
<div class="actions">
|
|
{% block actions %}
|
|
{% if admin and object.edit_url_name %}
|
|
<a href="{% url object.edit_url_name pk=object.pk %}" target="_self">{% translate "Edit" %}</a>
|
|
{% endif %}
|
|
{% endblock %}
|
|
</div>
|
|
{% endspaceless %}
|
|
|
|
{% endblock %}
|
|
</section>
|
|
{% endblock %}
|
|
|
|
{% endblock %}
|
|
</{{ tag|default:"article" }}>
|
|
{% endblock %}
|