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

expanded event details #391

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ document.addEventListener("DOMContentLoaded", () => {
const categorySelect = document.getElementById("category");
const categoryFieldSets = document.querySelectorAll("[data-category-wanted]");

/// poc - expanded event element
const events = document.querySelectorAll('.event');

events.forEach(event => {
event.addEventListener('click', () => {
if (event.classList.contains('expanded')) {
event.classList.remove('expanded');
} else {
events.forEach(ev => {
ev.classList.remove('expanded');
});
event.classList.add('expanded');
}
});
});

///

loadMoreButton.addEventListener("click", () => {
onLoadMoreSearch();
});
Expand Down Expand Up @@ -57,6 +75,14 @@ document.addEventListener("DOMContentLoaded", () => {
}
};

const onEventDrawerOpenButton = () => {

}

const onEventDrawerCloseButton = () => {

}

const onSearchLoadMoreButtonBehaviour = (response) => {
const loadMoreButton = document.getElementById("loadMoreButton");
const endOfResultsInfo = document.getElementById("endOfResults");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
<div class="event">
<div class="event-image {{#if event.category}}event-image-{{event.category}}{{/if}}">
{{#if event.pictureUuid}}
<img src="/picture?uuid={{event.pictureUuid}}" style="height:100px;max-height:250px;max-width:300px;" alt="{{#if event.pictureAltText}}{{event.pictureAltText}}{{else}}Event Bild{{/if}}" aria-label="Event Bild" aria-labelledby="image" />
{{else}}
<svg title="Event Bild" viewBox="0 0 512 512" height="100px" >
<use xlink:href="#{{#if event.category}}{{event.category}}{{else}}image{{/if}}"></use>
<div class="event-image {{#if event.category}}event-image-{{event.category}}{{/if}}">
{{#if event.pictureUuid}}
<img src="/picture?uuid={{event.pictureUuid}}" style="height:100px;max-height:250px;max-width:300px;" alt="{{#if event.pictureAltText}}{{event.pictureAltText}}{{else}}Event Bild{{/if}}" aria-label="Event Bild" aria-labelledby="image" />
{{else}}
<svg title="Event Bild" viewBox="0 0 512 512" height="100px" >
<use xlink:href="#{{#if event.category}}{{event.category}}{{else}}image{{/if}}"></use>
</svg>
{{/if}}
{{#if event.url}}
<a class="anchor-to-eventpage" href="{{event.url}}" target="_blank" aria-describedby="Zur Eventseite von {{event.name}} (neues Fenster wird geöffnet)">
Zur Eventseite
</a>
{{/if}}

{{#if event.accessibilityProperties}}
<div class="accessibility-details">
<svg height="24px" width="24px" viewBox="0 0 122.88 122.88">
<title>{{event.accessibilityProperties}}</title>
<use xlink:href="#accessibility"></use>
</svg>
{{/if}}
{{#if event.url}}
<a class="anchor-to-eventpage" href="{{event.url}}" target="_blank" aria-describedby="Zur Eventseite von {{event.name}} (neues Fenster wird geöffnet)">
Zur Eventseite
</a>
{{/if}}
</div>
{{/if}}
</div>
<div class="event-description">
<p class="event-title" title="{{event.name}}">
{{event.name}}
</p>

{{#if event.accessibilityProperties}}
<div class="accessibility-details">
<svg height="24px" width="24px" viewBox="0 0 122.88 122.88">
<title>{{event.accessibilityProperties}}</title>
<use xlink:href="#accessibility"></use>
</svg>
</div>
{{/if}}
</div>

<div class="event-description">
<p class="event-title" title="{{event.name}}">
{{event.name}}
</p>

<div class="event-details-wrapper">
<div class="event-details">
<svg height="24px" width="24px" title="Datum Logo" viewBox="0 0 512 512" >
<use xlink:href="#time"></use>
</svg>
<p>{{event.startDate}}</p>
</div>
{{#if event.locationName}}
<div class="event-details">
<svg height="24px" width="24px" title="Ort Logo" viewBox="0 0 512 512" >
<use xlink:href="#location"></use>
</svg>
<p>{{event.locationName}}{{#if event.city}}, {{event.city}} {{/if}} </p>
</div>
{{/if}}
<div class="event-details-wrapper">
<div class="event-details">
<svg height="24px" width="24px" title="Datum Logo" viewBox="0 0 512 512" >
<use xlink:href="#time"></use>
</svg>
<p>{{event.startDate}}</p>
</div>
{{#if event.locationName}}
<div class="event-details">
<svg height="24px" width="24px" title="Ort Logo" viewBox="0 0 512 512" >
<use xlink:href="#location"></use>
</svg>
<p>{{event.locationName}}{{#if event.city}}, {{event.city}} {{/if}} </p>
</div>
{{/if}}
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
.event {
display: flex;
flex-direction: column;
transition: grid-row 1s ease;
cursor: pointer;
}

.expanded {
grid-column: span 3; /* Expand to span two column */
}

.event-title {
Expand Down