From 075d2238ccdd741c8e7f78efdd119b5d76b27815 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Wed, 14 Apr 2021 09:57:07 +0200 Subject: [PATCH 1/9] css fixes and update templates --- .../elements/mate/ce_bs_gridStart.html5 | 7 +- .../elements/mate/ce_mate_contentbox.html5 | 2 +- .../elements/mate/ce_mate_teaserbox.html5 | 2 +- .../mate/ce_mate_teaserbox_link.html5 | 21 ++++ src/Resources/public/sass/style.scss | 95 +++++++++---------- 5 files changed, 76 insertions(+), 51 deletions(-) create mode 100644 src/Resources/contao/templates/elements/mate/ce_mate_teaserbox_link.html5 diff --git a/src/Resources/contao/templates/elements/mate/ce_bs_gridStart.html5 b/src/Resources/contao/templates/elements/mate/ce_bs_gridStart.html5 index b86afed..ef0dda2 100644 --- a/src/Resources/contao/templates/elements/mate/ce_bs_gridStart.html5 +++ b/src/Resources/contao/templates/elements/mate/ce_bs_gridStart.html5 @@ -1 +1,6 @@ -cssID; ?> class="class ?> rowClasses ?>"> +rowClasses,"content-wrapper")) { + $this->rowClasses = str_replace("row","",$this->rowClasses); +} +?> +cssID; ?> class="class ?> rowClasses ?>"> \ No newline at end of file diff --git a/src/Resources/contao/templates/elements/mate/ce_mate_contentbox.html5 b/src/Resources/contao/templates/elements/mate/ce_mate_contentbox.html5 index 2683302..9b5d465 100644 --- a/src/Resources/contao/templates/elements/mate/ce_mate_contentbox.html5 +++ b/src/Resources/contao/templates/elements/mate/ce_mate_contentbox.html5 @@ -17,7 +17,7 @@ text ?> - page != ""): ?> + pageText != ""): ?> diff --git a/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox.html5 b/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox.html5 index 7b232aa..eacf470 100644 --- a/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox.html5 +++ b/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox.html5 @@ -20,7 +20,7 @@ text ?> - page != ""): ?> + pageText != ""): ?> diff --git a/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox_link.html5 b/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox_link.html5 new file mode 100644 index 0000000..34f36bb --- /dev/null +++ b/src/Resources/contao/templates/elements/mate/ce_mate_teaserbox_link.html5 @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 1703149..5607be0 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -85,7 +85,7 @@ button, input, optgroup, select, textarea { -ms-flex-wrap: wrap; flex-wrap: wrap; clear: left; - overflow: hidden; + //overflow: hidden; .col { display: -webkit-flex; @@ -99,6 +99,14 @@ button, input, optgroup, select, textarea { } } +.col { + margin-bottom: 1.5rem; +} + +img { + vertical-align: bottom; +} + #container { display: block !important; } @@ -607,7 +615,7 @@ h1.bordered-right:after, h2.bordered-right:after, h3.bordered-right:after, h4.bo right: 0; } -.mod_article > { +.mod_article:first-child > { h2, h3, h4, h5, h6 { &:first-child { margin-top: 0; @@ -1815,7 +1823,7 @@ nav .brand-logo { padding: 0; .inside { - margin: 10px; + margin: 0 10px; padding: 15px; background: $boxes-background; color: $boxes-text-color; @@ -1982,9 +1990,9 @@ nav .brand-logo { box-shadow: -2px 2px 2px 0 rgba(0,0,0,0.25); -webkit-box-shadow: -2px 2px 2px 0 rgba(0,0,0,0.25); height: 100%; + margin-bottom: 3px; .image_container { - margin: 0 0 -5px 0; position: relative; } @@ -2173,6 +2181,7 @@ nav .brand-logo { // contao 4.5 fix nav.pagination li { padding-right: 5px; + margin-bottom: 5px; } #main nav.pagination { @@ -2185,20 +2194,6 @@ nav.pagination li { } } -.layout_latest.even, .layout_short.even, -.layout_teaser.even, .layout_list.even { - .inner { - margin: 0 10px 40px 2px; - } -} - -.layout_latest.odd, .layout_short.odd, -.layout_teaser.odd, .layout_list.odd { - .inner { - margin: 0 0 40px 12px; - } -} - .empty { margin-left: 0.75rem; width: 100%; @@ -2416,7 +2411,6 @@ nav.pagination li { * Footer * * ========================== */ footer.page-footer { - margin-top: 50px; color: $footer-primary-color; position: relative; padding: 0; @@ -2764,11 +2758,6 @@ input:not([type]), input[type=text]:not(.browser-default), input[type=password]: } } -.input-field label, .widget:not(.widget-checkbox):not(.widget-radio) label { - padding: 0 10px; - top: -3px; -} - .input-field label { color: $mateColor4; } @@ -2843,14 +2832,13 @@ input[type="file"] { background: $boxes-background; border: 1px solid #e6e6e6; padding: 5px 15px; - margin: 10px 0 0; + margin: 0; height: 40px; } - span.caret { + .caret { z-index: 1; - right: 15px; - color: inherit; + fill: $mateColor2; } } @@ -2881,29 +2869,40 @@ textarea { float: left; } -.widget:not(.widget-checkbox):not(.widget-radio) { - @extend .input-field; +.widget { position: relative; - margin-top: 1rem; - margin-bottom: 1rem; + + &.widget-text, &.widget-textarea, &.widget-password { + @extend .input-field; + margin-top: 1rem; + margin-bottom: 1rem; + } + + &.select { + margin-top: 0; + } } -.widget:not(.widget-checkbox):not(.widget-radio)>label { - color: $mateColor4; - position: absolute; - padding: 0 10px; - top: -3px; - left: 0; - font-size: 1rem; - cursor: text; - transition: transform 0.2s ease-out, color 0.2s ease-out; - transform-origin: 0% 100%; - text-align: initial; - transform: translateY(12px); - - &:not(.label-icon).active { - transform: translateY(-14px) scale(0.8); - transform-origin: 0 0; +.widget { + &.widget-text, &.widget-textarea, &.widget-password { + > label { + color: $mateColor4; + position: absolute; + padding: 0 10px; + top: -3px; + left: 0; + font-size: 1rem; + cursor: text; + transition: transform 0.2s ease-out, color 0.2s ease-out; + transform-origin: 0% 100%; + text-align: initial; + transform: translateY(12px); + + &:not(.label-icon).active { + transform: translateY(-14px) scale(0.8); + transform-origin: 0 0; + } + } } } From 52a8deb54862ddb6a6ea0fa8a24b5102b2fabea7 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Wed, 14 Apr 2021 10:14:18 +0200 Subject: [PATCH 2/9] fix subnav --- src/Resources/public/js/theme.js | 7 ------- src/Resources/public/js/theme.min.js | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Resources/public/js/theme.js b/src/Resources/public/js/theme.js index 549f6a0..df1ddf6 100644 --- a/src/Resources/public/js/theme.js +++ b/src/Resources/public/js/theme.js @@ -290,13 +290,6 @@ jQuery(document).ready(function ($) { alignment: "left" }); - $("nav.subnav a.dropdown-button").dropdown({ - inDuration: 0, - outDuration: 0, - alignment: "right", - closeOnClick: false - }); - /* ===================== * * Toplink * * ====================== */ diff --git a/src/Resources/public/js/theme.min.js b/src/Resources/public/js/theme.min.js index 66a6aa6..6de5d88 100644 --- a/src/Resources/public/js/theme.min.js +++ b/src/Resources/public/js/theme.min.js @@ -1 +1 @@ -function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$("nav.subnav a.dropdown-button").dropdown({inDuration:0,outDuration:0,alignment:"right",closeOnClick:false});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file +function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file From 0f6b1cd72396242a5e18858637b0b0078e9ac7e0 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Wed, 14 Apr 2021 13:06:41 +0200 Subject: [PATCH 3/9] update theme.js and styling --- src/Resources/public/js/theme.js | 7 +++++ src/Resources/public/js/theme.min.js | 2 +- .../public/sass/_mate_variables.scss | 4 +++ src/Resources/public/sass/style.scss | 28 +++++++++++-------- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/Resources/public/js/theme.js b/src/Resources/public/js/theme.js index df1ddf6..549f6a0 100644 --- a/src/Resources/public/js/theme.js +++ b/src/Resources/public/js/theme.js @@ -290,6 +290,13 @@ jQuery(document).ready(function ($) { alignment: "left" }); + $("nav.subnav a.dropdown-button").dropdown({ + inDuration: 0, + outDuration: 0, + alignment: "right", + closeOnClick: false + }); + /* ===================== * * Toplink * * ====================== */ diff --git a/src/Resources/public/js/theme.min.js b/src/Resources/public/js/theme.min.js index 6de5d88..66a6aa6 100644 --- a/src/Resources/public/js/theme.min.js +++ b/src/Resources/public/js/theme.min.js @@ -1 +1 @@ -function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file +function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$("nav.subnav a.dropdown-button").dropdown({inDuration:0,outDuration:0,alignment:"right",closeOnClick:false});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file diff --git a/src/Resources/public/sass/_mate_variables.scss b/src/Resources/public/sass/_mate_variables.scss index 4f0eebc..09136d6 100644 --- a/src/Resources/public/sass/_mate_variables.scss +++ b/src/Resources/public/sass/_mate_variables.scss @@ -160,3 +160,7 @@ $slider-navigation-border-color: $mateColor1; $table-odd-background: $mateColorWhite; $table-even-background: $mateColorGreyLight; $table-border-color: $mateColorGreyDark; + +/* Dropdown */ +$dropdown-bg-color: $mateColorWhite; +$dropdown-color: $primary-text-color; diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 5607be0..d303f96 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -937,6 +937,10 @@ nav { line-height: 1; } +.mod_mateNavbar .nav-wrapper > .mod_article { + width: 0; +} + .mate_nav { margin-top: 25px; } @@ -2829,28 +2833,28 @@ input[type="file"] { .select-wrapper { input.select-dropdown { - background: $boxes-background; - border: 1px solid #e6e6e6; + background: $dropdown-bg-color; padding: 5px 15px; margin: 0; height: 40px; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; // latest Opera versions support -webkit- + user-select:none; + line-height: inherit; + color: $dropdown-color; + border: 2px solid $mateColor2; } .caret { z-index: 1; fill: $mateColor2; } -} -.select-wrapper input.select-dropdown{ - -webkit-user-select:none; - -moz-user-select:none; - -ms-user-select:none; - -o-user-select:none; // latest Opera versions support -webkit- - user-select:none; - line-height: inherit; - color: $mateColor4; - border: 2px solid $mateColor1; + select { + visibility: hidden; + } } .submit { From 8b4c1aadc5837207da0a0480a54b3416f47b88f1 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Fri, 16 Apr 2021 14:21:32 +0200 Subject: [PATCH 4/9] add teaser element and update styling --- .../mate/ce_hyperlink_teaser_mate.html5 | 19 +++ src/Resources/public/sass/style.scss | 158 +++++++++++++++++- 2 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 src/Resources/contao/templates/elements/mate/ce_hyperlink_teaser_mate.html5 diff --git a/src/Resources/contao/templates/elements/mate/ce_hyperlink_teaser_mate.html5 b/src/Resources/contao/templates/elements/mate/ce_hyperlink_teaser_mate.html5 new file mode 100644 index 0000000..a45ed8b --- /dev/null +++ b/src/Resources/contao/templates/elements/mate/ce_hyperlink_teaser_mate.html5 @@ -0,0 +1,19 @@ +
    cssID ?>style): ?> style="style ?>"> + + useImage): ?> +
    + embed_pre ?> + linkTitle): ?> title="linkTitle ?>" class="hyperlink_img"attribute ?>target ?>rel ?>>insert('picture_default', $this->picture); ?> + caption): ?> +
    caption ?>
    + +
    + embed_post ?> +
    + + embed_pre ?> + attribute ?>target ?>rel ?>>link ?> + embed_post ?> + + +
    diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index d303f96..5099e6a 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -195,6 +195,23 @@ img { } } +.bg-white { + position: relative; + z-index: 1; + padding: 50px 0; + + &:before { + position: absolute; + left: calc(0% - (100vw - 100%) / 2); + top: 0; + width: calc(100vw - 10px); + height: 100%; + background: $mateColorWhite; + content: ""; + z-index: -1; + } +} + /* ========================== * * Textelemente * * ========================== */ @@ -615,7 +632,7 @@ h1.bordered-right:after, h2.bordered-right:after, h3.bordered-right:after, h4.bo right: 0; } -.mod_article:first-child > { +#main .mod_article:first-child > { h2, h3, h4, h5, h6 { &:first-child { margin-top: 0; @@ -1195,6 +1212,10 @@ nav { } } + > a.active.forward { + background: $subnav-background; + } + a:first-child { margin-top: 0; } @@ -1203,6 +1224,19 @@ nav { i.material-icons { display: none; } + + .dropdown-content { + visibility: hidden; + height: 0; + position: absolute; + } + + .trail .dropdown-content { + visibility: visible; + height: inherit; + position: relative; + display: block; + } } .mod_navigation.subnav { @@ -2510,10 +2544,6 @@ footer.page-footer { } } - img { - max-width: 400px; - } - .layout_simple, .layout_upcoming { a { color: #fff; @@ -2543,6 +2573,25 @@ footer.page-footer { color: $footer-primary-link-color-hover; } } + + nav { + line-height: 1; + background: none; + box-shadow: none; + + li { + width: 100%; + + a, strong { + padding: 5px 0; + display: block; + } + + a:hover { + background: none; + } + } + } } footer .container { @@ -2608,6 +2657,15 @@ footer .container { } } +.social-icons { + display: flex; + flex-wrap: wrap; + + .ce_hyperlink { + margin: 0 20px 10px 0; + } +} + /* ========================== * * Media Elemente * * ========================== */ @@ -2911,8 +2969,10 @@ textarea { } .radio_container label { - padding: 0 15px 0 15px; + padding: 0 20px 0 0; color: $mateColor4; + margin-bottom: 5px; + display: inline-block; } [type="radio"]:not(:checked) + label, [type="radio"]:checked + label { @@ -2958,6 +3018,10 @@ textarea { height: inherit; } +input::placeholder { + color: rgba($footer-input-color, 0.7); +} + /* ========================== * * Module * * ========================== */ @@ -3510,6 +3574,74 @@ mark { } } +/* ========================== * + * Teaser Link * + * ========================== */ + +.ce_hyperlink.teaser { + &.m6 .caption { + font-size: 1.5em; + left: 20px; + bottom: 20px; + width: calc(100% - 40px); + } + + &.l4 .caption { + font-size: 1em; + left: 10px; + bottom: 10px; + width: calc(100% - 20px); + } + + &.l3 .caption { + font-size: 1em; + left: 10px; + bottom: 10px; + width: calc(100% - 20px); + } + + a { + display: block; + + &:before { + position: absolute; + content: ""; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: none; + transition: all .3s; + } + + &:hover:before { + background: rgba($mateColorWhite,.2); + } + } + + .caption { + position: absolute; + left: 40px; + bottom: 40px; + width: calc(100% - 80px); + background: $mateColor2; + color: $primary-text-color; + display: flex; + align-items: center; + justify-content: center; + font-size: 2em; + font-weight: 700; + text-align: center; + line-height: 1.2; + padding: 10px; + pointer-events: none; + } + + .image_container { + position: relative; + } +} + /* ========================== * * IE Fixes * * ========================== */ @@ -4215,6 +4347,20 @@ mark { font-size: 1.2rem; } + .ce_hyperlink.teaser { + .caption { + position: relative; + } + + &, &.m6, &.l4, &.l3 { + .caption { + bottom: inherit; + left: inherit; + width: 100%; + } + } + } + /* News */ .layout_latest.even, .layout_short.even, .layout_teaser.even, .layout_list.even { From b56d933c5e3ab89648665180a01484799b45ed89 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Wed, 21 Apr 2021 11:47:01 +0200 Subject: [PATCH 5/9] styling for numeric list --- src/Resources/public/sass/style.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 5099e6a..968bdac 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -350,8 +350,10 @@ code, pre { } } -.ce_list ol { - padding-left: 15px; +.ce_list, .ce_text { + ol { + padding-left: 15px; + } } .ce_accordion { From d576e34ea4dfbc0cc5221ef2b034c439cc345862 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Fri, 23 Apr 2021 10:23:25 +0200 Subject: [PATCH 6/9] update scripts and styling --- src/Resources/public/js/theme.js | 7 ++++++- src/Resources/public/js/theme.min.js | 2 +- src/Resources/public/sass/style.scss | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Resources/public/js/theme.js b/src/Resources/public/js/theme.js index 549f6a0..8acaf55 100644 --- a/src/Resources/public/js/theme.js +++ b/src/Resources/public/js/theme.js @@ -294,7 +294,12 @@ jQuery(document).ready(function ($) { inDuration: 0, outDuration: 0, alignment: "right", - closeOnClick: false + closeOnClick: false, + hover: false + }); + + $("nav.subnav a.dropdown-button").click(function() { + window.location.href = $(this).attr('href'); }); /* ===================== * diff --git a/src/Resources/public/js/theme.min.js b/src/Resources/public/js/theme.min.js index 66a6aa6..6acec39 100644 --- a/src/Resources/public/js/theme.min.js +++ b/src/Resources/public/js/theme.min.js @@ -1 +1 @@ -function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$("nav.subnav a.dropdown-button").dropdown({inDuration:0,outDuration:0,alignment:"right",closeOnClick:false});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file +function is_touch_device(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}jQuery(document).ready(function($){$("select").formSelect();var lang=$("html").attr("lang");var translations={nextMonth:"Next month",previousMonth:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"],today:"Today",clear:"Clear",done:"OK",cancel:"Cancel",format:"yyyy-mm-dd"};switch(lang){case"de":var translations={nextMonth:"Nächster Monat",previousMonth:"Vorheriger Monat",labelMonthSelect:"Monat wählen",labelYearSelect:"Jahr wählen",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],weekdaysAbbrev:["S","M","D","M","D","F","S"],today:"Heute",clear:"Löschen",done:"OK",cancel:"Abbrechen",format:"dd.mm.yyyy"};break;case"fr":var translations={nextMonth:"Mois suivant",previousMonth:"Mois précédent",labelMonthSelect:"Sélectionnez un mois",labelYearSelect:"Sélectionnez une année",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jun","Jul","Aou","Sep","Oct","Nov","Dec"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekdaysAbbrev:["D","L","M","M","J","V","S"],today:"Aujourd'hui",clear:"Réinitialiser",done:"OK",cancel:"Annuler",format:"dd/mm/yyyy"};break;case"pl":var translations={nextMonth:"W przyszłym miesiącu",previousMonth:"Poprzedni miesiąc",labelMonthSelect:"Wybierz miesiąc",labelYearSelect:"Wybierz rok",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],weekdays:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],weekdaysShort:["Nie","Pon","Wto","Sro","Czw","Pia","Sob"],weekdaysAbbrev:["N","P","W","S","C","P","S"],today:"Dziś",clear:"Jasne",done:"OK",cancel:"Anuluj",format:"dd.mm.yyyy"};break}$("input.datepicker").datepicker({selectMonths:true,selectYears:"150",maxDate:new Date((new Date).getFullYear()+30,(new Date).getMonth(),(new Date).getDate()),autoClose:true,format:translations.format,container:"div.datepicker",firstDay:1,i18n:{nextMonth:translations.nextMonth,previousMonth:translations.previousMonth,labelMonthSelect:translations.labelMonthSelect,labelYearSelect:translations.labelYearSelect,months:translations.months,monthsShort:translations.monthsShort,weekdays:translations.weekdays,weekdaysShort:translations.weekdaysShort,weekdaysAbbrev:translations.weekdaysAbbrev,today:translations.today,clear:translations.clear,done:translations.done,cancel:translations.cancel}});$("input.timepicker").timepicker({defaultTime:"now",fromNow:0,twelveHour:false,autoClose:false,container:"div.timepicker",i18n:{cancel:translations.cancel,clear:translations.clear,done:translations.done}});$(".slides .ce_text, .slides .ce_image, .slides .ce_mateTextBackgroundElement, .slides .ce_youtube, .slides .ce_player").each(function(index){var classList=$(this).attr("class");var id="";if(typeof $(this).attr("id")!=="undefined"){var id=" id='"+$(this).attr("id")+"'"}$(this).replaceWith("
  • "+$(this).html()+"
  • ")});if($(".slider-text-below-image li").length>0){$(".slider-text-below-image li").each(function(){var headline=$(this).find("> h2, > h3, > h4, > h5, > h6").html();var index=$(this).index()+1;setTimeout(function(){$(".slider-text-below-image .indicators li:nth-of-type("+index+")").html(headline)},100)});setSliderHeight();$(window).resize(function(){setSliderHeight()})}function setSliderHeight(){var height=0;var imageHeight,textHeight,elemHeight;$(".slider-text-below-image li").each(function(){imageHeight=$(this).find("img").height();textHeight=$(this).find("p").outerHeight();elemHeight=imageHeight+textHeight;if(elemHeight>height){height=elemHeight}});setTimeout(function(){$(".slider-text-below-image, .slider-text-below-image .slides").css("min-height",height+"px")},100)}$(".search a").click(function(){if($(".search-box").hasClass("active")){$(".search-box").removeClass("active");$("div").remove(".overlay")}else{$(".search-box").addClass("active");$("body").append('
    ')}});$(document).click(function(event){if($(event.target).closest(".overlay").length){$(".search-box").removeClass("active");$("div").remove(".overlay")}});$(window).scroll(function(){if($(".mod_mateNavbar").hasClass("headroom--unpinned")){$(".search-box").removeClass("active");$("div").remove(".overlay")}});var scrollTarget=$("#header .mod_mateNavbar").offset().top;if($("#header .mod_mateNavbar").hasClass("stuckNavbar")){$(window).scroll(function(){var scrollPos=$(window).scrollTop();if(scrollPos>scrollTarget){$("#header .mod_mateNavbar, #header .search-box").addClass("stuck")}else{$("#header .mod_mateNavbar, #header .search-box").removeClass("stuck")}})}if($("#header .mod_mateNavbar").hasClass("includeHeadroom")){var myElement=document.querySelector("#header .mod_mateNavbar");var headroom=new Headroom(myElement,{offset:600});headroom.init()}$(".sidenav").sidenav();if(is_touch_device()==false){$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:true,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$(".dropdown-button").click(function(){$(".dropdown-content .dropdown-content").hide();if(!$(this).hasClass("stopPropagation"))window.location.href=$(this).attr("href")})}else{$("nav:not(.subnav) .desktop-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav) .desktop-menu ul.dropdown-content a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left",constrainWidth:false,closeOnClick:false});$("nav:not(.subnav)").on("touchstart","a.dropdown-button",function(e){if($(this).hasClass("open")){window.location.href=$(this).attr("href")}if($(this).parents().parents().hasClass("desktop-menu")){$("a.dropdown-button").removeClass("open")}$(this).toggleClass("open")})}$("nav:not(.subnav) .mobile-menu a.dropdown-button").dropdown({inDuration:300,outDuration:225,hover:false,coverTrigger:false,alignment:"left"});$("nav.subnav a.dropdown-button").dropdown({inDuration:0,outDuration:0,alignment:"right",closeOnClick:false,hover:false});$("nav.subnav a.dropdown-button").click(function(){window.location.href=$(this).attr("href")});$(window).scroll(function(){scrollPos=$(document).scrollTop();$("footer .toplink").addClass("active");if(scrollPos<=500){$("footer .toplink").removeClass("active")}});$(document).on("click","footer .toplink:not(.custom)",function(event){event.preventDefault();$("html, body").animate({scrollTop:0},1e3)});$("a[href*=\\#]:not(.modal-trigger):not(.toplink)").on("click",function(event){var href=$(this).attr("href");if(href.indexOf("tabControl_")<0){href=href.substr(0,href.indexOf("#"));href=href.replace("./","");var path=window.location.pathname;path=path.replace("/","");if($(this).attr("target")!="_blank"&&path==href){event.preventDefault();$("html,body").animate({scrollTop:$(this.hash).offset().top-80},1500)}}else{setTimeout(function(){var tabControlId=href.substr(href.indexOf("#"));$("html,body").animate({scrollTop:$(tabControlId).offset().top-150},1500)},200)}});$("select[required]").css({display:"inline",position:"absolute",float:"left",padding:0,margin:0,border:"1px solid rgba(255,255,255,0)",height:0,width:0,top:"40px",left:"50%"});$(".modal").modal();$(".close-modal i").click(function(){$(".modal").modal("close")});$(".parallax").parallax()}); \ No newline at end of file diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 968bdac..32ebbae 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -3627,7 +3627,7 @@ mark { bottom: 40px; width: calc(100% - 80px); background: $mateColor2; - color: $primary-text-color; + color: $mateColorWhite; display: flex; align-items: center; justify-content: center; From 4f1bb5ff0bb140c73cc727de97fb525e1cfd2a82 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Fri, 23 Apr 2021 11:07:36 +0200 Subject: [PATCH 7/9] update styling --- src/Resources/public/sass/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 32ebbae..86a782e 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -2904,7 +2904,7 @@ input[type="file"] { user-select:none; line-height: inherit; color: $dropdown-color; - border: 2px solid $mateColor2; + border: 2px solid $mateColor1; } .caret { From 9bc4e43a8bcf64b09d30b4eb14b9a48913d1a3d5 Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Fri, 23 Apr 2021 17:35:08 +0200 Subject: [PATCH 8/9] add styling for hofff consent tool --- src/Resources/public/sass/hofff_consent.scss | 181 +++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 src/Resources/public/sass/hofff_consent.scss diff --git a/src/Resources/public/sass/hofff_consent.scss b/src/Resources/public/sass/hofff_consent.scss new file mode 100644 index 0000000..46c2927 --- /dev/null +++ b/src/Resources/public/sass/hofff_consent.scss @@ -0,0 +1,181 @@ +#hofff-consent-banner { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + background: #fff; + z-index: 100000; + max-height: 100%; + overflow-y: auto; + box-shadow: 0px 5px 7px #000000; + padding: 10px 0; + + .card { + background: $boxes-background; + box-shadow: none; + margin: 30px 0 0; + border-radius: 0; + } + + .card-header { + overflow: hidden; + background: #e0e0e0; + padding: 30px; + } + + .checkbox_container { + padding: 0; + background: none; + + &:nth-of-type(1) { + padding-top: 0; + } + + label { + font-size: 16px; + font-weight: 400; + } + } + + .col { + display: block; + } + + .formbody { + flex-wrap: wrap; + } + + .h2 { + font-size: 24px; + font-weight: 700; + margin-bottom: 0; + } + + .h3 { + font-size: 20px; + font-weight: 700; + } + + .hofff-consent-privacy-settings-toggle { + @extend .btn; + background: #f2f2f2; + color: #000; + + &:hover, &:focus { + color: #fff; + } + } + + .hofff-consent-buttons { + float: left; + margin-right: 10px; + } + + .hofff-consent-button-accept { + margin-right: 5px; + background: $mateColor2; + } + + .hofff-consent-button-revoke { + background: #b50000; + } + + .hofff-consent-privacy-settings-button { + float: right; + } + + .hofff-consent-privacy-settings { + clear: both; + + .hofff-consent-buttons { + width: 100%; + } + + .hofff-consent-button-close { + float: right; + + &:hover, &:focus { + color: #fff; + } + } + } + + .hofff-consent-feedback { + opacity: 0; + transition: opacity .5s; + } + + .hofff-consent-button-close { + background: #f2f2f2; + color: #000; + } + + .hofff-consent-banner-additional-content { + clear: both; + padding-top: 15px; + + nav ul a { + color: #000; + padding: 0; + margin-right: 15px; + font-size: 14px; + line-height: 1.2; + + &:hover { + background: none; + color: $mateColor2; + } + } + } + + .list-group-item { + padding: 30px; + + &:not(:last-child) { + border-bottom: 1px solid #e0e0e0; + } + } +} + +@media (max-width: 992px) { + #hofff-consent-banner { + .btn, .hofff-consent-privacy-settings-toggle { + padding: 0 15px; + } + } +} + +@media (max-width: 767px) { + #hofff-consent-banner { + .card-header, .list-group-item { + padding: 20px; + } + + .hofff-consent-buttons { + margin-bottom: 0; + + button { + margin-bottom: 10px; + } + } + + .hofff-consent-privacy-settings-button { + float: none; + } + + .hofff-consent-privacy-settings { + .hofff-consent-button-close { + float: none; + } + + .hofff-consent-buttons button { + margin-bottom: 10px; + margin-right: 5px; + } + } + + p { + font-size: 14px; + } + } +} From 8d39ff6d0ec72cc3b80aee19bf3cea4e705f5a9b Mon Sep 17 00:00:00 2001 From: Philipp Seibt Date: Mon, 26 Apr 2021 15:05:45 +0200 Subject: [PATCH 9/9] css fixes --- src/Resources/public/sass/style.scss | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Resources/public/sass/style.scss b/src/Resources/public/sass/style.scss index 86a782e..d958ae3 100644 --- a/src/Resources/public/sass/style.scss +++ b/src/Resources/public/sass/style.scss @@ -793,9 +793,9 @@ header { .submit { @extend .btn; height: 40px; - margin: 0; display: inline-block; vertical-align: top; + margin: 0; } &.stuck { @@ -815,6 +815,7 @@ header { display: inline-block; width: auto; float: none; + margin: 1rem 0; } } @@ -3985,12 +3986,6 @@ mark { font-size: 16px; } - #wrapper { - > .container { - margin-top: 20px; - } - } - footer .container { padding: 0; } @@ -4078,7 +4073,7 @@ mark { top: 101px; .formbody { - padding: 15px; + padding: 15px calc(5% / 2); } .widget-text { @@ -4430,6 +4425,10 @@ mark { padding: 15px; } + #header .search-box .formbody { + padding: 15px calc(10% / 2); + } + /* Formulare */ .file-field { margin-top: 0;