aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pydis_site/apps/timeline/apps.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pydis_site/apps/timeline/apps.py b/pydis_site/apps/timeline/apps.py
index 8f27297f..37a61e93 100644
--- a/pydis_site/apps/timeline/apps.py
+++ b/pydis_site/apps/timeline/apps.py
@@ -28,14 +28,19 @@ class TimelineConfig(AppConfig):
# Strip `.md` file extension from filename and split it into the
# date (for sorting) and slug (for linking).
key, slug = path.name[:-3].split("_")
+
+ icon_color = metadata.get("icon_color")
+ # Use the pydis blurple as the default background color.
+ if not icon_color or metadata["icon"] == "pydis":
+ icon_color = "has-background-primary"
+
entry = {
"key": key,
"slug": slug,
"title": metadata["title"],
"date": metadata["date"],
"icon": metadata["icon"],
- # This key might not be used if the icon uses the pydis logo.
- "icon_color": metadata.get("icon_color"),
+ "icon_color": icon_color,
"content": html,
}