From ba469ae2da6208c83ab634b02327a48cba2aa891 Mon Sep 17 00:00:00 2001 From: Fanis Dokianakis Date: Mon, 19 Feb 2024 00:33:12 +0200 Subject: [PATCH] fix summary --- ...νελευσης-hel-l-u-g-κυρ-10-μαρτιου-2024-18-30-21-30-2024-02-18.md | 8 +- .../static/js/bootstrap-color-switcher.js | 80 +++++++++++++++++++ 2 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 themes/hellug-bootstrap/static/js/bootstrap-color-switcher.js diff --git a/content/posts/events/προκηρυξη-προσκληση-γεν-συνελευσης-hel-l-u-g-κυρ-10-μαρτιου-2024-18-30-21-30-2024-02-18.md b/content/posts/events/προκηρυξη-προσκληση-γεν-συνελευσης-hel-l-u-g-κυρ-10-μαρτιου-2024-18-30-21-30-2024-02-18.md index 6a335d0..6d8b765 100644 --- a/content/posts/events/προκηρυξη-προσκληση-γεν-συνελευσης-hel-l-u-g-κυρ-10-μαρτιου-2024-18-30-21-30-2024-02-18.md +++ b/content/posts/events/προκηρυξη-προσκληση-γεν-συνελευσης-hel-l-u-g-κυρ-10-μαρτιου-2024-18-30-21-30-2024-02-18.md @@ -14,9 +14,9 @@ tags: - Νέα summary: Προκηρύσσεται η ΕΞ ΑΠΟΣΤΑΣΕΩΣ διεξαγωγή της 26ης Τακτικής Γενικής Εκλογο-Απολογιστικής Συνέλευσης της “Ένωσης Χρηστών και Φίλων Linux Ελλάδας - (Ε.Χ.Φ.Λ.Ε.) - Hellenic Linux User Group (HEL.L.U.G.)”, .... + (Ε.Χ.Φ.Λ.Ε.) - Hellenic Linux User Group (HEL.L.U.G.)” --- -.... την **ΚΥΡΙΑΚΗ 10 ΜΑΡΤΙΟΥ 2024 και ώρα 18:30–21:30,** μέσω των Συστημάτων: +Προκηρύσσεται η ΕΞ ΑΠΟΣΤΑΣΕΩΣ διεξαγωγή της 26ης Τακτικής Γενικής Εκλογο-Απολογιστικής Συνέλευσης της “Ένωσης Χρηστών και Φίλων Linux Ελλάδας (Ε.Χ.Φ.Λ.Ε.) - Hellenic Linux User Group (HEL.L.U.G.)” την **ΚΥΡΙΑΚΗ 10 ΜΑΡΤΙΟΥ 2024 και ώρα 18:30–21:30,** μέσω των Συστημάτων: 1. **Jitsi/Meet Hellug** για την διεξαγωγή της συζήτησης και των αποφάσεων για τα θέματα της Γ.Σ. 2. **ZEUS/GRNEΤ** για την διεξαγωγή της Ψηφοφορίας των Μελών για τα Όργανα του Συλλόγου. @@ -27,6 +27,4 @@ summary: Προκηρύσσεται η ΕΞ ΑΠΟΣΤΑΣΕΩΣ διεξαγω Για την συμμετοχή τους στη Ψηφοφορία, μέσω του Συστήματος ZEUS/GRNEΤ, θα λάβουν προσωπικό μήνυμα και σύνδεσμο, από το Σύστημα. - - -Καλούνται τα μέλη του Συλλόγου, να συμμετέχουν ενεργά στην διεξαγωγή της Γ.Σ.2024 ! \ No newline at end of file +Καλούνται τα μέλη του Συλλόγου, να συμμετέχουν ενεργά στην διεξαγωγή της Γ.Σ.2024 ! diff --git a/themes/hellug-bootstrap/static/js/bootstrap-color-switcher.js b/themes/hellug-bootstrap/static/js/bootstrap-color-switcher.js new file mode 100644 index 0000000..9f22daa --- /dev/null +++ b/themes/hellug-bootstrap/static/js/bootstrap-color-switcher.js @@ -0,0 +1,80 @@ +/*! + * Color mode toggler for Bootstrap's docs (https://getbootstrap.com/) + * Copyright 2011-2023 The Bootstrap Authors + * Licensed under the Creative Commons Attribution 3.0 Unported License. + */ + +(() => { + 'use strict' + + const getStoredTheme = () => localStorage.getItem('theme') + const setStoredTheme = theme => localStorage.setItem('theme', theme) + + const getPreferredTheme = () => { + const storedTheme = getStoredTheme() + if (storedTheme) { + return storedTheme + } + + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' + } + + const setTheme = theme => { + if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) { + document.documentElement.setAttribute('data-bs-theme', 'dark') + } else { + document.documentElement.setAttribute('data-bs-theme', theme) + } + } + + setTheme(getPreferredTheme()) + + const showActiveTheme = (theme, focus = false) => { + const themeSwitcher = document.querySelector('#bd-theme') + + if (!themeSwitcher) { + return + } + + const themeSwitcherText = document.querySelector('#bd-theme-text') + const activeThemeIcon = document.querySelector('.theme-icon-active use') + const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`) + const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href') + + document.querySelectorAll('[data-bs-theme-value]').forEach(element => { + element.classList.remove('active') + element.setAttribute('aria-pressed', 'false') + }) + + btnToActive.classList.add('active') + btnToActive.setAttribute('aria-pressed', 'true') + activeThemeIcon.setAttribute('href', svgOfActiveBtn) + const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})` + themeSwitcher.setAttribute('aria-label', themeSwitcherLabel) + + if (focus) { + themeSwitcher.focus() + } + } + + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { + const storedTheme = getStoredTheme() + if (storedTheme !== 'light' && storedTheme !== 'dark') { + setTheme(getPreferredTheme()) + } + }) + + window.addEventListener('DOMContentLoaded', () => { + showActiveTheme(getPreferredTheme()) + + document.querySelectorAll('[data-bs-theme-value]') + .forEach(toggle => { + toggle.addEventListener('click', () => { + const theme = toggle.getAttribute('data-bs-theme-value') + setStoredTheme(theme) + setTheme(theme) + showActiveTheme(theme, true) + }) + }) + }) +})()