From b87c44bf31038bebb683689700bf818f5791b78e Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 30 Jul 2024 20:47:31 +0200 Subject: [PATCH 1/5] :bug: fix missing dict entry in admin login ui --- page/footer_strings.php | 18 ------------------ page/strings.php | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/page/footer_strings.php b/page/footer_strings.php index ca1febb..907c70a 100644 --- a/page/footer_strings.php +++ b/page/footer_strings.php @@ -7,23 +7,5 @@ "de" => "Quellcode", "en" => "Source Code", ], - - "text_imprint" => [ - "de" => "Impressum", - "en" => "Imprint", - ], - "link_imprint" => [ - "de" => "/impressum", - "en" => "/imprint", - ], - - "text_privacy_policy" => [ - "de" => "Datenschutz­erklärung", - "en" => "Privacy Policy", - ], - "link_privacy_policy" => [ - "de" => "/datenschutz", - "en" => "/privacy", - ], ]); ?> diff --git a/page/strings.php b/page/strings.php index 308838a..6d3c22a 100644 --- a/page/strings.php +++ b/page/strings.php @@ -11,5 +11,25 @@ "de" => "Alle Infos zum Selbstbestimmungsgesetz an einem Ort", "en" => "Everything about the German Self-Determination Law in one place", ], + + + + "text_imprint" => [ + "de" => "Impressum", + "en" => "Imprint", + ], + "link_imprint" => [ + "de" => "/impressum", + "en" => "/imprint", + ], + + "text_privacy_policy" => [ + "de" => "Datenschutz­erklärung", + "en" => "Privacy Policy", + ], + "link_privacy_policy" => [ + "de" => "/datenschutz", + "en" => "/privacy", + ], ]); ?> From ab5f77cc7a93d15485df969637f1875eae45028e Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 30 Jul 2024 20:53:57 +0200 Subject: [PATCH 2/5] :children_crossing: consistent labeling of external links (fix #121) --- page/admin/login/index.php | 2 +- page/start/index.php | 2 +- page/start/strings.php | 4 ++-- page/timeline/strings.php | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/page/admin/login/index.php b/page/admin/login/index.php index e85ff12..657041e 100644 --- a/page/admin/login/index.php +++ b/page/admin/login/index.php @@ -53,7 +53,7 @@
This page needs cookies to function correctly. Cookies are only used for required purposes. - You can read more about this in our " target="_blank">get("text_privacy_policy") ?> . + You can read more about this in our ">get("text_privacy_policy") ?>.
diff --git a/page/start/index.php b/page/start/index.php index 759b543..472751c 100644 --- a/page/start/index.php +++ b/page/start/index.php @@ -469,7 +469,7 @@ get("about_button_mail") ?> - + get("about_button_website") ?> diff --git a/page/start/strings.php b/page/start/strings.php index cd298a6..dfcbea5 100644 --- a/page/start/strings.php +++ b/page/start/strings.php @@ -627,12 +627,12 @@ "de" => [ "Deine Mail-Adresse wird ausschließlich zum Versenden des Newsletters verwendet und zu keinem Zeitpunkt an Dritte weitergegeben.", "Du kannst Dich jederzeit über einen Link in den E-Mails wieder abmelden.", - "Mehr zum Thema Datenschutz erfährst Du in unserer Datenschutzerklärung .", + "Mehr zum Thema Datenschutz erfährst Du in unserer Datenschutzerklärung.", ], "en" => [ "Your mail address is exclusively being used for the delivery of the newsletter and never being forwarded to third parties.", "You can unsubscribe at any time via a link in the newsletter mails.", - "More about data privacy can be found in our Privacy Policy .", + "More about data privacy can be found in our Privacy Policy.", ], ], diff --git a/page/timeline/strings.php b/page/timeline/strings.php index 1a107f5..6e172fe 100644 --- a/page/timeline/strings.php +++ b/page/timeline/strings.php @@ -277,19 +277,19 @@ "timeline_lesung_2_3_text" => [ "de" => [ "Wie auch hier, werden die Lesungen 2 und 3 oft zusammengelegt. Die zweite Lesung im Bundestag diskutiert die Ergebnisse der Ausschüsse. Einzelne Abgeordnete können Änderungen beantragen. Am Ende der dritten Lesung wird abschließend über das Gesetz abgestimmt.", - "Verglichen mit dem Regierungsentwurf enthält die Beschlussempfehlung des Familienausschusses nur kleine Änderungen; So müssen Kinder ab einem Alter von 5 Jahren im Fall einer Personenstandsänderung zustimmen und die Eltern von Minderjährigen müssen bestätigen, dass sie sich beraten haben lassen. Zudem wurde die Weitergabe von persönlichen Daten an Sicherheitsbehörden gestrichen.", + "Verglichen mit dem Regierungsentwurf enthält die Beschlussempfehlung des Familienausschusses nur kleine Änderungen; So müssen Kinder ab einem Alter von 5 Jahren im Fall einer Personenstandsänderung zustimmen und die Eltern von Minderjährigen müssen bestätigen, dass sie sich beraten haben lassen. Zudem wurde die Weitergabe von persönlichen Daten an Sicherheitsbehörden gestrichen.", "Die Redner*innen der Regierungsparteien (FDP, SPD, Bündnis 90/Die Grünen) betonten die Wichtigkeit dieses Gesetzesvorhabens für die Grundrechte und Menschenwürde. Dem Leid, das das TSG verursacht hat werde jetzt ein Ende gesetzt. Dies treffe auf breite Unterstützung durch frauenpolitische Organisationen und Kirchen.", "Aus den Lagern der Parteien CDU/CSU, AfD und der Gruppe BSW wurden Befürchtungen laut, das Gesetz gefährde Kinder- und Jugendschutz und wäre anfällig für Missbrauch. Einige dieser Redner*innen sind der Ansicht, Trans* wäre Einbildung und ein 'Hype', welcher durch eine Lobby gestärkt würde. Trans*-Personen seien lediglich Menschen in Verkleidung und Perücke.", "Die Gruppe Die Linke begrüßt das Gesetz, mahnt aber auch an, dass dies nur der Anfang sein könne; Beratungsmöglichkeiten müssen verbessert und Regelungen zur Finanzierung gesundheitlicher Maßnahmen geschaffen werden.", - "Die Beschlussempfehlung des Familienausschusses wurde mit 372 zu 251 Stimmen angenommen. Der Antrag der AfD, das TSG zu erhalten und sogar noch zu verschärfen, wurde vom Parlament zurückgewiesen.", + "Die Beschlussempfehlung des Familienausschusses wurde mit 372 zu 251 Stimmen angenommen. Der Antrag der AfD , das TSG zu erhalten und sogar noch zu verschärfen, wurde vom Parlament zurückgewiesen.", ], "en" => [ "As seen here, reading 2 and 3 are often combined. The second reading in the Bundestag (Parliament) discusses the results of the committees. Individual members of the Bundestag can request changes. At the end of the third reading, a final vote is taken on the law.", - "Compared to the government draft, the recommendation of the family committee contains only small changes; In the event of a change in civil status, children starting at the age of 5 must agree and the parents of minors must confirm that they have been advised. In addition, the transfer of personal information to security authorities has been removed.", + "Compared to the government draft, the recommendation of the family committee contains only small changes; In the event of a change in civil status, children starting at the age of 5 must agree and the parents of minors must confirm that they have been advised. In addition, the transfer of personal information to security authorities has been removed.", "The government parties' speakers (FDP, SPD, Bündnis 90/Die Grünen) emphasized the importance of this law for fundamental rights and human dignity. The suffering that the TSG has caused is now being put to an end. This meets broad support from women's policy organizations and churches.", "From the camps of the parties CDU/CSU, AfD and the group BSW, fears were loud, the law would be a risk for child and youth protection and could be susceptible to abuse. Some of these speakers believe that trans* would be imagination and a 'hype' that would be strengthened by a lobby and trans* people were only people in disguise and wigs.", "The group Die Linke welcomes the law, but also warns that this can only be the beginning; Advice options must be improved and regulations for financing health measures should be created.", - "The decision recommendation of the family committee was accepted with 372 to 251 votes. The AfD's request to maintain the TSG and even tighten its regulations was rejected by the parliament.", + "The decision recommendation of the family committee was accepted with 372 to 251 votes. The AfD's request to maintain the TSG and even tighten its regulations was rejected by the parliament.", ], ], "timeline_lesung_2_3_button" => [ From 5e3d8895e9ec400e606dfb4975c6171a26ad409e Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 30 Jul 2024 21:24:42 +0200 Subject: [PATCH 3/5] :children_crossing: improve countdown accuracy --- page/start/countdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/page/start/countdown.js b/page/start/countdown.js index 4460b9f..b074da8 100644 --- a/page/start/countdown.js +++ b/page/start/countdown.js @@ -31,8 +31,8 @@ async function countdown_redraw(){ let hours_raw = Math.floor((difference - (days_raw * 86400000)) / (3600000)); let hours = (hours_raw < 10 ? ("0" + hours_raw) : hours_raw); - // minutes - let minutes_raw = Math.floor((difference - (days_raw * 86400000) - (hours_raw * 3600000)) / (60000)); + // minutes (NOTE: As this is the last unit, we use `ceil` here) + let minutes_raw = Math.ceil((difference - (days_raw * 86400000) - (hours_raw * 3600000)) / (60000)); let minutes = (minutes_raw < 10 ? ("0" + minutes_raw) : minutes_raw); From 386e2fb35d99f18009630226a52d5adb57a47191 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 30 Jul 2024 22:50:50 +0200 Subject: [PATCH 4/5] :children_crossing: open accordion item when referenced in url (fix #118) --- page/accordion.js | 59 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/page/accordion.js b/page/accordion.js index eb8c5a3..9562957 100644 --- a/page/accordion.js +++ b/page/accordion.js @@ -16,9 +16,16 @@ window.addEventListener("load", function(event){ // collect this view let accordion_view = accordion_collect_view(one_accordion_root); accordion_view_list.push(accordion_view); - - // initialized this view - accordion_init(accordion_view); + } + + + // HANDLE STATE CHANGE BY URL // + accordion_open_from_url_hash(); + + + // INITIALIZE VIEWS // + for(let one_accordion of accordion_view_list){ + accordion_init(one_accordion); } }); @@ -206,3 +213,49 @@ function accordion_state_set(item, state){ function accordion_body_resize(bodyContainer){ bodyContainer.style.maxHeight = bodyContainer.scrollHeight + "px"; } + + + +/** +* HELPER: Maybe open a accordion item that is referenced in url. +*/ +function accordion_open_from_url_hash(){ + // FIND REFERENCED ITEM ELEMENT // + // get its id + let hash = window.location.hash; + if(hash.length < 2 || !hash.startsWith("#")) return; + let openId = hash.substring(1); + + // find item element + let itemElement = document.getElementById(openId); + if(itemElement === null) return; + + // maybe unwrap + if(itemElement.classList.contains("wrapper")) itemElement = itemElement.children[0] ?? null; + if(itemElement === null) return; + + + // SET TO OPEN // + // find item in list of accordion views + let foundAccordion = null; + let foundItem = null; + findLoop: + for(let one_accordion of accordion_view_list){ + for(let one_item of one_accordion.item_list){ + if(one_item.element === itemElement){ + foundAccordion = one_accordion; + foundItem = one_item; + break findLoop; + } + } + } + if(foundAccordion === null || foundItem === null) return; + + // close all items in this accordion + for(let one_item of foundAccordion.item_list){ + accordion_state_set(one_item, false); + } + + // set state to open + accordion_state_set(foundItem, true); +} From 7ba443183ff9c48a9c4d3a59de6ff4dea4c504f3 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 30 Jul 2024 22:52:33 +0200 Subject: [PATCH 5/5] :bookmark: bump version to v1.3.1 --- meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.php b/meta.php index 716a24f..f40b12e 100644 --- a/meta.php +++ b/meta.php @@ -1,6 +1,6 @@