Add more mobile-friendly schedule
This commit is contained in:
parent
84238b241c
commit
aae03d26ba
4 changed files with 68 additions and 4 deletions
30
pinaxcon/templates/symposion/schedule/_mobile.html
Normal file
30
pinaxcon/templates/symposion/schedule/_mobile.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% load lca2018_tags %}
|
||||
{% load lca2019_tags %}
|
||||
{% load waffle_tags %}
|
||||
|
||||
|
||||
{% for row in timetable %}
|
||||
{% if forloop.last %}
|
||||
{% else %}
|
||||
{% for slot in row.slots %}
|
||||
<div class="mobile-slot my-3" style="border-bottom: 1px solid #CCD5C5;">
|
||||
{% if forloop.first %}
|
||||
<h3>{{ row.time|date:"h:iA" }}</h3>
|
||||
{% endif %}
|
||||
{% with slot.kind.label.lower as label %}
|
||||
{% if label == "talk" or label == "tutorial" %}
|
||||
{% if slot.content %}
|
||||
<p><a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a></p>
|
||||
<p>{{ slot.content.speakers|join:", "}}</p>
|
||||
{% listlookup timetable.rooms forloop.counter0 as value %}
|
||||
<p><em>Theatre {{ value }}<br />ends {{ slot.end }}</em></p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>{{ slot.kind.label }}</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="bg-secondary text-primary pt-4 pb-4 mb-0">
|
||||
<div class="schedule-page bg-secondary text-primary pt-4 pb-4 mb-0">
|
||||
<div class="container">
|
||||
<div class="tab-content">
|
||||
{% for section in sections %}
|
||||
|
@ -44,11 +44,16 @@
|
|||
role="tabpanel"
|
||||
aria-labelledby="schedule_day_{{ timetable.day.date|date:"l"|lower}}-tab"
|
||||
>
|
||||
<div class="table-responsive hidden-md-down">
|
||||
{% cache 180 cache-schedule timetable.day.date %}
|
||||
<div class="table-responsive">
|
||||
{% include "symposion/schedule/_grid.html" %}
|
||||
</div>
|
||||
{% endcache %}
|
||||
</div>
|
||||
<div class="hidden-md-up">
|
||||
{% cache 180 cache-schedule-mobile timetable.day.date %}
|
||||
{% include "symposion/schedule/_mobile.html" %}
|
||||
{% endcache %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -21,4 +21,12 @@ def any_is_void(invoices):
|
|||
for invoice in invoices:
|
||||
if invoice.is_void:
|
||||
return True
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def listlookup(lookup, target):
|
||||
try:
|
||||
return lookup[target]
|
||||
except IndexError:
|
||||
return ''
|
|
@ -607,4 +607,25 @@ hr {
|
|||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.schedule-page {
|
||||
@include media-breakpoint-down(lg) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(md) {
|
||||
.hidden-md-down {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.hidden-md-up {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue