summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanja Cosic <1070957+vanjacosic@users.noreply.github.com>2023-10-27 14:58:01 +0200
committerVanja Cosic <1070957+vanjacosic@users.noreply.github.com>2023-10-27 14:58:01 +0200
commite028ac38509a954a7d8808962dd57d400142ef64 (patch)
tree64014b887307d9de19ba75b8cb4cd481934c3a74
parent3e5ee8db4a1a2344118fcf78840151210325cd9f (diff)
downloadcph-rust-website-e028ac38509a954a7d8808962dd57d400142ef64.zip
Clean up event styles
-rw-r--r--events.toml9
-rw-r--r--static/styles.css52
-rw-r--r--templates/event-page.html41
-rw-r--r--templates/events.html7
-rw-r--r--templates/macros.html6
5 files changed, 61 insertions, 54 deletions
diff --git a/events.toml b/events.toml
index ad4f491..df3530e 100644
--- a/events.toml
+++ b/events.toml
@@ -1,4 +1,13 @@
[[upcoming]]
+title = "Meetup #42"
+date = 2023-11-30 18:00:00+02:00
+venue = "Nine A/S"
+address = "Kongens Nytorv 18, 1050 København"
+url = ""
+content = """
+"""
+
+[[recent]]
title = "Meetup #41"
date = 2023-10-26 18:00:00+02:00
venue = "Factbird"
diff --git a/static/styles.css b/static/styles.css
index 31b0c5d..a307453 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -8,7 +8,7 @@
--primary-text-color: #323232;
--primary-text-color-over: #000;
--background-color: #fff;
- --secondary-text-color: #303030;
+ --secondary-text-color: #5e5e5e;
--box-background-color: #fcfbf9;
--code-color: #ffccb5;
--code-background-color: #4a4a4a;
@@ -44,6 +44,11 @@ a {
color: var(--primary-link-color);
}
+a:hover {
+ opacity: .6;
+ text-decoration: none;
+}
+
ul {
margin-top: 0.5rem;
padding-left: 1.5rem;
@@ -113,19 +118,21 @@ main h1:first-of-type {
h1 {
font-size: 2.2rem;
font-weight: 500;
- color: var(--primary-text-color);
margin-top: 1.5rem;
margin-bottom: 0.5rem;
}
h2 {
- font-size: 1.4rem;
+ font-size: 1.5rem;
font-weight: 500;
- color: var(--primary-text-color);
margin-top: 1.5rem;
margin-bottom: 0.5rem;
}
+h3 {
+ font-size: 1.3rem;
+}
+
aside {
min-width: 15rem;
border-top: 5px solid var(--primary-link-color);
@@ -223,14 +230,10 @@ aside {
padding: 0;
}
-.content a:hover {
- text-decoration: underline;
-}
-
-.content blockquote {
+blockquote {
margin: 0;
padding: .5rem 1.5rem;
- border-left: var(--code-background-color) 8px solid;
+ border-left: var(--code-background-color) .25rem solid;
background-color: var(--box-background-color);
}
@@ -254,16 +257,11 @@ aside {
opacity: 0.8;
}
-.section-events h2 {
- color: var(--secondary-text-color);
- margin-top: 3rem;
- margin-bottom: 1rem;
-}
-
.section-events h3 {
- font-size: 1.5rem;
margin-top: .5rem;
margin-bottom: .5rem;
+ padding-left: .3rem;
+
}
.event-page-link {
@@ -282,24 +280,21 @@ details summary {
}
details summary:hover {
- background: #303030;
+ background: var(--box-background-color);
}
details summary > * {
display: inline-block;
-}
-
-details {
- padding-left: 1rem;
- padding-right: 1rem;
+ color: var(--secondary-text-color);
+ vertical-align: middle;
}
details[open] {
- background: #303030;
+ background: var(--box-background-color);
}
-dl {
- padding-left: 2rem;
+details > div {
+ padding: 0 2.5rem 1rem;
}
dt {
@@ -310,9 +305,8 @@ dd {
margin-bottom: .5rem;
}
-dd:last-child {
- padding-top: 1rem;
- margin-left: 0;
+dd > blockquote {
+ margin: 1rem 0 0 0;
}
.youtube-container {
diff --git a/templates/event-page.html b/templates/event-page.html
index d807e31..44911f7 100644
--- a/templates/event-page.html
+++ b/templates/event-page.html
@@ -2,27 +2,30 @@
{% import "macros.html" as macros %}
{% block content %}
-<h1 class="title">
- {{ page.title }}
-</h1>
+<article>
+ <h1 class="title">
+ {{ page.title }}
+ </h1>
-{% set meetups = load_data(path="events.toml") %}
-{% set upcoming = meetups['upcoming'] %}
-{% set all_events = meetups['recent'] | concat(with=upcoming) %}
+ {% set meetups = load_data(path="events.toml") %}
+ {% set upcoming = meetups['upcoming'] %}
+ {% set all_events = meetups['recent'] | concat(with=upcoming) %}
-{% set event = all_events | filter(attribute="title", value=page.title) | first %}
+ {% set event = all_events | filter(attribute="title", value=page.title) | first %}
-{% if event %}
- <details>
- <summary>
- <h3>Details about this event</h3>
- </summary>
- {{ macros::event_attributes(event=event) }}
- </details>
-{% else %}
- No data found for this event.
-{% endif %}
-
-{{ page.content | safe }}
+ {% if event %}
+ <details>
+ <summary>
+ <h3>Details about this event</h3>
+ </summary>
+ <div>
+ {{ macros::event_attributes(event=event) }}
+ </div>
+ </details>
+ {% else %}
+ No data found for this event.
+ {% endif %}
+ {{ page.content | safe }}
+</article>
{% endblock content %} \ No newline at end of file
diff --git a/templates/events.html b/templates/events.html
index 2ee2e6b..6a34d22 100644
--- a/templates/events.html
+++ b/templates/events.html
@@ -47,14 +47,15 @@
</a>
{% else %}
<article>
- <details>
+ <details {% if group == 'upcoming' %}open{% endif %}>
<summary>
<h3>
{{ event.title }}
</h3>
</summary>
-
- {{ macros::event_attributes(event=event) }}
+ <div>
+ {{ macros::event_attributes(event=event) }}
+ </div>
</details>
</article>
{% endif %}
diff --git a/templates/macros.html b/templates/macros.html
index 47b07e2..7e5acb1 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -2,7 +2,7 @@
<dl>
{% if event.url %}
<dt>
- Event link
+ Signup
</dt>
<dd>
<a href="{{ event.url }}">{{ event.title}} on Meetup.com</a>
@@ -14,9 +14,9 @@
</dt>
<dd>
{% if event.date %}
- <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time>
+ <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time>
{% else %}
- (No date found)
+ (No date found)
{% endif %}
</dd>