1// functions.js 2 3 4/* ============ MMenu (Main) ============*/ 5document.addEventListener("DOMContentLoaded", () => { 6 7 //var logoBrand = document.querySelector(".l-footer img"); 8 var logoBrand = document.querySelector(".l-header .brand img"); 9 var logoBrandClone = logoBrand.cloneNode(true); 10 11 12 //var footerAdress = document.querySelector(".l-footer .adresse"); 13 //var footerAdressDiv = footerAdress.cloneNode(true); 14 15 16 const menu = new Mmenu("#mobile-menu", { 17 18 //options 19 setSelected: true, 20 21 // navbars 22 "navbars": [{ 23 "position": "top", 24 "content": [logoBrandClone] 25 }, { 26 "position": "bottom", 27 "content": ["<div class='mobile-footer'><ul class='mobile-footer__navi'></ul></div>"] 28 },], 29 30 //Configuration 31 classNames: { 32 Selected: "mm-listitem_selected" //Change this class to match the default li you want 33 }, 34 35 // extensions 36 "extensions": [ 37 "border-full", 38 "pagedim-black", 39 "position-back", 40 "position-right", 41 "theme-white", 42 "shadow-page" 43 ], 44 setSelected: { 45 "hover": true, 46 "parent": true, 47 "current": "detect" 48 }, 49 50 51 backButton: { 52 // back button options 53 } 54 }, { 55 classNames: { 56 selected: "current" //Change this class to match the default li you want 57 }, 58 // configuration 59 offCanvas: { 60 clone: false, 61 //pageNodetype: "mm-wrap", 62 //menuWrapperSelector: "#the-current-wrapper", 63 classNames: { 64 selected: 'current' 65 } 66 } 67 }, { 68 backButton: { 69 // back button configuration 70 }, 71 72 }); 73 74 const api = menu.API; 75 76 77 // MMenu (Hamburger Clickfunktion) 78 document.querySelector("#mobile-nav-button").addEventListener( 79 "click", (evnt) => { 80 evnt.preventDefault(); 81 api.open(); 82 } 83 ); 84 85 document.querySelector('#mobile-nav-button').addEventListener('keyup', function (e) { 86 if (13 == e.keyCode) { 87 // evnt.preventDefault(); 88 api.open(); 89 } 90 }); 91 92// media query event handler 93if (matchMedia) { 94 const mq = window.matchMedia("(min-width: 500px)"); 95 mq.addListener(WidthChange); 96 WidthChange(mq); 97} 98 99// media query change 100function WidthChange(mq) { 101 if (mq.matches) { 102 // window width is at least 500px 103 } else { 104 // window width is less than 500px 105 } 106 107} 108 109 110 111 // Find the panel and listview. 112 var panel = document.querySelector(".mb-menu"); 113 var listview = document.querySelector(".mobile-footer__navi"); 114 115 116 // Impressum 117 var listitemImpressum = document.createElement("li"); 118 //console.log(listitemImpressum); 119 listitemImpressum.className = "mm-listitem secondlist"; 120 listitemImpressum.innerHTML = '<a class="mm-listitem__text" href="/kontakt-und-impressum">Impressum</a>'; 121 122 // Datenschutz 123 var listitemDatenschutz = document.createElement("li"); 124 //console.log(listitemDatenschutz); 125 listitemDatenschutz.className = "mm-listitem secondlist"; 126 listitemDatenschutz.innerHTML = '<a class="mm-listitem__text" href="/datenschutz">Datenschutz</a>'; 127 128 // Kontakte 129 var listitemKontakt = document.createElement("li"); 130 //console.log(listitemKontakt); 131 listitemKontakt.className = "mm-listitem secondlist cl-kontakt"; 132 listitemKontakt.innerHTML = '<a class="mm-listitem__text" href="/kontakt-und-impressum">Kontakt</a>'; 133 134 135 // Barrierefreiheit 136 var listitemBarrierefreiheit = document.createElement("li"); 137 //console.log(listitemBarrierefreiheit); 138 listitemBarrierefreiheit.className = "mm-listitem secondlist"; 139 listitemBarrierefreiheit.innerHTML = '<a class="mm-listitem__text" href="/barrierefreiheit">Barrierefreiheit</a>'; 140 141 142 143 // Add the listitem to the listview. 144 //listview.append(listitemNewsletter); 145 listview.append(listitemImpressum); 146 listview.append(listitemDatenschutz); 147 listview.append(listitemKontakt); 148 listview.append(listitemBarrierefreiheit); 149 150 151 152 // Update the listview. 153 //api.initListview(listview); 154 155}) 156 157 158/* ============ Superfish Menue - Hinzufuegen von Suchsymbol/Funktion ============*/ 159jQuery(document).ready(function ($) { 160 jQuery(".l-navigation .sf-menu").append("<li class='search toggle-overlay'><a href='#'><i class='fas fa-search'></i></a></li>"); 161 162 setTimeout(function () { 163 jQuery('.ui-autocomplete').appendTo('#quicksearch'); 164 jQuery('.ui-autocomplete').removeAttr( 'style' ); 165 },800); 166}); 167 168jQuery(document).ready(function ($) { 169 jQuery(function() { 170 jQuery('.toggle-overlay').click(function() { 171 jQuery('.search-overlay').toggleClass('open'); 172 jQuery('body').toggleClass('overflowhidden'); 173 174 }); 175 }); 176}); 177 178//Button-Funktion 179jQuery(document).ready(function(e) { 180 jQuery('.c-quicksearch__button').click( function() { 181 jQuery('form.c-quicksearch').submit(); 182 }); 183}); 184 185// API SWIPER ANSPRECHEN mit: 186 187 // const swiper = document.querySelector('.swiper-topthemen').swiper; 188 // Now you can use all slider methods like 189 // swiper.slideNext(); 190 191// Swiper 192// Swiper 193jQuery(document).ready(function (){ 194 195 // API ANSPRECHEN mit: 196 197 // const swiper = document.querySelector('.swiper-topthemen').swiper; 198 // Now you can use all slider methods like 199 // swiper.slideNext(); 200 201 202 // Startseite Pressemitteilungen 203 jQuery('.pm-topnews.slider').children().wrapAll("<div class='swiper-wrapper'></div>"); 204 jQuery('.pm-topnews.slider .swiper-wrapper').children().addClass("swiper-slide"); 205 jQuery(".pm-topnews.slider").append("<div class='swiper-pagination'></div>"); 206 jQuery(".pm-topnews.slider").prepend("<div class='swiper-button-next'></div><div class='swiper-button-prev'></div>"); 207 208 const swiperPressemitteilungen = new Swiper('.pm-topnews.slider', { 209 // Optional parameters 210 direction: 'horizontal', 211 loop: false, 212 spaceBetween: 60, 213 slidesPerView: 3, 214 // If we need pagination 215 /*pagination: { 216 el: '.swiper-pagination', 217 },*/ 218 // Keyboard Control 219 keyboard: { 220 enabled: true, 221 onlyInViewport: false, 222 }, 223 // Navigation arrows 224 navigation: { 225 nextEl: '.swiper-button-next', 226 prevEl: '.swiper-button-prev', 227 }, 228 229 // And if we need scrollbar 230 scrollbar: { 231 el: '.swiper-scrollbar', 232 }, 233 a11y: { 234 prevSlideMessage: 'Previous slide', 235 nextSlideMessage: 'Next slide', 236 }, 237 breakpoints: { 238 // when window width is >= 499px 239 0: { 240 slidesPerView: 1, 241 spaceBetweenSlides: 10 242 }, 243 // when window width is >= 600px 244 830: { 245 slidesPerView: 2, 246 spaceBetweenSlides: 30 247 }, 248 // when window width is >= 830px 249 1200: { 250 slidesPerView: 3, 251 spaceBetweenSlides: 40 252 } 253 }, 254 }); 255}); 256jQuery(function() {
257 //Festlegen einer einheitlichen Höhe für TopNews-Meldungen 258 var hoehe = function(){ 259 var varHeight = jQuery(".home .pm-topnews .swiper-wrapper").height(); 260 261 jQuery(".home .pm-topnews .swiper-wrapper").children().css( "height", varHeight ); 262 }; 263 jQuery(window).on('resize', function() { 264 hoehe(); 265 }); 266 window.onorientationchange = function() { 267 hoehe(); 268 }; 269});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.