Skip to content

Commit fd2dfa5

Browse files
author
Florent Biville
committed
Improve event display
1 parent 16facfa commit fd2dfa5

File tree

3 files changed

+23
-29
lines changed

3 files changed

+23
-29
lines changed

_data/events.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
upcoming:
22
- name: Paris 2020
33
url: https://paris-2020.hack-commit-pu.sh/
4-
short_desc: 👋 Join us<br/>on June 6th! 👋
54

65
- name: More to come
7-
url: https://hack-commit-pu.sh/
8-
short_desc: 👂 Stay Tuned! 👂
96

107
past:
118
- name: Paris 2019
12-
url: https://paris-2019.hack-commit-pu.sh/
13-
short_desc: 🚀 1st edition<br/>...ever! 🚀
9+
url: https://paris-2019.hack-commit-pu.sh/

_includes/_events.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
<div class="grid_item col-xs-12 col-sm-4">
1111
{% endif %}
1212
{% endif %}
13-
<a href="{{event.url}}" rel="noopener" target="_blank">
14-
<p class="wow bounceIn name">{{event.name}}</p>
15-
<p class="short_desc">{{event.short_desc}}</span></p>
16-
</a>
13+
<div class="event">
14+
{% if event.url != nil %}
15+
<a href="{{event.url}}" rel="noopener" target="_blank">
16+
{% endif %}
17+
<span class="wow bounceIn name">{{event.name}}</span>
18+
{% if event.url != nil %}
19+
</a>
20+
{% endif %}
21+
</div>
1722
</div>
1823
{% endfor %}
1924
</div>

css/main.scss

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -210,36 +210,29 @@ header .header-content {
210210
margin-bottom: 2vh;
211211
}
212212

213-
a {
214-
min-height: 15vh;
215-
width: 75%;
216-
margin: 0 auto;
217-
display: flex;
218-
flex-direction: column;
219-
.name {
220-
font-weight: bold;
221-
}
222-
.short_desc {
223-
color: $text-color;
224-
visibility: hidden;
225-
}
226-
}
227-
228-
a:hover {
229-
.short_desc {
230-
visibility: visible;
213+
.event {
214+
height: 10vh;
215+
width: 10vh;
216+
&, a {
217+
margin: 0 auto;
218+
display: flex;
219+
justify-content: center;
220+
align-items: center;
231221
}
222+
.name {
223+
margin-bottom: 0;
224+
}
232225
}
233226
}
234227

235228
#upcoming {
236-
a {
229+
.event {
237230
background-color: $theme-primary;
238231
}
239232
}
240233

241234
#past {
242-
a {
235+
.event {
243236
background-color: $secondary-color;
244237
}
245238
}

0 commit comments

Comments
 (0)