Skip to content

Commit ba8fbf3

Browse files
committed
fix(css): style event cards
1 parent e6e694e commit ba8fbf3

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

_layouts/posts_events.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ <h2>Upcoming events</h2>
1919
{% capture posttime %}{{event.event_date | date: '%s'}}{% endcapture %}
2020

2121
{% if posttime > nowunix %}
22-
<div markdown="1">
22+
<div markdown="1" class="upcoming-event">
2323
<h3>{{ event.title }}</h3>
2424
<p>{{ event.excerpt }} </p>
2525
<ul>
2626
<li> <b>Event Date:</b> {{ event.event_date }} </li>
27-
<li> <b>Cost:</b> {{ event.cost }} </li>
28-
<li> <b>Location:</b> {{ event.cost }} </li>
27+
<li> <b>Cost:</b> {{ event.event_cost }} </li>
28+
<li> <b>Location:</b> {{ event.event_location }} </li>
2929
</ul>
30-
Learn more.
30+
31+
<a href = {{ event.permalink}}, class="btn btn--info" >Learn More</a>
3132
</div>
3233
{% endif %}
3334

@@ -46,7 +47,7 @@ <h2>Past events</h2>
4647

4748
<li>
4849
<a href="#{{ year.name }}">
49-
<strong>{{ year.name }}</strong> <span class="taxonomy__count">{{ year.items | size }}</span>
50+
<strong>{{ year.name }}</strong> <!--<span class="taxonomy__count">{{ year.items | size }}</span> -->
5051
</a>
5152
</li>
5253
{% endfor %}

_posts/events/2024-07-25-pyopensci-fall-festival.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
layout: single
33
title: "pyOpenSci Fall Festival"
4-
excerpt: "More here"
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. "
55
author:
66
event_date: 2024-09-05
7+
event_cost: Coming Soon
8+
event_location: Online - gather
79
permalink: /events/pyopensci-2024-fall-festival.html
810
header:
911
overlay_image: images/headers/scipy-2024-workshop.png

_sass/minimal-mistakes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545

4646
/* Pyos specific */
47+
@import "minimal-mistakes/pyos-functions";
4748
@import "minimal-mistakes/pyos-main";
4849
@import "minimal-mistakes/pyos-isotope";
4950
@import "minimal-mistakes/pyos-dropdown";

_sass/minimal-mistakes/_pyos-cards.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,24 @@
9999
padding-left: 0.5em;
100100
}
101101
}
102+
103+
104+
// events
105+
.upcoming-event {
106+
background-color: $pyos-lightpurple;
107+
border-radius: 10px;
108+
-webkit-border-radius: 10px;
109+
-moz-border-radius: 10px;
110+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
111+
-webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
112+
-moz-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
113+
padding: .1em 2em 2em 2em;
114+
width: 100%;
115+
116+
&:hover {
117+
background-color: darken-color($pyos-lightpurple, 10%);
118+
}
119+
&.btn {
120+
width: 40%;
121+
}
122+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@function darken-color($color, $percentage) {
2+
@return mix(black, $color, $percentage);
3+
}

0 commit comments

Comments
 (0)