add feedback from Ilona; various other changes
This commit is contained in:
78
src/index.rs
78
src/index.rs
@@ -42,20 +42,6 @@ pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
class="btn mt-1 block"
|
||||
role="button" { (t!("more_infos")) }
|
||||
}
|
||||
article.col-span-2 {
|
||||
header { (t!("tour_aef_title")) }
|
||||
|
||||
(PreEscaped(t!("tour_aef_description")))
|
||||
|
||||
a
|
||||
href="https://www.jku.at/ars-electronica-2025-panic-yes-no/digital-shadows/"
|
||||
target="_blank"
|
||||
class="btn mt-1 block"
|
||||
role="button"
|
||||
title=(t!("tour_register_title")) { (t!("tour_register")) }
|
||||
|
||||
footer { (t!("location_postcity")) }
|
||||
}
|
||||
article {
|
||||
header { (t!("play_game_title")) }
|
||||
|
||||
@@ -65,6 +51,20 @@ pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
|
||||
footer { (t!("location_linz")) }
|
||||
}
|
||||
article.col-span-2 {
|
||||
header { (t!("tour_aef_title")) }
|
||||
|
||||
(PreEscaped(t!("tour_aef_description")))
|
||||
|
||||
a
|
||||
href="https://reglist24.com/digital-shadows-tour/form"
|
||||
target="_blank"
|
||||
class="btn mt-1 block"
|
||||
role="button"
|
||||
title=(t!("tour_register_title")) { (t!("tour_register")) }
|
||||
|
||||
footer { (t!("location_postcity")) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,55 @@ pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
|
||||
|
||||
h2 { (t!("calendar")) }
|
||||
iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=2&ctz=Europe%2FVienna&showPrint=0&showTz=0&showCalendars=0&showTabs=0&showDate=0&showNav=0&showTitle=0&mode=AGENDA&hl=en&src=YjA4NTZlZDUyZDAwNmY3ZTczNTgxYTk2NjI4MjFjMDZhYWJkZjUzMDBkMjZmMDZiOWFiYzg2YWE3YzBhNzFlNkBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%23d50000" style="border-width:0" width="100%" height="600" frameborder="0" scrolling="no";
|
||||
// Initial options shown to user
|
||||
div #calendar-options .calendar-options {
|
||||
p { (t!("cal_options"))" }
|
||||
|
||||
// Direct link option (privacy-first)
|
||||
a href="https://calendar.google.com/calendar/embed?height=600&wkst=2&ctz=Europe%2FVienna&showPrint=0&showTz=0&showCalendars=0&showTabs=0&showDate=0&showNav=0&showTitle=0&mode=AGENDA&hl=en&src=YjA4NTZlZDUyZDAwNmY3ZTczNTgxYTk2NjI4MjFjMDZhYWJkZjUzMDBkMjZmMDZiOWFiYzg2YWE3YzBhNzFlNkBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%23d50000"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="calendar-link" {
|
||||
(t!("cal_new_tab"))
|
||||
}
|
||||
|
||||
// Embed option
|
||||
button #embed-calendar .embed-button {
|
||||
(t!("cal_show_here"))
|
||||
}
|
||||
}
|
||||
|
||||
// iframe initially without src attribute
|
||||
iframe #google-calendar
|
||||
data-src="https://calendar.google.com/calendar/embed?height=600&wkst=2&ctz=Europe%2FVienna&showPrint=0&showTz=0&showCalendars=0&showTabs=0&showDate=0&showNav=0&showTitle=0&mode=AGENDA&hl=en&src=YjA4NTZlZDUyZDAwNmY3ZTczNTgxYTk2NjI4MjFjMDZhYWJkZjUzMDBkMjZmMDZiOWFiYzg2YWE3YzBhNzFlNkBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%23d50000"
|
||||
width="100%"
|
||||
height="600"
|
||||
frameborder="0"
|
||||
scrolling="no"
|
||||
class="hidden" {}
|
||||
|
||||
// Inline JavaScript
|
||||
script {
|
||||
(PreEscaped(r#"
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const calendarOptions = document.getElementById('calendar-options');
|
||||
const embedButton = document.getElementById('embed-calendar');
|
||||
const iframe = document.getElementById('google-calendar');
|
||||
|
||||
embedButton.addEventListener('click', function() {
|
||||
// Hide the options
|
||||
calendarOptions.classList.add('hidden');
|
||||
|
||||
// Load the iframe by setting src from data-src
|
||||
const src = iframe.getAttribute('data-src');
|
||||
iframe.setAttribute('src', src);
|
||||
|
||||
// Show the iframe
|
||||
iframe.classList.remove('hidden');
|
||||
});
|
||||
});
|
||||
"#))
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user