Skip to content

Upcoming events and layout fixes#761

Merged
freakboy3742 merged 5 commits intobeeware:mainfrom
kattni:tooling/upcoming-events-fix
Mar 10, 2026
Merged

Upcoming events and layout fixes#761
freakboy3742 merged 5 commits intobeeware:mainfrom
kattni:tooling/upcoming-events-fix

Conversation

@kattni
Copy link
Contributor

@kattni kattni commented Mar 10, 2026

  • The upcoming events were not displaying on the homepage due to a flipped operator.
  • The string "Nothing at the moment..." is no longer hardcoded into macros.py which means it will now be translated.
  • Blog post titles now render at the same height as site-section titles.
  • Overall layout is now more visually centered.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@kattni kattni requested review from freakboy3742 and removed request for freakboy3742 March 10, 2026 01:13
@kattni kattni changed the title Fix upcoming events rendering on homepage Upcoming events and layout fixes Mar 10, 2026
@kattni kattni requested a review from freakboy3742 March 10, 2026 02:49
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - one minor suggestion, and one request for a related tweak: you've added padding at the top of the blog post title to account for the (absent) breadcrumbs; it looks like there's a similar need on the News/Events/Resources landing page.

docs/en/index.md Outdated
Comment on lines 125 to 131
{% if upcoming_events(files) == None %}

Nothing at the moment...

{% else %}

{{ upcoming_events(files) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written, this will invoke the macro twice. That's not a huge problem, but it's one we can avoid with {% set %}

Suggested change
{% if upcoming_events(files) == None %}
Nothing at the moment...
{% else %}
{{ upcoming_events(files) }}
{% set events = upcoming_events(files) %}
{% if events %}
{{ events }}
{% else %}
Nothing at the moment...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't commit this directly because I think there still needs to be whitespace around the string for translation to not pull the Jinja into the translation string.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks awesome - thanks for those fixes!

@freakboy3742 freakboy3742 merged commit 709db9c into beeware:main Mar 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants