Skip to content
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

Add "all events feed" banner to calgrid #803

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site/themes/s2b_hugo_theme/layouts/calgrid/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<!-- only display during Steptember -->
<!-- {{ partial "cal/promo-banner-steptember.html" . }} -->

{{ partial "cal/shift-feed.html" . }}
{{ partial "cal/view-options.html" . }}
{{ partial "cal/fullcal.html" . }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
<script>
document.addEventListener("DOMContentLoaded", function() {
const pathname = window.location.pathname;
if (pathname !== "/calendar/") {
const calpage = "/calendar/";
// todo: we should try to separate each unique "endpoint"
// into separate hugo .md and layout files so we don't need this kind of test.
// see also: events.html which tries to suss out which page we are on.
// ( and possibly, move this there )
if (pathname.startsWith(calpage) && !pathname.endsWith(calpage)) {
document.body.classList.add("single-event-calendar-page");
}
});
Expand Down