forked from rc/aircox
radiocampus: misc adjustments
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
<div id="grandlogo"><a href="/"><img /></a></div>
|
||||
<div id="grandlogo" class="container"><a href="/"><img /></a></div>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
@ -17,3 +17,9 @@
|
||||
{{ block.super }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header-cover %}
|
||||
{% if cover and not "emissions/episodes" in request.path %}
|
||||
<img src="{{ cover }}" ref="cover" class="cover">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -21,3 +21,22 @@
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block secondary-nav %}
|
||||
{% if not parent and categories %}
|
||||
<nav class="nav secondary">
|
||||
<div class="nav-menu nav-categories">
|
||||
{% for cat in categories %}
|
||||
<a class="nav-item{% if cat == category %} active{% endif %}"
|
||||
href="{% url request.resolver_match.url_name category_slug=cat.slug %}">
|
||||
{{ cat.title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a-switch class="button burger"
|
||||
el=".nav-categories" group="nav" icon="fas fa-tags"
|
||||
aria-label="{% translate "Categories" %}">
|
||||
</a-switch>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -30,10 +30,14 @@ function display(id) {
|
||||
|
||||
if (id == "homedisplay") {
|
||||
for(var i = 0; i < h.length; i++) { h[i].setAttribute('style', 'display:inline !important'); }
|
||||
for(var i = 0; i < h.length; i++) { r[i].setAttribute('style', 'display:none !important'); }
|
||||
for(var i = 0; i < r.length; i++) { r[i].setAttribute('style', 'display:none !important'); }
|
||||
document.getElementById('recent-link').classList.remove('active');
|
||||
document.getElementById('home-link').classList.add('active');
|
||||
} else {
|
||||
for(var i = 0; i < h.length; i++) { h[i].setAttribute('style', 'display:none !important'); }
|
||||
for(var i = 0; i < h.length; i++) { r[i].setAttribute('style', 'display:inline !important'); }
|
||||
for(var i = 0; i < r.length; i++) { r[i].setAttribute('style', 'display:inline !important'); }
|
||||
document.getElementById('recent-link').classList.add('active');
|
||||
document.getElementById('home-link').classList.remove('active');
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +73,7 @@ function display(id) {
|
||||
<!-- <a href="{% url "timetable-list" date=date %}">{{ date|date:"l d F Y" }}</a> -->
|
||||
<section class="clear-both list grid radiocampus-grid" role="list">
|
||||
</section>
|
||||
{% with list_class="radiocampus-grid" %}
|
||||
{% with list_class="list-home" %}
|
||||
{{ block.super }}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
@ -19,8 +19,7 @@ content.
|
||||
{% block header %}{% if page %}{{ block.super }}{% endif %}{% endblock %}
|
||||
|
||||
{% block secondary-nav %}
|
||||
{% if not parent and categories %}
|
||||
{% else %}
|
||||
{% if '/pages/' in request.path %}
|
||||
<nav class="nav secondary">
|
||||
<div class="nav-menu nav-categories">
|
||||
{% nav_items "secondary" css_class="nav-item" active_class="active" as items %}
|
||||
|
@ -28,7 +28,7 @@
|
||||
{% with list_class="grid" %}
|
||||
<section class="container clear-both list grid list-grille list-home list-emissions" role="list">
|
||||
<section class="container" style="display:flex;justify-content:flex-end;min-height:600px">
|
||||
<div>
|
||||
<div class="fifty">
|
||||
{% block list %}
|
||||
{% with object_list=object_list timetable=True %}
|
||||
{% with widget|default:"item" as widget %}
|
||||
|
@ -32,7 +32,7 @@
|
||||
</span>
|
||||
</br>
|
||||
|
||||
<section class="content flex-grow-1">
|
||||
<section class="content flex-grow-1 item-section">
|
||||
{% block content %}{{ block.super }}{% endblock %}
|
||||
</section>
|
||||
{% block actions-container %}{{ block.super }}{% endblock %}
|
||||
|
71
radiocampus/templates/aircox/widgets/preview.html
Normal file
71
radiocampus/templates/aircox/widgets/preview.html
Normal file
@ -0,0 +1,71 @@
|
||||
{% 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 %}">{% translate "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
|
||||
{% endblock %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</{{ tag|default:"article" }}>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user