Skip to content

Commit 136e0c6

Browse files
committed
feat(styles): final styles for events page
1 parent 044723a commit 136e0c6

6 files changed

+50
-64
lines changed

_includes/event-cards.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
<a href="{{ post.url | relative_url }}">
33
<div class="event-card__content">
44
<div class="event-card__date">
5-
<div class="event-card__date-background"
6-
style="background-image: url('{{ post.header.overlay_image | relative_url }}');"></div>
5+
{% if posttime > nowunix %}
6+
<!-- Style upcoming events to be more vibrant -->
7+
<div class="event-card__date-background" style="background-image: linear-gradient(rgba(20, 13, 36, 0.8), rgba(20, 13, 36, 0.8)), url('{{ post.header.overlay_image | relative_url }}');"></div>
8+
{% else %}
9+
<div class="event-card__date-background" style="background-image: url('{{ post.header.overlay_image | relative_url }}');"></div>
10+
{% endif %}
11+
712
<div class="event-card__date-text">
8-
{% assign start_date = post.start_date | date: "%d" %}
9-
{% assign end_date = post.end_date | date: "%d" %}
10-
{% assign start_month = post.start_date | date: "%b" %}
11-
{% assign start_year = post.start_date | date: "%Y" %}
13+
{% assign start_date = post.event.start_date | date: "%d" %}
14+
{% assign end_date = post.event.end_date | date: "%d" %}
15+
{% assign start_month = post.event.start_date | date: "%b" %}
16+
{% assign start_year = post.event.start_date | date: "%Y" %}
1217
{% if end_date and end_date != start_date %}
13-
<span>howdy {{ start_date }}-{{ end_date }}</span>
18+
<span> {{ start_date }}-{{ end_date }}</span>
1419
{% else %}
1520
<span>{{ start_date }}</span>
1621
{% endif %}

_layouts/posts_events.html

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,22 @@
77

88

99
<h2>Upcoming events</h2>
10-
{% assign allEvents = site.posts
10+
11+
{% assign all_events = site.posts
1112
| where_exp: "item", "item.hidden != true"
1213
| where_exp: "item", "item.categories contains 'events'"
1314
%}
1415

1516
{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
1617

17-
{% for event in allEvents %}
18+
{% for post in all_events %}
1819

19-
{% capture posttime %}{{event.event_date | date: '%s'}}{% endcapture %}
20+
{% assign start_date = post.event.start_date | date: "%Y-%m-%d" %}
21+
{% capture posttime %}{{ start_date | date: '%s'}}{% endcapture %}
2022

2123
{% if posttime > nowunix %}
22-
<div markdown="1" class="upcoming-event">
23-
<h3>{{ event.title }}</h3>
24-
<p>{{ event.excerpt }} </p>
25-
<ul>
26-
<li> <b>Event Date:</b> {{ event.event_date }} </li>
27-
<li> <b>Cost:</b> {{ event.event_cost }} </li>
28-
<li> <b>Location:</b> {{ event.event_location }} </li>
29-
</ul>
30-
31-
<a href = {{ event.permalink}}, class="btn btn--info" >Learn More</a>
24+
<div class="upcoming">
25+
{% include event-cards.html %}
3226
</div>
3327
{% endif %}
3428

@@ -41,7 +35,7 @@ <h2>Past events</h2>
4135
{% assign eventsInYear = site.posts
4236
| where_exp: "item", "item.hidden != true"
4337
| where_exp: "item", "item.categories contains 'events'"
44-
| group_by_exp: 'post', 'post.date | date: "%Y"'
38+
| group_by_exp: 'post', 'post.event.start_date | date: "%Y"'
4539
%}
4640
{% for year in eventsInYear %}
4741

@@ -57,15 +51,15 @@ <h2>Past events</h2>
5751
{% assign eventsByYear = site.posts
5852
| where_exp: "item", "item.hidden != true"
5953
| where_exp: "item", "item.categories contains 'events'"
60-
| group_by_exp: 'post', 'post.date | date: "%Y"'
54+
| group_by_exp: 'post', 'post.event.start_date | date: "%Y"'
6155
%}
6256

6357
{% for year in eventsByYear %}
6458
<section id="{{ year.name }}" class="taxonomy__section">
6559
<h2 class="archive__subtitle">{{ year.name }}</h2>
6660
<div class="event__grid">
6761
{% for post in year.items %}
68-
{% capture posttime %}{{post.event_date | date: '%s'}}{% endcapture %}
62+
{% capture posttime %}{{ post.event.start_date | date: '%s'}}{% endcapture %}
6963
{% if posttime < nowunix %}
7064
{% include event-cards.html %}
7165
{% endif %}

_posts/events/2024-04-29-create-your-first-python-package-pyopensci-online-workshop.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
layout: single
33
title: "pyOpenSci Online Workshop: Create your first Python package"
44
excerpt: "Python packaging can be tricky to navigate. pyOpenSci will lead a pilot workshop on creating your first Python package. The goal of this workshop is to help scientists learn how to package and make code installable and shareable. Read on to learn more!"
5-
author:
5+
event:
6+
start_date: 2024-04-29
7+
cost: 10$
8+
location: Online
69
permalink: /events/april-2024-create-python-package-pyopensci-online-workshop.html
710
header:
811
overlay_image: images/headers/scipy-2024-workshop.png

_posts/events/2024-06-25-create-your-first-python-package-scipy-2024.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ header:
99
overlay_filter: rgba(20, 13, 36, 0.8)
1010
categories:
1111
- events
12-
start_date: 2024-07-13
12+
event:
13+
start_date: 2024-07-13
14+
cost: Registration through the scipy meeting
15+
location: Online
1316
classes: wide
1417
type: "event"
1518
comments: true
Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
layout: single
33
title: "pyOpenSci Fall Festival"
4-
excerpt: "More here on the fall festival. More here on the fall festival. More here on the fall festival. More here on the fall festival. More here on the fall festival. "
4+
excerpt: "We will be announcing an updated date and cost for the fall festival in early august. Please check back for more information."
55
author:
6-
event_date: 2024-09-05
7-
event_cost: Coming Soon
8-
event_location: Online - gather
6+
event:
7+
start_date: "2024-11-05"
8+
end_date: "2024-09-05"
9+
cost: Coming Soon
10+
location: Online - gather
911
permalink: /events/pyopensci-2024-fall-festival.html
1012
header:
1113
overlay_image: images/headers/scipy-2024-workshop.png
@@ -17,38 +19,4 @@ type: "event"
1719
comments: true
1820
---
1921

20-
## Create your first Python package: make your Python code easier to share and use
21-
22-
* **What:** A hands-on workshop, titled: [Create Your First Python Package: Make Your Python Code Easier to Share and Use](https://cfp.scipy.org/2024/talk/QT9GBY/)
23-
* **Where:** [SciPy 2024](https://www.scipy2024.scipy.org/), Ballroom B/C
24-
* **When:** Tuesday, July 9th, 2024, from 13:30--17:30 Pacific
25-
* Resources:
26-
* [**Workshop GitHub repository:**](https://github.com/pyOpenSci/code-to-module-workshop/)
27-
* [**pyOpenSci demo package:**](https://github.com/pyOpenSci/pyosPackage)
28-
29-
## Event overview
30-
31-
## How to enroll
32-
<figure>
33-
<a href="/images/blog/2024/april/pyos-code-to-mod.png">
34-
<img src="/images/blog/2024/april/pyos-code-to-mod.png" style="max-width:100%" alt="A line art robot standing in a field of purple flowers. The text reads 'From Python Code to Module, a live, online workshop with pyOpenSci, Thursday, April 25th 2024'.">
35-
</a>
36-
<figcaption>
37-
Tickets for our "From Python Code to Module" workshop are selling fast - get yours today!
38-
</figcaption>
39-
</figure>
40-
41-
If you’re interested in participating in our first paid, online, real-time training, sign up for our upcoming workshop: [“From Python Code to Module”](https://www.eventbrite.com/e/879586546037?aff=oddtdtcreator). This three hour course is intended for individuals who have experience writing Python code and Python functions, and will be taught by pyOpenSci’s Executive Director and founder, [Leah Wasser](https://github.com/lwasser). Leah has over 20 years of experience teaching data-intensive science with an emphasis helping scientists work through the pain points of working with different types of data, and puts an incredible amount of care and attention into ensuring each learner is successful in their educational goals. This is definitely a workshop you don’t want to miss!
42-
43-
In this workshop, Leah will cover:
44-
45-
- How to identify and explain the use of the basic components of a Python package: (a specific directory structure, an __init__.py file, a pyroject.toml file and some code).
46-
- Creating a basic python package that allows you to install your code into a local Python environment.
47-
- Installing your package in editable mode into a Python environment.
48-
49-
She will also briefly discuss how LLM’s can be used to support tasks such as documenting and formatting your code to improve usability and maintainability. While also considering the ethical and logistical challenges, pitfalls and concerns associated with using AI-based tools in software development.
50-
51-
The course will take place on Thursday, April 25th, from 10AM–1PM Mountain time, and use the Spatial Chat platform. Tickets are $10, and can be purchased on [the workshop’s Eventbrite page](https://www.eventbrite.com/e/from-python-code-to-module-tickets-879586546037?aff=oddtdtcreator). The class size is capped at 35, and tickets are selling fast–we hope to see you there!
52-
53-
## Connect with us!
54-
You can stay up-to-date with all things pyOpenSci by following us on [LinkedIn](https://www.linkedin.com/company/pyopensci) and [Fosstodon](https://fosstodon.org/@pyOpenSci), and you can connect with the broader pyOpenSci community on [our Discourse forum](https://pyopensci.discourse.group/). And if you’re interested in our weekly newsletter where we share news, blog posts, and monthly updates, [subscribe on LinkedIn](https://www.linkedin.com/newsletters/pyopensci-newsletter-7179551305344933888!)
22+
## More coming soon

_sass/minimal-mistakes/_pyos-cards.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,19 @@
201201
}
202202
}
203203

204+
205+
// Modifications for upcoming events
206+
.upcoming {
207+
& .event-card__date-background {
208+
opacity: 1;
209+
}
210+
.event-card__date-text {
211+
color: #fff;
212+
}
213+
214+
}
215+
216+
204217
// Responsive design adjustments
205218
@media (max-width: 600px) {
206219
.event-card {

0 commit comments

Comments
 (0)