diff --git a/src/assets/js/home.js b/src/assets/js/home.js index 5baa9259..75da5f9c 100644 --- a/src/assets/js/home.js +++ b/src/assets/js/home.js @@ -1,4 +1,19 @@ $(function() { + /** + * Popups + */ + const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; + + /** Why wishthis? */ + popup_settings_why_wishthis = { + 'position' : 'top center', + 'variation' : isDarkMode ? '' : 'inverted', + 'hoverable' : true, + }; + + $('[data-content]').popup(popup_settings_why_wishthis); + $('[data-html]').popup(popup_settings_why_wishthis); + /** * Statistics */ @@ -106,5 +121,6 @@ function showStatistic(elementStatistic, amount, timeout, modified) { 'content' : modified, 'position' : 'right center', 'variation' : isDarkMode ? '' : 'inverted', + 'hoverable' : true, }); } diff --git a/src/pages/home.php b/src/pages/home.php index 7d241dec..dc773f9f 100644 --- a/src/pages/home.php +++ b/src/pages/home.php @@ -103,13 +103,22 @@ $page->navigation();