mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 00:01:36 +01:00
remove event container remnant if there are no events
This commit is contained in:
@@ -1,46 +1,50 @@
|
||||
{% if events %}
|
||||
<div class="col grid-margin-md stretch-card d-flex_" style="font-size: x-large;">
|
||||
<div class="card bg-transparent border-0">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between"></div>
|
||||
{% for event in events %}
|
||||
<div class="moreDates" {% if loop.index > 3 %} style="display: none;" {% endif %}>
|
||||
<div class="row">
|
||||
<div class="event-responsive pt-1 border-bottom
|
||||
{% if loop.index == 1 %} border-top {% endif %} col">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<h1 class="mr-5 font-weight-bold text-color-special date-responsive ">
|
||||
{{ event["day"] }}
|
||||
</h1>
|
||||
<div>
|
||||
<p class="font-weight-bold mb-0 text-dark">{{ event["month"] }}</p>
|
||||
<p class="mb-2">{{ event["year"] }}</p>
|
||||
<div class="bg-secondary">
|
||||
<div class="container container-responsive pb-2 pt-2">
|
||||
<div class="col grid-margin-md stretch-card d-flex_" style="font-size: x-large;">
|
||||
<div class="card bg-transparent border-0">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between"></div>
|
||||
{% for event in events %}
|
||||
<div class="moreDates" {% if loop.index > 3 %} style="display: none;" {% endif %}>
|
||||
<div class="row">
|
||||
<div class="event-responsive pt-1 border-bottom
|
||||
{% if loop.index == 1 %} border-top {% endif %} col">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<h1 class="mr-5 font-weight-bold text-color-special date-responsive ">
|
||||
{{ event["day"] }}
|
||||
</h1>
|
||||
<div>
|
||||
<p class="font-weight-bold mb-0 text-dark">{{ event["month"] }}</p>
|
||||
<p class="mb-2">{{ event["year"] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-1 border-bottom {% if loop.index == 1 %} border-top {% endif %} col pl-3">
|
||||
<p class="event-responsive text-dark font-weight-bold mb-0">
|
||||
{{ event["description"] }}
|
||||
{% if event.get("location") %} @{{ event["location"] }} {% endif %}
|
||||
</p>
|
||||
<p class="mb-0">{{ event["time"] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-1 border-bottom {% if loop.index == 1 %} border-top {% endif %} col pl-3">
|
||||
<p class="event-responsive text-dark font-weight-bold mb-0">
|
||||
{{ event["description"] }}
|
||||
{% if event.get("location") %} @{{ event["location"] }} {% endif %}
|
||||
</p>
|
||||
<p class="mb-0">{{ event["time"] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if moreEvents %}
|
||||
<button id="moreDatesButton" class="float-right mt-3 btn btn-light" onClick=showAdditionalDates()>Mehr..</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if moreEvents %}
|
||||
<button id="moreDatesButton" class="float-right mt-3 btn btn-light" onClick=showAdditionalDates()>Mehr..</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- mehr Termine Button -->
|
||||
<script>
|
||||
function showAdditionalDates(){
|
||||
Array.from(document.getElementsByClassName("moreDates")).forEach(element => {
|
||||
element.style.display = "";
|
||||
});
|
||||
document.getElementById("moreDatesButton").style.display = "none"
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mehr Termine Button -->
|
||||
<script>
|
||||
function showAdditionalDates(){
|
||||
Array.from(document.getElementsByClassName("moreDates")).forEach(element => {
|
||||
element.style.display = "";
|
||||
});
|
||||
document.getElementById("moreDatesButton").style.display = "none"
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
@@ -30,11 +30,8 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="bg-secondary">
|
||||
<div class="container container-responsive pb-2 pt-2">
|
||||
{% include 'events.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- events -->
|
||||
{% include 'events.html' %}
|
||||
|
||||
<!-- picture links -->
|
||||
{% if mainLinks %}
|
||||
|
||||
Reference in New Issue
Block a user