-
Notifications
You must be signed in to change notification settings - Fork 20
Integrate event map feature (#2) #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate event map feature (#2) #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOW! This was quick, really quick! And impressive that it's already up and running 👏 👏
Can we talk a bit today about the event data? I've already taken a lot of other steps, anticipating that it will be managed through /content/events/
- see https://django.github.io/birthday20/events/copenhagen/
(btw totally open to working with direct URLs for events that don't need their own page, but I'd still like to manage their data from /content/events
)
themes/django20/layouts/index.html
Outdated
{{ $events := (where (.Site.GetPage "/events").Pages.ByDate "published" "!=" "false") }} | ||
|
||
<table class="event-table"> | ||
{{ $events := .Site.Data.events }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you did here!
But the events are supposed to be managed as individual files in /content/events/
- that's how we get the full flexibility. Each event has its own markdown file, but the front matter (the yaml code at the top) has the data in a proper schema.
And no merge conflicts when people are editing the same big JSON soup 😄
assets/sass/style.scss
Outdated
background: rgba(255, 255, 255, 0.5); | ||
margin: 1rem; | ||
font-size: 0.8em; | ||
letter-spacing: 0.02em; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only applies to odd rows :)
themes/django20/layouts/index.html
Outdated
{{ range sort $events ".fields.date" "asc" }} | ||
{{ $event := .fields }} | ||
<tr> | ||
<td>{{ $event.date }}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep some sort of date formatting, so to revert to the previous {{ time.Format "2006-01-01" .Params.event_date }}
- see: https://gohugo.io/functions/time/format/
min-height: 350px; | ||
background: var(--color-bg-light); | ||
transition: box-shadow 0.3s; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to /assets/sass/style.scss
:)
data/events.json
Outdated
"address": "molyko to Buea town Road, Buea, Cameroon", | ||
"description": "GMT+1 11am", | ||
"event_type": "in_person", | ||
"event_category": "local_community", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another adjustment is about the event_type and event_category - I think I like that 👍 Can you share a bit about your thinking? Like what categories and types did you have in mind?
themes/django20/layouts/index.html
Outdated
<tr> | ||
<td>{{ $event.date }}</td> | ||
<td><a href="{{ $event.website }}" target="_blank">{{ $event.name | truncate 50 }}</a></td> | ||
<td>{{ $event.community }}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has to be a field named organizer instead? So that mostly, an organizer is a community.. but sometimes people don't really have a name for that, and it's just 2 people 🙂
@Mitchina I'll shuffle the data around a bit so the JSON will be auto-generated from entities in |
Description:
This PR implements the event map integration on the homepage as described in issue #2.
Resolves:
What’s included:
Screenshots
Map on Homepage:

