Skip to content

Commit bb01dec

Browse files
Merge branch 'add_sponsors_logos_to_upcoming_event'
2 parents c8351bd + db8965d commit bb01dec

File tree

5 files changed

+119
-30
lines changed

5 files changed

+119
-30
lines changed

_posts/2018-03-10-Pandas-Documentation-Sprint.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ layout: post
33
title: Pandas documentation sprint (worldwide)
44
project: Pandas
55
project_description: Powerful Python data analysis toolkit
6+
project_logo: static/images/events/pandas_logo_donation.png
7+
project_link: http://pandas.pydata.org/index.html
68
date: 2018-03-10
79
venue: Bloomberg (London)
810
meetup_link: https://www.meetup.com/Python-Sprints/events/247097848/
911
event_link: https://python-sprints.github.io/pandas/
1012
image: static/images/events/pandas_documentation_sprint_1280_720px.jpg
11-
project_logo: static/images/events/pandas_logo_donation.png
1213

1314
sponsors:
1415
- bloomberg
1516
- python_software_foundation
17+
- numfocus
1618
---
1719

1820
Pandas is an open source Python library for data manipulation and analysis. Its popularity is skyrocketing, and it is becoming the de-facto standard for data science and data engineering. But the number of core developers and contributors did not grow as fast as its popularity, and things like the API documentation would benefit from some help.

_sass/style.scss

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -297,22 +297,22 @@ a {
297297
}
298298

299299
.upcoming__col {
300-
margin-top: 1%;
301300
background: rgba(0, 0, 0, 0.7);
302-
border-radius: 20px 5px 20px 5px;
303-
box-shadow: black 5px 5px 5px 0;
301+
border-radius: 5px;
302+
border: #000000 2px ridge;
303+
box-shadow: rgba(0, 0, 0, 0.76) 5px 5px 5px 0;
304304
}
305305

306306
@media (min-width: 768px) {
307307
.upcoming__col {
308-
margin-left: 0.5%;
308+
margin-left: 5.5%;
309309
}
310310
}
311311

312-
.upcoming-title {
312+
.upcoming__title {
313313
font-size: 2.5em;
314314
color: antiquewhite;
315-
text-align: left;
315+
text-align: center;
316316
font-family: 'Encode Sans Expanded', sans-serif;
317317
margin-top: 2.5%;
318318
margin-bottom: 2.5%;
@@ -333,43 +333,60 @@ a {
333333
.upcoming__img-container {
334334
background-size: cover;
335335
background-position: center center;
336-
border-radius: 20px 5px 20px 5px;
336+
border-radius: 20px;
337337
border-top: #A55605 3px solid;
338338
border-bottom: #A55605 3px solid;
339339
min-height: 50vh;
340340
}
341341

342-
@media (min-width: 768px) {
343-
min-height: 60vh;
342+
.upcoming__content {
343+
margin-top: 5.5%;
344344
}
345345

346346
.upcoming__logo-col {
347-
flex: 1;
347+
padding-right: 0;
348+
padding-left: 0;
349+
margin-top: 1em;
350+
box-shadow: rgba(0, 0, 0, 0.76) 5px 5px 5px 0;
348351
}
349352

353+
@media (min-width: 768px) {
354+
.upcoming__logo-col {
355+
margin-top: 0;
356+
margin-right: 5.5%;
357+
}
358+
}
359+
360+
350361
.upcoming__project-logo {
351-
margin-top: 5%;
362+
margin: 0.5em;
352363
border: #A55605 3px double;
353364
border-radius: 5px;
354365
max-width: 50%;
355-
;
356366
}
357367

358-
@media (min-width: 768px) {
359-
.upcoming__project-logo {
360-
margin-top: 2.5%;
361-
margin-left: 2.5%;
362-
}
368+
.upcoming__sponsor-list {
369+
background: rgba(7, 41, 72, 0.7);
370+
border: #072948 2px ridge;
371+
border-radius: 5px;
372+
}
373+
374+
.upcoming__sponsor-title {
375+
color: antiquewhite;
376+
font-family: 'Encode Sans Expanded', sans-serif;
377+
font-size: 2.5em;
378+
padding-top: 2.5%;
379+
margin-bottom: 2.5%;
363380
}
364381

365382
.upcoming__button-row {
366383
margin-top: 10%;
367-
margin-bottom: 5%;
384+
margin-bottom: 5.5%;
368385
}
369386

370387
@media (min-width: 768px) {
371388
.upcoming__button-row {
372-
margin-top: 5%;
389+
margin-top: 5.5%;
373390
}
374391
}
375392

@@ -388,7 +405,7 @@ a {
388405
&:hover {
389406
color: antiquewhite;
390407
background: rgba(0, 0, 0, 0.4);
391-
border: antiquewhite 1px solid;
408+
border: #A55605 1px solid;
392409
}
393410
}
394411

@@ -602,6 +619,8 @@ a {
602619

603620
.footer__sponsor-col {
604621
text-align: center;
622+
padding-left: 0;
623+
padding-right: 0;
605624
}
606625

607626
.footer__icon {
@@ -637,7 +656,7 @@ a {
637656
display: inline-block;
638657
line-height: 102px;
639658
vertical-align: middle;
640-
margin: 1%;
659+
margin: 0.5em 1% 0.5em 1%;
641660
width: 75%;
642661
height: 102px;
643662
&:hover > .footer__img {

_sponsors/numfocus.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
sponsor_id: numfocus
3+
sponsor_name: "NumFOCUS"
4+
sponsor_logo: static/images/sponsors/numfocus.png
5+
sponsor_link: https://www.numfocus.org/
6+
permanent: false
7+
---
8+
NumFOCUS is a non-profit based in Austin, Texas. Their mission is to promote high-quality, reproducible scientific research by supporting open source scientific computing and data science projects. They are sponsors for such projects as Pandas, Numpy, Jupyter and many more.

index.html

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ <h3 class="mission__statement">Provide mentorship and challenge for people of al
5252
<div class="row container-fluid">
5353
<hr class="upcoming-divider">
5454
<div class="upcoming__img-container col-md-12">
55-
<div class="row">
56-
<div class="upcoming__col col-md-5 col-12">
57-
<h2 class="upcoming-title">Upcoming Event</h2>
55+
<div class="upcoming__content row">
56+
<div class="upcoming__col col-md-5 col-12 mr-auto">
57+
<h2 class="upcoming__title">Upcoming Event</h2>
5858
<div class="row">
5959
<div class="no-gutters__col col-3">
6060
<h2 class="post__label">Event</h2>
@@ -76,7 +76,6 @@ <h2 class="post__label">Venue</h2>
7676
{{ post.venue }}
7777
</div>
7878
</div>
79-
8079
<div class="row">
8180
<div class="no-gutters__col col-3">
8281
<h2 class="post__label">Date</h2>
@@ -87,11 +86,72 @@ <h2 class="post__label">Date</h2>
8786
{{ post.date | date: "%e %B %Y" }}
8887
</div>
8988
</div>
89+
{% if post.project_logo %}
90+
<div class="row">
91+
<div class="no-gutters__col col-3">
92+
<h2 class="post__label">Project</h2>
93+
</div>
94+
</div>
95+
<div class="row">
96+
<div class="upcoming__event-title col-12 text-center">
97+
<a href="{{ post.project_link }}">
98+
<img class="upcoming__project-logo" src="{{ site.baseurl }}/{{ post.project_logo }}">
99+
</a>
100+
</div>
101+
</div>
102+
{% endif %}
90103
</div>
91-
<div class="upcoming__logo-col col-auto text-center">
92-
<a href="http://pandas.pydata.org/index.html">
93-
<img class="upcoming__project-logo" src="{{ site.baseurl }}/{{ post.project_logo }}">
94-
</a>
104+
<div class="upcoming__logo-col col-md-5 text-center">
105+
<div class="upcoming__sponsor-list h-100">
106+
<h2 class="upcoming__sponsor-title">Supported By</h2>
107+
<!--HERE feed event sponsors only - we need sponsor objects not just the name.-->
108+
<!--Build an array of site sponsors (all).-->
109+
{% assign site_sponsors_all = "" | split: ',' %}
110+
{% for sponsor in site.sponsors %}
111+
{% assign site_sponsors_all = site_sponsors_all | push: sponsor %}
112+
{% endfor %}
113+
114+
<!--Build an array of sponsors for the event.-->
115+
{% assign event_sponsors = "" | split: ',' %}
116+
{% for sponsor in post.sponsors %}
117+
{% for site_sponsor in site_sponsors_all %}
118+
{% if site_sponsor.sponsor_id == sponsor %}
119+
{% assign event_sponsors = event_sponsors | push: site_sponsor %}
120+
{% endif %}
121+
{% endfor %}
122+
{% endfor %}
123+
124+
{% assign num_of_sponsors = event_sponsors | size %}
125+
{% assign sponsors_remainder = num_of_sponsors | modulo: 2 %}
126+
127+
{% if sponsors_remainder == 0 %}
128+
{% assign num_of_sponsors_even = true %}
129+
{% assign row_num_modifier = 1 %}
130+
{% else %}
131+
{% assign num_of_sponsors_even = false %}
132+
{% assign row_num_modifier = 0 %}
133+
{% endif %}
134+
135+
{% assign num_of_rows = num_of_sponsors | divided_by: 2 | floor | minus: row_num_modifier %}
136+
{% assign items_per_row = 1 %}
137+
138+
{% for row in (0..num_of_rows) %}
139+
{% if forloop.last and num_of_sponsors_even == false %}
140+
{% assign items_per_row = 0 %}
141+
{% endif %}
142+
<div class="row">
143+
{% for col in (0..items_per_row) %}
144+
{% assign sponsor_index = row | times: 2 | plus: col %}
145+
{% assign sponsor = event_sponsors[sponsor_index] %}
146+
<div class="footer__sponsor-col col-md-12 col-lg-6">
147+
<a class="footer__sponsor-link" href="{{ sponsor.sponsor_link }}">
148+
<img class="footer__img" src="{{ site.baseurl }}/{{ sponsor.sponsor_logo }}">
149+
</a>
150+
</div>
151+
{% endfor %}
152+
</div>
153+
{% endfor %}
154+
</div>
95155
</div>
96156
</div>
97157
<div class="upcoming__button-row row">

static/images/sponsors/numfocus.png

11.6 KB
Loading

0 commit comments

Comments
 (0)