Skip to content

Commit 2197c66

Browse files
authored
Merge pull request #287 from scala/add-events-page
add events page
2 parents fa4f079 + f6e7106 commit 2197c66

File tree

5 files changed

+147
-12
lines changed

5 files changed

+147
-12
lines changed

_data/events.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
scala_lunches:
2+
description: |
3+
The Scala Lunches are a series of talks on Scala and related topics.
4+
They are held once per month at EPFL in Lausanne, Switzerland.
5+
The talks are open to everyone and are free of charge.
6+
The talks are in English.
7+
events:
8+
- date: 8 May 2023
9+
time: "12:00pm"
10+
place: BC 410, EPFL
11+
speaker: # to be announced
12+
title: # to be announced
13+
- date: 12 June 2023
14+
time: "12:00pm"
15+
place: BC 410, EPFL
16+
speaker: # to be announced
17+
title: # to be announced
18+
- date: 10 July 2023
19+
time: "12:00pm"
20+
place: BC 410, EPFL
21+
speaker: # to be announced
22+
title: # to be announced
23+
- date: 4 September 2023
24+
time: "12:00pm"
25+
place: BC 410, EPFL
26+
speaker: # to be announced
27+
title: # to be announced
28+
- date: 2 October 2023
29+
time: "12:00pm"
30+
place: BC 410, EPFL
31+
speaker: # to be announced
32+
title: # to be announced
33+
- date: 13 November 2023
34+
time: "12:00pm"
35+
place: BC 410, EPFL
36+
speaker: # to be announced
37+
title: # to be announced
38+
- date: 11 December 2023
39+
time: "12:00pm"
40+
place: BC 410, EPFL
41+
speaker: # to be announced
42+
title: # to be announced

_includes/event-block.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<table class="col-md-12">
2+
<thead>
3+
<tr>
4+
<th class="col-xs-2">Date</th>
5+
<th class="col-xs-3">Speaker</th>
6+
<th class="col-xs-4">Title</th>
7+
<th class="col-xs-2">Place</th>
8+
<th class="col-xs-1">Time</th>
9+
</tr>
10+
</thead>
11+
<tbody>
12+
{% for event in events %}
13+
<tr class="card">
14+
<td>
15+
<span class="status ongoing fl-right">
16+
{{event.date}}
17+
</span>
18+
</td>
19+
<td>
20+
{% if event.speaker.size > 0 %}
21+
<span class="speaker">{{event.speaker}}</span>
22+
{% else %}
23+
<span class="speaker">Speaker TBA...</span>
24+
{% endif %}
25+
</td>
26+
<td>
27+
{% if event.title.size > 0 %}
28+
<span class="title">{{event.title}}</span>
29+
{% else %}
30+
<span class="title">Talk title TBA...</span>
31+
{% endif %}
32+
</td>
33+
<td>
34+
<span class="place">{{event.place}}</span>
35+
</td>
36+
<td>
37+
<span class="place">{{event.time}}</span>
38+
</td>
39+
</tr>
40+
{% endfor %}
41+
</tbody>
42+
</table>

events.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: page
3+
---
4+
<div class="row mb-30">
5+
<!-- <div class="col-md-12 search">
6+
<input class="col-xs-12 form-control" value="" placeholder="Search an Event..." type="text">
7+
</div>-->
8+
9+
<div class="col-md-12">
10+
<p>Events organised by, or in collaboration with, the Scala Center</p>
11+
</div>
12+
<div class="clearfix"></div>
13+
14+
<div class="cards">
15+
{% assign events = site.data.events.scala_lunches.events %}
16+
<div class="col-md-12 title scala-lunches">
17+
<h2>Scala Lunches at EPFL</h2>
18+
<p>{{site.data.events.scala_lunches.description}}</p>
19+
</div>
20+
<div class="card-list scala-lunches">
21+
{% include event-block.html %}
22+
</div>
23+
<!-- <div class="col-md-12 no-results">
24+
<h3>No results found</h3>
25+
</div> -->
26+
</div>
27+
28+
</div>

resources/css/main.scss

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,11 @@ body.home {
563563
}
564564

565565
/* HOME OUR PROJECTS */
566-
.projects {
566+
.cards {
567567
padding-left: 1%;
568568
padding-top: 10px;
569-
.project {
569+
570+
.card, .project {
570571
position: relative;
571572
width: 18%;
572573
float: left;
@@ -727,8 +728,8 @@ body.home {
727728

728729
/* Projects Mobile */
729730
@media (max-width: $screen-md) {
730-
.projects {
731-
.project {
731+
.cards {
732+
.card, .project {
732733
width: 48% !important;
733734
}
734735
}
@@ -920,7 +921,19 @@ div.search {
920921
}
921922
}
922923

923-
.projects, .description-dialog {
924+
/* UTILITIES */
925+
926+
.fl-right {
927+
float: right;
928+
}
929+
930+
.mb-30 {
931+
margin-bottom: 30px;
932+
}
933+
934+
/* CARDS */
935+
936+
.cards, .description-dialog {
924937
margin-top: 10px;
925938
@media(max-width: 991px) {
926939
margin-top: 25px;
@@ -954,15 +967,25 @@ div.search {
954967
}
955968

956969
.project {
957-
background-color: #fafafa;
958-
border-radius: 3px;
959-
padding: 40px 30px 0px 30px;
960-
margin-bottom: 30px;
961-
word-wrap: break-word;
962-
963970
.project-logo {
964971
max-height: 40px;
965972
}
973+
}
974+
975+
tr.card {
976+
border-bottom: 1px solid #e6e6e6;
977+
978+
td {
979+
padding: 0 5px;
980+
}
981+
}
982+
983+
.card, .project {
984+
background-color: #fafafa;
985+
border-radius: 3px;
986+
padding: 0px 30px 0px 30px;
987+
margin-bottom: 5px;
988+
word-wrap: break-word;
966989

967990
.status {
968991
font-size: 12px;

resources/css/sass/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ a:hover {
9797

9898
#main {
9999
overflow:auto;
100-
padding-bottom:350px; /* this needs to be bigger than footer height*/
100+
padding-bottom:360px; /* this needs to be bigger than footer height*/
101101
}

0 commit comments

Comments
 (0)