Skip to content

Commit 11e2159

Browse files
committed
Add summary to event detail page
1 parent bcbdba5 commit 11e2159

File tree

3 files changed

+116
-87
lines changed

3 files changed

+116
-87
lines changed

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
transparent: "transparent",
99
current: "currentColor",
1010
black: colors.black,
11+
red: colors.red,
1112
white: colors.white,
1213
gray: colors.gray,
1314
yellow: {

website/static/css/main.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,14 @@ select {
17151715
margin-top: 2rem;
17161716
}
17171717

1718+
.mr-8 {
1719+
margin-right: 2rem;
1720+
}
1721+
1722+
.mr-4 {
1723+
margin-right: 1rem;
1724+
}
1725+
17181726
.block {
17191727
display: block;
17201728
}
@@ -2298,6 +2306,14 @@ select {
22982306
padding-top: 1.25rem;
22992307
}
23002308

2309+
.pl-4 {
2310+
padding-left: 1rem;
2311+
}
2312+
2313+
.pr-4 {
2314+
padding-right: 1rem;
2315+
}
2316+
23012317
.text-center {
23022318
text-align: center;
23032319
}
@@ -2907,6 +2923,10 @@ input#id_phone_number, label[for='id_phone_number'] {
29072923
margin-top: 0px;
29082924
}
29092925

2926+
.md\:mt-10 {
2927+
margin-top: 2.5rem;
2928+
}
2929+
29102930
.md\:block {
29112931
display: block;
29122932
}
@@ -2984,6 +3004,10 @@ input#id_phone_number, label[for='id_phone_number'] {
29843004
margin-left: 0px;
29853005
}
29863006

3007+
.lg\:mt-10 {
3008+
margin-top: 2.5rem;
3009+
}
3010+
29873011
.lg\:block {
29883012
display: block;
29893013
}

website/templates/events/event_page.html

Lines changed: 91 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -6,104 +6,108 @@
66
{% block content %}
77
<div class="relative pt-4 lg:pt-6 px-6 sm:px-6 lg:px-8">
88
<div class="mx-auto max-w-7xl">
9-
<div>
10-
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{{ event.name }}</h2>
11-
<div class="mt-3 sm:mt-4 max-w-prose">
12-
<p class="text-xl text-gray-500">
13-
{{ event.start_date }} to {{ event.end_date }}
14-
{% if week %}
15-
<a href="https://www.thebluealliance.com/events/{{ event.year }}#week-{{ week }}"
16-
target="_blank"><span class="inline-flex items-center rounded-full bg-yellow px-3 py-0.5 text-lg font-medium text-gray-900">week {{ week }}</span>
17-
</a>
18-
{% endif %}
19-
</p>
9+
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{{ event.name }}</h2>
2010
</div>
21-
</div>
11+
<div class="grid md:grid-cols-2 items-center mx-auto max-w-7xl">
12+
<div class="mr-8">
13+
<div>
14+
<div class="mt-3 sm:mt-4 max-w-prose">
15+
<p class="text-xl text-gray-500">
16+
{{ event.start_date }} to {{ event.end_date }}
17+
{% if week %}
18+
<a href="https://www.thebluealliance.com/events/{{ event.year }}#week-{{ week }}"
19+
target="_blank"><span class="inline-flex items-center rounded-full bg-yellow px-3 py-0.5 text-lg font-medium text-gray-900">week {{ week }}</span>
20+
</a>
21+
{% endif %}
22+
</p>
23+
</div>
24+
</div>
25+
26+
{% if event.event_type > 0 %}
27+
<a href="https://www.thebluealliance.com/event/{{ event.year }}{{ event.event_code }}"
28+
target="_blank"
29+
rel="noreferrer noopener"
30+
class="flex items-start mt-4 hover:bg-gray-50">
31+
<svg version="1.1"
32+
stroke="currentColor"
33+
fill="currentColor"
34+
class="w-6 h-6 text-blue"
35+
xmlns="http://www.w3.org/2000/svg"
36+
x="0px"
37+
y="0px"
38+
width="72px"
39+
height="112px"
40+
viewBox="0 0 72 112">
41+
<g>
42+
<g>
43+
<rect x="8" y="20" width="6" height="64" />
44+
</g>
45+
<g>
46+
<rect x="58" y="20" width="6" height="64" />
47+
</g>
48+
<g>
49+
<path d="M36,112C20.561,112,8,99.439,8,84h6c0,12.131,9.869,22,22,22V112z" />
50+
</g>
51+
<g>
52+
<path d="M36,112v-6c12.131,0,22-9.869,22-22h6C64,99.439,51.439,112,36,112z" />
53+
</g>
54+
<g>
55+
<rect x="33" y="20" width="6" height="89" />
56+
</g>
57+
<g>
58+
<rect x="11" y="78" width="50" height="6" />
59+
</g>
60+
<g>
61+
<rect x="11" y="50" width="50" height="6" />
62+
</g>
63+
<g id="Lamp_Rectangle_4_">
64+
<path d="M72,24c0,2.2-1.8,4-4,4H4c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h64c2.2,0,4,1.8,4,4V24z" />
65+
</g>
66+
</g>
67+
</svg>
68+
69+
<p class="ml-1">
70+
<span class="text-blue">{{ event.name }}</span>
71+
</p>
72+
</a>
73+
{% endif %}
2274

23-
{% if event.event_type > 0 %}
24-
<a href="https://www.thebluealliance.com/event/{{ event.year }}{{ event.event_code }}"
75+
<a href="{{ event.gmaps_url }}"
2576
target="_blank"
2677
rel="noreferrer noopener"
2778
class="flex items-start mt-4 hover:bg-gray-50">
28-
<svg version="1.1"
79+
<svg xmlns="http://www.w3.org/2000/svg"
80+
fill="none"
81+
viewBox="0 0 24 24"
82+
stroke-width="1.5"
2983
stroke="currentColor"
30-
fill="currentColor"
31-
class="w-6 h-6 text-blue"
32-
xmlns="http://www.w3.org/2000/svg"
33-
x="0px"
34-
y="0px"
35-
width="72px"
36-
height="112px"
37-
viewBox="0 0 72 112">
38-
<g>
39-
<g>
40-
<rect x="8" y="20" width="6" height="64" />
41-
</g>
42-
<g>
43-
<rect x="58" y="20" width="6" height="64" />
44-
</g>
45-
<g>
46-
<path d="M36,112C20.561,112,8,99.439,8,84h6c0,12.131,9.869,22,22,22V112z" />
47-
</g>
48-
<g>
49-
<path d="M36,112v-6c12.131,0,22-9.869,22-22h6C64,99.439,51.439,112,36,112z" />
50-
</g>
51-
<g>
52-
<rect x="33" y="20" width="6" height="89" />
53-
</g>
54-
<g>
55-
<rect x="11" y="78" width="50" height="6" />
56-
</g>
57-
<g>
58-
<rect x="11" y="50" width="50" height="6" />
59-
</g>
60-
<g id="Lamp_Rectangle_4_">
61-
<path d="M72,24c0,2.2-1.8,4-4,4H4c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h64c2.2,0,4,1.8,4,4V24z" />
62-
</g>
63-
</g>
84+
class="w-6 h-6 text-blue">
85+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z" />
86+
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z" />
6487
</svg>
65-
6688
<p class="ml-1">
67-
<span class="text-blue">{{ event.name }}</span>
89+
<span class="text-blue">{{ event.location_name }}</span> in {{ event.city }}, {{ event.state_prov }}
6890
</p>
6991
</a>
70-
{% endif %}
71-
72-
<a href="{{ event.gmaps_url }}"
73-
target="_blank"
74-
rel="noreferrer noopener"
75-
class="flex items-start mt-4 hover:bg-gray-50">
76-
<svg xmlns="http://www.w3.org/2000/svg"
77-
fill="none"
78-
viewBox="0 0 24 24"
79-
stroke-width="1.5"
80-
stroke="currentColor"
81-
class="w-6 h-6 text-blue">
82-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z" />
83-
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z" />
84-
</svg>
85-
<p class="ml-1">
86-
<span class="text-blue">{{ event.location_name }}</span> in {{ event.city }}, {{ event.state_prov }}
87-
</p>
88-
</a>
89-
90-
<a href="{{ event.website }}"
91-
target="_blank"
92-
rel="noreferrer noopener"
93-
class="flex items-start mt-4 hover:bg-gray-50">
94-
<svg xmlns="http://www.w3.org/2000/svg"
95-
fill="none"
96-
viewBox="0 0 24 24"
97-
stroke-width="1.5"
98-
stroke="currentColor"
99-
class="w-6 h-6 text-blue">
100-
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244" />
101-
</svg>
102-
<p class="ml-1">
103-
<span class="text-blue">{{ event.website }}</span>
104-
</p>
105-
</a>
10692

93+
<a href="{{ event.website }}"
94+
target="_blank"
95+
rel="noreferrer noopener"
96+
class="flex items-start mt-4 hover:bg-gray-50">
97+
<svg xmlns="http://www.w3.org/2000/svg"
98+
fill="none"
99+
viewBox="0 0 24 24"
100+
stroke-width="1.5"
101+
stroke="currentColor"
102+
class="w-6 h-6 text-blue">
103+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244" />
104+
</svg>
105+
<p class="ml-1">
106+
<span class="text-blue">{{ event.website }}</span>
107+
</p>
108+
</a>
109+
</div>
110+
<div class="pr-4 mt-4 text-l text-gray-600 max-w-prose">{{ event.body|richtext }}</div>
107111
</div>
108112
</div>
109113

0 commit comments

Comments
 (0)