Skip to content

Commit 41da9b1

Browse files
committed
Add season fly-out menu for events, remove includes
1 parent 42ee4b9 commit 41da9b1

File tree

5 files changed

+200
-94
lines changed

5 files changed

+200
-94
lines changed

website/static/css/main.css

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,10 @@ select {
16291629
top: 3rem;
16301630
}
16311631

1632+
.z-10 {
1633+
z-index: 10;
1634+
}
1635+
16321636
.z-20 {
16331637
z-index: 20;
16341638
}
@@ -1641,10 +1645,6 @@ select {
16411645
grid-column: span 1 / span 1;
16421646
}
16431647

1644-
.col-span-4 {
1645-
grid-column: span 4 / span 4;
1646-
}
1647-
16481648
.-m-3 {
16491649
margin: -0.75rem;
16501650
}
@@ -1715,6 +1715,10 @@ select {
17151715
margin-top: 1rem;
17161716
}
17171717

1718+
.mt-5 {
1719+
margin-top: 1.25rem;
1720+
}
1721+
17181722
.mt-6 {
17191723
margin-top: 1.5rem;
17201724
}
@@ -1816,6 +1820,10 @@ select {
18161820
width: 1.25rem;
18171821
}
18181822

1823+
.w-56 {
1824+
width: 14rem;
1825+
}
1826+
18191827
.w-6 {
18201828
width: 1.5rem;
18211829
}
@@ -1865,6 +1873,11 @@ select {
18651873
max-width: 28rem;
18661874
}
18671875

1876+
.max-w-min {
1877+
max-width: -moz-min-content;
1878+
max-width: min-content;
1879+
}
1880+
18681881
.max-w-prose {
18691882
max-width: 65ch;
18701883
}
@@ -1885,6 +1898,10 @@ select {
18851898
flex-shrink: 0;
18861899
}
18871900

1901+
.shrink {
1902+
flex-shrink: 1;
1903+
}
1904+
18881905
.grow-0 {
18891906
flex-grow: 0;
18901907
}
@@ -2007,6 +2024,11 @@ select {
20072024
gap: 2rem;
20082025
}
20092026

2027+
.gap-x-1 {
2028+
-moz-column-gap: 0.25rem;
2029+
column-gap: 0.25rem;
2030+
}
2031+
20102032
.gap-x-8 {
20112033
-moz-column-gap: 2rem;
20122034
column-gap: 2rem;
@@ -2118,6 +2140,10 @@ select {
21182140
border-radius: 0.375rem;
21192141
}
21202142

2143+
.rounded-xl {
2144+
border-radius: 0.75rem;
2145+
}
2146+
21212147
.rounded-l-md {
21222148
border-top-left-radius: 0.375rem;
21232149
border-bottom-left-radius: 0.375rem;
@@ -2370,6 +2396,11 @@ select {
23702396
line-height: 1.25rem;
23712397
}
23722398

2399+
.text-sm\/6 {
2400+
font-size: 0.875rem;
2401+
line-height: 1.5rem;
2402+
}
2403+
23732404
.text-xl {
23742405
font-size: 1.25rem;
23752406
line-height: 1.75rem;
@@ -2522,6 +2553,10 @@ select {
25222553
--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1));
25232554
}
25242555

2556+
.ring-gray-900\/5 {
2557+
--tw-ring-color: rgb(17 24 39 / 0.05);
2558+
}
2559+
25252560
.ring-opacity-5 {
25262561
--tw-ring-opacity: 0.05;
25272562
}
@@ -2544,6 +2579,12 @@ select {
25442579
transition-duration: 150ms;
25452580
}
25462581

2582+
.transition-opacity {
2583+
transition-property: opacity;
2584+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2585+
transition-duration: 150ms;
2586+
}
2587+
25472588
.duration-150 {
25482589
transition-duration: 150ms;
25492590
}
@@ -2552,6 +2593,10 @@ select {
25522593
transition-duration: 200ms;
25532594
}
25542595

2596+
.duration-300 {
2597+
transition-duration: 300ms;
2598+
}
2599+
25552600
.ease-in {
25562601
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
25572602
}
@@ -2560,6 +2605,10 @@ select {
25602605
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
25612606
}
25622607

2608+
.ease-linear {
2609+
transition-timing-function: linear;
2610+
}
2611+
25632612
.richtext-image.full-width {
25642613
width: 100%;
25652614
}
@@ -2771,14 +2820,14 @@ input#id_phone_number, label[for='id_phone_number'] {
27712820
order: 0;
27722821
}
27732822

2774-
.sm\:col-span-2 {
2775-
grid-column: span 2 / span 2;
2776-
}
2777-
27782823
.sm\:col-span-1 {
27792824
grid-column: span 1 / span 1;
27802825
}
27812826

2827+
.sm\:col-span-2 {
2828+
grid-column: span 2 / span 2;
2829+
}
2830+
27822831
.sm\:col-span-4 {
27832832
grid-column: span 4 / span 4;
27842833
}
@@ -2800,6 +2849,10 @@ input#id_phone_number, label[for='id_phone_number'] {
28002849
margin-left: 1.5rem;
28012850
}
28022851

2852+
.sm\:ml-auto {
2853+
margin-left: auto;
2854+
}
2855+
28032856
.sm\:mt-0 {
28042857
margin-top: 0px;
28052858
}
@@ -2812,8 +2865,8 @@ input#id_phone_number, label[for='id_phone_number'] {
28122865
margin-top: 1rem;
28132866
}
28142867

2815-
.sm\:ml-auto {
2816-
margin-left: auto;
2868+
.sm\:block {
2869+
display: block;
28172870
}
28182871

28192872
.sm\:flex {
@@ -2828,6 +2881,10 @@ input#id_phone_number, label[for='id_phone_number'] {
28282881
display: inline-grid;
28292882
}
28302883

2884+
.sm\:hidden {
2885+
display: none;
2886+
}
2887+
28312888
.sm\:h-10 {
28322889
height: 2.5rem;
28332890
}
@@ -2973,10 +3030,6 @@ input#id_phone_number, label[for='id_phone_number'] {
29733030
grid-column: span 4 / span 4;
29743031
}
29753032

2976-
.md\:row-span-2 {
2977-
grid-row: span 2 / span 2;
2978-
}
2979-
29803033
.md\:row-span-3 {
29813034
grid-row: span 3 / span 3;
29823035
}

website/templates/events/_date.html

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

website/templates/events/_links.html

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

website/templates/events/_years.html

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% load wagtailroutablepage_tags %}
2-
<div class="min-w-32 bg-white shadow-sm rounded-lg overflow-hidden text-center">
2+
<div class="hidden sm:block min-w-32 bg-white shadow-sm 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 %}
@@ -10,3 +10,34 @@ <h2 class="text-lg font-semibold py-4 border-b bg-blue text-white">Season</h2>
1010
{% endfor %}
1111
</ul>
1212
</div>
13+
14+
<div x-data="{ seasonMenuOpen: false }" class="block sm:hidden relative">
15+
<button @click="seasonMenuOpen = !seasonMenuOpen"
16+
type="button"
17+
class="inline-flex items-center gap-x-1 text-lg font-semibold text-blue"
18+
aria-expanded="false">
19+
<span>Season</span>
20+
<svg class="size-5"
21+
viewBox="0 0 20 20"
22+
fill="currentColor"
23+
aria-hidden="true"
24+
data-slot="icon">
25+
<path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
26+
</svg>
27+
</button>
28+
<div x-show="seasonMenuOpen"
29+
x-transition:enter="transition ease-out duration-200"
30+
x-transition:enter-start="opacity-0 translate-y-1"
31+
x-transition:enter-end="opacity-100 translate-y-0"
32+
x-transition:leave="transition ease-in duration-150"
33+
x-transition:leave-start="opacity-100 translate-y-0"
34+
x-transition:leave-end="opacity-0 translate-y-1"
35+
class="absolute left-1/2 z-10 mt-5 flex w-screen max-w-min -translate-x-1/2 px-4">
36+
<div class="w-56 shrink rounded-xl bg-white p-4 text-sm/6 font-semibold text-gray-900 shadow-lg ring-1 ring-gray-900/5">
37+
{% for year in years %}
38+
<a href="{% routablepageurl page 'events_for_year' year %}"
39+
class="block p-2 hover:text-indigo-600">{{ year }}</a>
40+
{% endfor %}
41+
</div>
42+
</div>
43+
</div>

0 commit comments

Comments
 (0)