From 13521559402df023ea699ce76a3d5f7eba28a6ff Mon Sep 17 00:00:00 2001 From: hedy Date: Mon, 22 Jan 2024 19:34:18 +0800 Subject: Events: Make good use of bulma components --- pydis_site/static/css/events/base.css | 30 +-- .../static/images/events/icons/adventofcode.png | Bin 0 -> 18455 bytes pydis_site/static/images/events/icons/codejam.svg | 264 +++++++++++++++++++++ pydis_site/static/images/events/icons/pixels.png | Bin 0 -> 4426 bytes pydis_site/static/images/events/icons/pyweek.png | Bin 0 -> 4369 bytes pydis_site/templates/events/current_event.html | 19 ++ pydis_site/templates/events/index.html | 145 +++++++---- .../templates/events/sidebar/events_list.html | 62 ++++- pydis_site/templates/events/upcoming_event.html | 15 -- 9 files changed, 450 insertions(+), 85 deletions(-) create mode 100644 pydis_site/static/images/events/icons/adventofcode.png create mode 100644 pydis_site/static/images/events/icons/codejam.svg create mode 100644 pydis_site/static/images/events/icons/pixels.png create mode 100644 pydis_site/static/images/events/icons/pyweek.png delete mode 100644 pydis_site/templates/events/upcoming_event.html diff --git a/pydis_site/static/css/events/base.css b/pydis_site/static/css/events/base.css index 604b81cc..80be4338 100644 --- a/pydis_site/static/css/events/base.css +++ b/pydis_site/static/css/events/base.css @@ -19,20 +19,8 @@ pre { margin-bottom: 0 !important } - -.event-gallery .box { - padding: 0; -} - -.event-gallery .box-content { - padding: 1.25rem; -} - -.event-gallery img { - object-fit: cover; - /* Same as that of box */ - border-top-left-radius: 6px; - border-top-right-radius: 6px; +.event-gallery .card { + border-radius: 6px; } /* CSS-only Masonry layout: @@ -57,15 +45,15 @@ pre { height: 60rem; } - .event-gallery .box { + .event-gallery .card { width: calc(33% - 1rem); margin-bottom: 1rem; } /* Reorder vertically */ - .event-gallery .box:nth-child(3n+1) { order: 1; } - .event-gallery .box:nth-child(3n+2) { order: 2; } - .event-gallery .box:nth-child(3n) { order: 3; } + .event-gallery .card:nth-child(3n+1) { order: 1; } + .event-gallery .card:nth-child(3n+2) { order: 2; } + .event-gallery .card:nth-child(3n) { order: 3; } /* 2 line breaks to force new columns, for each gap between the three columns. */ .event-gallery::before, .event-gallery::after { @@ -82,13 +70,13 @@ pre { height: 80rem; } - .event-gallery .box { + .event-gallery .card { width: calc(50% - 1rem); margin-bottom: 1rem; } - .event-gallery .box:nth-child(2n+1) { order: 1; } - .event-gallery .box:nth-child(2n) { order: 2; } + .event-gallery .card:nth-child(2n+1) { order: 1; } + .event-gallery .card:nth-child(2n) { order: 2; } /* 1 line break to force a new column, for the gap between the two columns. */ .event-gallery::before { diff --git a/pydis_site/static/images/events/icons/adventofcode.png b/pydis_site/static/images/events/icons/adventofcode.png new file mode 100644 index 00000000..e9501737 Binary files /dev/null and b/pydis_site/static/images/events/icons/adventofcode.png differ diff --git a/pydis_site/static/images/events/icons/codejam.svg b/pydis_site/static/images/events/icons/codejam.svg new file mode 100644 index 00000000..b6a8a1db --- /dev/null +++ b/pydis_site/static/images/events/icons/codejam.svg @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pydis_site/static/images/events/icons/pixels.png b/pydis_site/static/images/events/icons/pixels.png new file mode 100644 index 00000000..8b5bd841 Binary files /dev/null and b/pydis_site/static/images/events/icons/pixels.png differ diff --git a/pydis_site/static/images/events/icons/pyweek.png b/pydis_site/static/images/events/icons/pyweek.png new file mode 100644 index 00000000..f74bc43b Binary files /dev/null and b/pydis_site/static/images/events/icons/pyweek.png differ diff --git a/pydis_site/templates/events/current_event.html b/pydis_site/templates/events/current_event.html index dd94fb3f..dd59b040 100644 --- a/pydis_site/templates/events/current_event.html +++ b/pydis_site/templates/events/current_event.html @@ -1 +1,20 @@ +{% load static %} + {# Current or ongoing event #} +{# (n/a) #} + +{# Next event to promote #} +
+
+
+

Upcoming event

+

PyWeek 37

+

March 17-24

+
+
+ PyWeek logo +
+
+

PyWeek has been running a bi-annual game jam for the Python language. As of 2020, we are excited to say we are officially partnered with PyWeek to co-run these events.

+ Learn more +
diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html index f51576fa..df83d895 100644 --- a/pydis_site/templates/events/index.html +++ b/pydis_site/templates/events/index.html @@ -10,34 +10,87 @@

Briefly describe events. Explain how to subscribe to updates from the #roles channel.

- {% include "events/current_event.html" %} - {% include "events/upcoming_event.html" %} - -

Scheduled events

-
-
-
-

January-June

- -
-
-
-
-

July-December

- -
+
+

Scheduled events for 2024

+
+
+

+ +

+
+
+
+
PyWeek 37
+

March 17-24

+

The bi-annual game-jam where you are allowed one week to write a game from scratch, either as an individual or as a team.

+
+ Learn more +
+
+
+
+

+ +

+
+
+
+
Revival of Code
+

TBD

+

Revisit past years' Advent of Code problems! Puzzles are relased every other day and there will be dedicated solution threads for you to discuss with other participants.

+
+ Learn more +
+
+
+
+

+ +

+
+
+
+
Code Jam
+

TBD

+

Our annual code-jam where we place you in a team of five and you have 11 days to code some sort of application or program in Python based on a selected technology or framework.

+
+ Learn more +
+
+
+
+

+ +

+
+
+
+
PyWeek 38
+

September

+

The bi-annual game-jam where you are allowed one week to write a game from scratch, either as an individual or as a team.

+
+ Learn more +
+
+
+
+

+ +

+
+
+
+
Advent of Code
+

December 1-25

+

Daily programming puzzles with increasing difficulties where each puzzle has a little story and you can discuss solutions with other participants. You are allowed to use any programming language you like.

+
+ Learn more +
+
-
{% include "events/sidebar/events_list.html" %}
@@ -46,45 +99,55 @@

All events