PageSourceSearch

https://www.naturpark-aukrug.com/typo3conf/ext/npa/Resources/Public/JavaScript/Dist/scripts.js?1625840714

js naturpark-aukrug.com collected 2026-10-02 19:51:54 UTC 5,026 bytes, 173 lines download raw bytes

1/*!
2 * npa v1.0.0 (https://www.medienhandwerk.com)
3 * Copyright 2017-2021 Tim Hötzendorfer
4 * Licensed under the GPL-2.0-or-later license
5 */
6console.log("medienhandwerk ♥ TYPO3");
7
8$(document).ready(function () {
9    $(window).scroll(function () {
10        var scrollTop = $(window).scrollTop();
11        if (scrollTop > 100) {
12            $('.topbar').addClass('no-topbar');
13            $('.logo-box').addClass('logo-small');
14        } else {
15            $('.topbar').removeClass('no-topbar');
16            $('.logo-box').removeClass('logo-small');
17
18        }
19    });
20});
21
22mybutton = document.getElementById("backtopbtn");
23window.onscroll = function () {
24    scrollFunction()
25};
26
27function scrollFunction() {
28    if (document.body.scrollTop > 400 || document.documentElement.scrollTop > 400) {
29        mybutton.style.opacity = "1";
30    } else {
31        mybutton.style.opacity = "0";
32    }
33}
34
35function topFunction() {
36    document.body.scrollTop = 0; // For Safari
37    document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
38}
39
40document.addEventListener(
41    "DOMContentLoaded", () => {
42        new Mmenu("#my-menu", {
43            "extensions": [
44                "pagedim-black",
45                "position-right"
46            ],
47            "iconbar": {
48                "use": true,
49                "top": [
50                    "<a href='/'><i class='fas fa-home'></i></a>",
51                    "<a href='/karte'><i class='fas fa-map-marked'></i></a>",
52                    "<a href='/aktiv-geniessen/veranstaltungen'><i class='fas fa-calendar-alt'></i></a>"
53                ],
54            },
55            "navbars": [{
56                    "position": "top",
57                    "content": [
58                        "prev",
59                        "title"
60                    ]
61                },
62                {
63                    "position": "bottom",
64                    "content": [
65                        "<div class='mm-navbar mm-navbar_sticky'><ul class='mm-listview text-start''><li class='mm-listitem'><a class='mm-listitem__text' href='/impressum'>Impressum</a></li><li class='mm-listitem'><a class='mm-listitem__text' href='/datenschutzerklaerung'>Datenschutzerklärung</a></li></ul></div>"
66                    ]
67                }
68            ]
69        });
70    }
71);
72
73// store filter for each group
74var buttonFilters = {};
75var buttonFilter;
76// quick search regex
77var qsRegex;
78
79// init Isotope
80var $grid = $('.grid').isotope({
81    itemSelector: '.npa-produkte',
82    getSortData: {
83        name: '.name',
84        distanz: '.distanz',
85      },
86    filter: function () {
87        var $this = $(this);
88        var searchResult = qsRegex ? $this.text().match(qsRegex) : true;
89        var buttonResult = buttonFilter ? $this.is(buttonFilter) : true;
90        return searchResult && buttonResult;
91    }
92});
93
94$('.filters').on('click', '.button', function () {
95    var $this = $(this);
96    // get group key
97    var $buttonGroup = $this.parents('.button-group');
98    var filterGroup = $buttonGroup.attr('data-filter-group');
99    // set filter for group
100    buttonFilters[filterGroup] = $this.attr('data-filter');
101    // combine filters
102    buttonFilter = concatValues(buttonFilters);
103    // Isotope arrange
104    $grid.isotope();
105});
106
107// use value of search field to filter
108var $quicksearch = $('.quicksearch').keyup(debounce(function () {
109    qsRegex = new RegExp($quicksearch.val(), 'gi');
110    $grid.isotope();
111}));
112
113// change is-checked class on buttons
114$('.button-group').each(function (i, buttonGroup) {
115    var $buttonGroup = $(buttonGroup);
116    $buttonGroup.on('click', 'li', function () {
117        $buttonGroup.find('.is-checked').removeClass('is-checked');
118        $(this).addClass('is-checked');
119    });
120});
121
122// flatten object by concatting values
123function concatValues(obj) {
124    var value = '';
125    for (var prop in obj) {
126        value += obj[prop];
127    }
128    return value;
129}
130
131// debounce so filtering doesn't happen every millisecond
132function debounce(fn, threshold) {
133    var timeout;
134    threshold = threshold || 100;
135    return function debounced() {
136        clearTimeout(timeout);
137        var args = arguments;
138        var _this = this;
139
140        function delayed() {
141            fn.apply(_this, args);
142        }
143        timeout = setTimeout(delayed, threshold);
144    };
145}
146
147// bind sort button click
148$('.sort-by-button-group').on( 'click', 'li', function() {
149    var sortValue = $(this).attr('data-sort-value');
150    $grid.isotope({ sortBy: sortValue });
151  });
152
153  $grid.on( 'arrangeComplete', function( event, filteredItems ) {
154    //console.log( filteredItems.length );
155    if(filteredItems.length == 0){
156        $(".no-results").addClass('d-block');
157    }else{
158        $(".no-results").removeClass('d-block');
159    }
160});
161
162
163$('.single-news-item').slick({
164    dots: true,
165    autoplay: true,
166    autoplaySpeed: 2000
167});
168
169  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
170     attribution: 'Map data &copy; <a href="http://www.osm.org">OpenStreetMap</a>'
171   }).addTo(map);
172
173   

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.