diff --git a/wp-content/themes/Parallax-One/customizer_defaults.php b/wp-content/themes/Parallax-One/customizer_defaults.php index 1278f8d..5f029cb 100644 --- a/wp-content/themes/Parallax-One/customizer_defaults.php +++ b/wp-content/themes/Parallax-One/customizer_defaults.php @@ -329,6 +329,7 @@ class DefCalendar { public static $mode = 'condensed'; public static $this_week = 'This week'; public static $next_week = 'Next week'; + public static $fallback = false; }; /********************************************************/ diff --git a/wp-content/themes/Parallax-One/inc/customizer.php b/wp-content/themes/Parallax-One/inc/customizer.php index 47a55a5..1a50e4d 100644 --- a/wp-content/themes/Parallax-One/inc/customizer.php +++ b/wp-content/themes/Parallax-One/inc/customizer.php @@ -1849,6 +1849,20 @@ function parallax_one_customize_register( $wp_customize ) { 'priority' => 1 )); + /* Calendar fallback */ + + $wp_customize->add_setting('parallax_one_calendar_fallback', array( + 'default' => DefCalendar::$fallback, + 'sanitize_callback' => 'parallax_one_sanitize_text' + )); + $wp_customize->add_control( + 'parallax_one_calendar_fallback', array( + 'type' => 'checkbox', + 'label' => __('Use fallback image from Image section (if calendar cannot be loaded, e.g. on Internet Explorer)?', 'parallax-one'), + 'section' => 'calendar_section', + 'priority' => 4, + )); + /* Calendar show/hide */ $wp_customize->add_setting('parallax_one_calendar_show', array('sanitize_callback' => 'parallax_one_sanitize_text')); diff --git a/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php b/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php index d8925bc..fb87cf7 100644 --- a/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php +++ b/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php @@ -7,7 +7,7 @@ $calendar_mode = get_theme_mod('calendar_mode', DefCalendar::$mode); $calendar_this_week = get_theme_mod('calendar_this_week', DefCalendar::$this_week); $calendar_next_week = get_theme_mod('calendar_next_week', DefCalendar::$next_week); - +$calendar_fallback = get_theme_mod('parallax_one_calendar_fallback', DefCalendar::$fallback); ?> @@ -59,6 +59,18 @@ ng-repeat="calendar in calendars" ng-show="calendar.weekIndex === weekIndex"> + '; + } else { +?> +
Unfortunately, Internet Explorer / Edge cannot render the calendar properly. Please use Google Chrome or Mozilla Firefox to display the calendar.
+ +
@@ -78,4 +90,4 @@ - \ No newline at end of file + diff --git a/wp-content/themes/Parallax-One/style.css b/wp-content/themes/Parallax-One/style.css index 7005713..0e6acc5 100644 --- a/wp-content/themes/Parallax-One/style.css +++ b/wp-content/themes/Parallax-One/style.css @@ -1887,6 +1887,20 @@ section#calendar { padding-bottom: 20px; } +div.for-water-calendar-ie { + display: none; +} + +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + /* IE10+ CSS styles go here */ + div.for-water-calendar { + display: none !important; + } + div.for-water-calendar-ie { + display: block !important; + } +} + /*--------------------------------------- 3.1 SECTION: HOME / HEADER -----------------------------------------*/ @@ -5597,6 +5611,26 @@ p#video-caption { } } +/*--------------------------------------- + 3.19 FIXES FOR IE +-----------------------------------------*/ + +/* Unfortunately, font may get broken on IE if diacritics is in use, e.g. /prague/dance/cz +A proper fix would be not using @import to import Avenir fonts, and using e.g. in html. +But as this fix was not tested and needs some trial&error, in the meantime the below hack is suggested, that uses sans-serif as something that looks nice. +TODO: Implement a proper fix using , or try to refactor how we use font-family: Avenir throughout this CSS, so that this fix does not need to name so many elements +*/ + +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {     /* IE10+ CSS styles go here */    + html:lang(cs-CZ) h1,h2,h3,h4,h5,h6, html:lang(cs-CZ) body, html:lang(cs-CZ) p, html:lang(cs-CZ) div, html:lang(cs-CZ) span { + font-family: sans-serif !important; + } + html:lang(cs-CZ) #intro-under-construction, html:lang(cs-CZ) #intro-under-construction span { + font-family: sans-serif !important; + font-weight: 200 !important; + } +} + /*--------------------------------------- 4. DEFAULT COLORS -----------------------------------------*/