Skip to content

Commit 1a15588

Browse files
committed
Add awards to event pages
1 parent 65d9ebc commit 1a15588

File tree

3 files changed

+60
-63
lines changed

3 files changed

+60
-63
lines changed

setup.cfg

Lines changed: 0 additions & 20 deletions
This file was deleted.

website/templates/events/_years.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% load wagtailroutablepage_tags %}
2-
<div class="hidden sm:block min-w-32 bg-white shadow-xs rounded-lg overflow-hidden text-center">
2+
<div class="hidden md:block min-w-32 bg-white shadow-xs rounded-lg overflow-hidden text-center">
33
<h2 class="text-lg font-semibold py-4 border-b bg-blue text-white">Season</h2>
44
<ul class="flex flex-col p-2">
55
{% for year in years %}
@@ -11,7 +11,7 @@ <h2 class="text-lg font-semibold py-4 border-b bg-blue text-white">Season</h2>
1111
</ul>
1212
</div>
1313

14-
<div x-data="{ seasonMenuOpen: false }" class="block sm:hidden relative">
14+
<div x-data="{ seasonMenuOpen: false }" class="block md:hidden relative">
1515
<button @click="seasonMenuOpen = !seasonMenuOpen"
1616
type="button"
1717
class="inline-flex items-center gap-x-1 text-lg font-semibold text-blue"

website/templates/events/event_page.html

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{% extends "base.html" %}
2-
{% load blog_tags wagtailcore_tags wagtailimages_tags wagtailroutablepage_tags %}
2+
{% load blog_tags static wagtailcore_tags wagtailimages_tags wagtailroutablepage_tags %}
33

44
{% block nav_classes %}border-b-2 border-gray-100{% endblock %}
55

66
{% block content %}
77
<div class="px-4 md:px-6 lg:px-8 mx-auto grid grid-cols-1 md:grid-cols-5 md:grid-rows-5 grid-flow-row gap-4">
8-
98
<div class="pt-4 lg:pt-6 md:col-span-4">
109
<span class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{{ event.name }}</span>
1110
<div class="mt-3 sm:mt-4 max-w-prose">
@@ -108,47 +107,65 @@
108107
</p>
109108
</a>
110109
</div>
111-
<div class="md:col-span-4 pt-4 max-w-prose">{{ event.body|richtext }}</div>
112-
113-
<nav class="md:col-span-5 px-4 md:px-6 lg:px-8 flex items-center justify-between border-t border-gray-200 mt-4">
114-
<div class="-mt-px flex w-0 flex-1">
115-
{% if previous_event %}
116-
<a href="{% routablepageurl page 'event_for_key' previous_event.key %}"
117-
class="inline-flex items-center border-t-2 border-transparent pt-4 pr-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
118-
<svg class="mr-3 size-5 text-gray-400"
119-
viewBox="0 0 20 20"
120-
fill="currentColor"
121-
aria-hidden="true"
122-
data-slot="icon">
123-
<path fill-rule="evenodd" d="M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z" clip-rule="evenodd" />
124-
</svg>
125-
Previous Event
126-
</a>
110+
{% if event.awards or event.body %}
111+
<div class="border border-gray-200 rounded-lg shadow-xs bg-white h-fit md:col-span-4 py-4 md:py-6 row-span-2 px-6 max-w-prose">
112+
{% if event.awards %}
113+
<ul class="pb-2 md:pb-4">
114+
{% for award in event.awards %}
115+
<li>
116+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="text-yellow inline-block size-6">
117+
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0" />
118+
</svg>
119+
{{ award.name }}
120+
</li>
121+
{% endfor %}
127122
{% endif %}
128-
</div>
129-
130-
<div class="hidden md:-mt-px md:flex">
131-
<a href="{% routablepageurl page 'events_for_year' event.year %}"
132-
class="inline-flex items-center border-t-2 border-transparent pt-4 pl-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
133-
{{ event.year }} Events</a>
134-
</div>
123+
</ul>
124+
<p>
125+
{{ event.body|richtext }}
126+
</p>
127+
</div>
128+
{% endif %}
135129

136-
<div class="-mt-px flex w-0 flex-1 justify-end">
137-
{% if next_event %}
138-
<a href="{% routablepageurl page 'event_for_key' next_event.key %}"
139-
class="inline-flex items-center border-t-2 border-transparent pt-4 pl-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
140-
Next Event
141-
<svg class="ml-3 size-5 text-gray-400"
142-
viewBox="0 0 20 20"
143-
fill="currentColor"
144-
aria-hidden="true"
145-
data-slot="icon">
146-
<path fill-rule="evenodd" d="M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z" clip-rule="evenodd" />
147-
</svg>
148-
</a>
149-
{% endif %}
150-
</div>
151-
</nav>
152130
</div>
153131

132+
<nav class="md:col-span-4 px-4 md:px-6 lg:px-8 flex items-center justify-between border-t border-gray-200 mt-4">
133+
<div class="-mt-px flex w-0 flex-1">
134+
{% if previous_event %}
135+
<a href="{% routablepageurl page 'event_for_key' previous_event.key %}"
136+
class="inline-flex items-center border-t-2 border-transparent pt-4 pr-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
137+
<svg class="mr-3 size-5 text-gray-400"
138+
viewBox="0 0 20 20"
139+
fill="currentColor"
140+
aria-hidden="true"
141+
data-slot="icon">
142+
<path fill-rule="evenodd" d="M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z" clip-rule="evenodd" />
143+
</svg>
144+
Previous Event
145+
</a>
146+
{% endif %}
147+
</div>
148+
149+
<div class="hidden md:-mt-px md:flex">
150+
<a href="{% routablepageurl page 'events_for_year' event.year %}"
151+
class="inline-flex items-center border-t-2 border-transparent pt-4 pl-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
152+
{{ event.year }} Events</a>
153+
</div>
154+
155+
<div class="-mt-px flex w-0 flex-1 justify-end">
156+
{% if next_event %}
157+
<a href="{% routablepageurl page 'event_for_key' next_event.key %}"
158+
class="inline-flex items-center border-t-2 border-transparent pt-4 pl-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700">
159+
Next Event
160+
<svg class="ml-3 size-5 text-gray-400"
161+
viewBox="0 0 20 20"
162+
fill="currentColor"
163+
aria-hidden="true"
164+
data-slot="icon">
165+
<path fill-rule="evenodd" d="M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z" clip-rule="evenodd" />
166+
</svg>
167+
</a>
168+
{% endif %}
169+
</div>
170+
</nav>
154171
{% endblock content %}

0 commit comments

Comments
 (0)