Skip to content

Commit 2446915

Browse files
Created get_host_sponsor.html - include to easily get host sponsor (treated as a foreign key for an event) from the list of sponsors for an event.
Used the above include in post.html and event_layout.html. Modified post__title style to fit new title content (smaller font size). Adjusted lat / lng parameters for some sponsors as they were not matching the real building's position. Removed project_description yml variable from all events (not needed). Added subtitle to all events - short description with little bit more details than the title has. Added logic to change chapters to full screen view if no future events are present (otherwise they occupy only the right hand side half of the screen leaving the left side empty).
1 parent 74b74c3 commit 2446915

26 files changed

+58
-371
lines changed

_includes/event_layout.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{% else %}
1111
{% assign image = "static/images/events/default_image_800x800px.jpeg" %}
1212
{% endif %}
13+
{% include get_host_sponsor.html event = include.post %}
1314
<style>
1415
{{ post_id_selector }} {
1516
background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("{{ site.baseurl }}/{{ image }}");
@@ -24,18 +25,18 @@
2425
<div class="no-gutters__col col-md-12 container-fluid">
2526
<div class="events-page__event-container row">
2627
<div id="{{ post_id }}" class="events-page__img-container col-md-7 col-sm-12">
27-
<h1 class="post__title">{{ include.post.project }}</h1>
28-
<h2 class="post__subtitle"><em>{{ include.post.project_description }}</em></h2>
28+
<h1 class="post__title">{{ include.post.title }}</h1>
29+
<h2 class="post__subtitle">{{ include.post.subtitle }}</h2>
2930
</div>
3031
<div class="events-page__event-col col-md-5 col-12">
3132
<div class="row">
3233
<div class="no-gutters__col col-6">
33-
<h2 class="post__label">Event</h2>
34+
<h2 class="post__label">Project</h2>
3435
</div>
3536
</div>
3637
<div class="row">
3738
<div class="post__event-title col-12">
38-
{{ include.post.title }}
39+
{{ include.post.project }}
3940
</div>
4041
</div>
4142

@@ -46,7 +47,7 @@ <h2 class="post__label">Venue</h2>
4647
</div>
4748
<div class="row">
4849
<div class="post__event-title col-12">
49-
{{ include.post.venue }}
50+
{{ host_sponsor.name }}
5051
</div>
5152
</div>
5253

_includes/get_host_sponsor.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% comment %}
2+
get_host_sponsor.html (event):
3+
4+
Obtain host sponsor object for the event.
5+
6+
Get the event's foreign key sponsors and use its first object in the array
7+
as host sponsor object.
8+
9+
Parameters:
10+
event: jekyll post object
11+
Post object containing yml variable sponsors.
12+
13+
Returns:
14+
host_sponsor: sponsor object
15+
Object from collection sponsors.
16+
{% endcomment %}
17+
18+
{% assign host_sponsor_id = include.event.sponsors | first %}
19+
{% assign host_sponsor = site.sponsors | where:"obj_id", host_sponsor_id | first %}

_layouts/post.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{% else %}
77
{% assign image = "static/images/events/default_image_800x800px.jpeg" %}
88
{% endif %}
9+
{% include get_host_sponsor.html event = page %}
910
<style>
1011
.post__img-container {
1112
background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("{{ site.baseurl }}/{{ image }}");
@@ -25,18 +26,21 @@
2526
<div class="no-gutters__col col-md-12 container-fluid">
2627
<div class="row">
2728
<div class="post__img-container col-md-7 col-sm-12">
28-
<h1 class="post__title">{{ page.project }}</h1>
29-
<h2 class="post__subtitle"><em>{{ page.project_description }}</em></h2>
29+
<!--<h1 class="post__title">{{ page.project }}</h1>-->
30+
<h1 class="post__title">{{ page.title }}</h1>
31+
<!--<h2 class="post__subtitle"><em>{{ page.project_description }}</em></h2>-->
32+
<h2 class="post__subtitle">{{ page.subtitle }}</h2>
3033
</div>
3134
<div class="post__event-col col-md-5 col-12">
3235
<div class="row">
3336
<div class="no-gutters__col col-6">
34-
<h2 class="post__label">Event</h2>
37+
<!--<h2 class="post__label">Event</h2>-->
38+
<h2 class="post__label">Project</h2>
3539
</div>
3640
</div>
3741
<div class="row">
3842
<div class="post__event-title col-12">
39-
{{ page.title }}
43+
{{ page.project }}
4044
</div>
4145
</div>
4246

@@ -47,7 +51,7 @@ <h2 class="post__label">Venue</h2>
4751
</div>
4852
<div class="row">
4953
<div class="post__event-title col-12">
50-
{{ page.venue }}
54+
{{ host_sponsor.name }}
5155
</div>
5256
</div>
5357

@@ -98,9 +102,8 @@ <h2 class="post__label">Date</h2>
98102
<h1 class="post__content-title">{{ page.title }}</h1>
99103
<p class="post__paragraph">{{ page.content }}</p>
100104
<hr class="post__divider">
101-
<h1 class="post__content-title">Event's location</h1>
102-
{% assign host_sponsor_id = page.sponsors | first %}
103-
{% assign host_sponsor = site.sponsors | where:"obj_id", host_sponsor_id | first %}
105+
<h1 class="post__content-title">When & Where</h1>
106+
<p class="post__address-title">{{ page.date | date: "%e %B %Y" }}, {{ page.time }}</p>
104107
<p class="post__address-title">{{ host_sponsor.name }}</p>
105108
<p class="post__address">{{ host_sponsor.address }}</p>
106109
<div class="chapters__content row">

_sass/post.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
.post__title {
1111
@extend .title-light;
12-
word-break: break-all;
1312
padding-top: 15vh;
1413
text-align: center;
15-
font-size: 3em;
14+
font-size: 2em;
1615
}
1716
.post__subtitle {
1817
@extend .subtitle;

_sponsors/bloomberg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: "Bloomberg"
44
logo: static/images/sponsors/bloomberg.png
55
link: https://www.bloomberg.com/careers/
66
address: "3 Queen Victoria St<br/>London, EC4N 4TQ, UK"
7-
lat: 51.520363
8-
lng: -0.086270
7+
lat: 51.5128245
8+
lng: -0.0910801
99
permanent: true
1010
---
1111
Bloomberg L.P. provides financial software tools such as an analytics and equity trading platform, data services, and news to financial companies and organizations through the Bloomberg Terminal (via its Bloomberg Professional Service), its core revenue-generating product.

_sponsors/zopa.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ obj_id: zopa
33
name: "Zopa"
44
logo: static/images/sponsors/zopa.png
55
link: https://www.zopa.com/
6+
address: "Cottons Centre, Tooley St<br>London, SE1 2QG, UK"
7+
lat: 51.5060532
8+
lng: -0.0847395
69
permanent: false
710
---
811
Zopa provide loans and offer competitive rates, flexible and intuitive products and award-winning customer service. They strive to make money simple and fair for everyone – to enable people to do more with their money and take control of their finances.

chapters_events/london_python_sprints/_posts/2017-10-04-Bokeh-As-A-Backend-For-Pandas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Bokeh as a backend for Pandas
3+
subtitle: Implementing Bokeh plotting as Pandas API
34
project: Pandas
4-
project_description: Powerful Python data analysis toolkit
55
date: 2017-10-04
6-
venue: Harvey Nash
6+
time: "18:30"
77
meetup_link: https://www.meetup.com/Python-Sprints/events/243422372/
88
image: static/images/events/pandas_bokeh_backend_harvey_nash_960x539px.jpeg
99
sponsors:

chapters_events/london_python_sprints/_posts/2017-10-24-PyMC3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: PyMC3 - beginner friendly issues
3+
subtitle: Solving "good first issue" tickets
34
project: PyMC3
4-
project_description: Bayesian Modeling and Probabilistic Machine Learning with Theano
55
date: 2017-10-24
6-
venue: Zopa
6+
time: "18:30"
77
meetup_link: https://www.meetup.com/Python-Sprints/events/244062594/
88
image: static/images/events/pymc3_zopa_960x539px.jpeg
99
sponsors:

chapters_events/london_python_sprints/_posts/2017-11-01-www.python.org-Part1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22

33
title: python.org (Part 1)
4+
subtitle: Improving python.org website
45
project: python.org
5-
project_description: Official Python Software Foundation website
66
date: 2017-11-01
7-
venue: Bloomberg
7+
time: "18:30"
88
meetup_link: https://www.meetup.com/Python-Sprints/events/244388482/
99
image: static/images/events/python_dot_org_part1_bloomberg_960x539px.jpeg
1010
sponsors:

chapters_events/london_python_sprints/_posts/2017-12-06-python-dateutil.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: python-dateutil issues
3+
subtitle: Fixing issues of all levels
34
project: date-util
4-
project_description: Powerful extensions to datetime
55
date: 2017-12-06
6-
venue: Bloomberg
6+
time: "18:00"
77
meetup_link: https://www.meetup.com/Python-Sprints/events/245317647/
88
image: static/images/events/dateutil_bloomberg_960x539px.jpeg
99
sponsors:

0 commit comments

Comments
 (0)