Show country names and flags on conference page
This commit is contained in:
parent
fd46f0a405
commit
17036d849f
3 changed files with 29 additions and 6 deletions
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block style %}
|
||||
{% set column_count = 7 %}
|
||||
<style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, auto); /* 7 columns for each piece of information */
|
||||
grid-template-columns: repeat({{ column_count }}, auto); /* 7 columns for each piece of information */
|
||||
gap: 10px;
|
||||
justify-content: start;
|
||||
}
|
||||
|
|
@ -14,12 +15,13 @@
|
|||
}
|
||||
|
||||
.heading {
|
||||
grid-column: 1 / 7; /* Spans from the 1st line to the 7th line */
|
||||
grid-column: 1 / {{ column_count + 1 }}; /* Spans from the 1st line to the 7th line */
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% macro row(item, badge) %}
|
||||
{% set country = get_country(item.country) if item.country else None %}
|
||||
<div class="grid-item text-end">{{ item.start.strftime("%a, %d %b %Y") }}</div>
|
||||
<div class="grid-item text-end">{{ item.end.strftime("%a, %d %b") }}</div>
|
||||
<div class="grid-item">{{ item.name }}
|
||||
|
|
@ -37,6 +39,17 @@
|
|||
</div>
|
||||
<div class="grid-item">{{ item.topic }}</div>
|
||||
<div class="grid-item">{{ item.location }}</div>
|
||||
<div class="grid-item">
|
||||
{% if country %}
|
||||
{{ country.flag }} {{ country.name }}
|
||||
{% elif item.online %}
|
||||
💻 Online
|
||||
{% else %}
|
||||
<span class="text-bg-danger p-2">
|
||||
country code <strong>{{ item.country }}</strong> not found
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid-item"><a href="{{ item.url }}">{{ item.url }}</a></div>
|
||||
{% endmacro %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue