Skip to content

Commit e9933ef

Browse files
author
Florent Biville
committed
Display HCP site thumbnails in event sections
1 parent 3b55e18 commit e9933ef

File tree

5 files changed

+26
-14
lines changed

5 files changed

+26
-14
lines changed

_data/events.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
upcoming:
22
- name: Paris 2020
33
url: https://paris2020.hack-commit-pu.sh/
4-
5-
- name: More to come
4+
img: hcp-paris-2020.png
65

76
past:
87
- name: Paris 2019
9-
url: https://paris2019.hack-commit-pu.sh/
8+
url: https://paris2019.hack-commit-pu.sh/
9+
img: hcp-paris-2019.png

_includes/_events.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
{% if event.url != nil %}
1515
<a href="{{event.url}}" rel="noopener" target="_blank">
1616
{% endif %}
17-
<span class="wow bounceIn name">{{event.name}}</span>
17+
{% if event.img != nil %}
18+
<img src="img/{{event.img}}" alt="{{event.name}} website thumbnail" />
19+
{% endif %}
20+
<div>{{event.name}}</div>
1821
{% if event.url != nil %}
1922
</a>
2023
{% endif %}

css/main.scss

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,26 @@ header .header-content {
211211
}
212212

213213
.event {
214-
height: 10vh;
215-
width: 10vh;
216-
&, a {
217-
margin: 0 auto;
218-
display: flex;
219-
justify-content: center;
220-
align-items: center;
214+
display: inline-flex;
215+
max-width: 100%;
216+
217+
img {
218+
max-width: 100%;
219+
}
220+
221+
div {
222+
display:none;
223+
padding: 2%;
224+
font-size: 1.5em;
221225
}
222-
.name {
223-
margin-bottom: 0;
224-
}
226+
}
227+
228+
a:hover > div {
229+
display: inline-block;
230+
position: absolute;
231+
left: 50%;
232+
top: 20%;
233+
transform: translate(-50%,-50%);
225234
}
226235
}
227236

img/hcp-paris-2019.png

64.8 KB
Loading

img/hcp-paris-2020.png

112 KB
Loading

0 commit comments

Comments
 (0)