Widget:Test3: mudanças entre as edições

De PokeXGames
Ir para navegação Ir para pesquisar
Sem resumo de edição
Sem resumo de edição
Linha 32: Linha 32:
         }
         }


.image-container img {
        .image-container img {
    object-fit: cover; /* Mantém a proporção da imagem, cortando se necessário */
            object-fit: cover;
    margin-bottom: 5px;
            margin-bottom: 5px;
}
        }


         .image-info {
         .image-info {
Linha 153: Linha 153:


         /* Estilo para os botões de tags */
         /* Estilo para os botões de tags */
         .tag-button {
         .tag-button {
             background-color: #f0f0f0;
             background-color: #f0f0f0;
             border: 1px solid #ccc;
             border: 1px solid #ccc;
             border-radius: 5px;
             border-radius: 20px;
             padding: 5px 10px;
             padding: 5px 15px;
             font-size: 14px;
             font-size: 14px;
             cursor: pointer;
             cursor: pointer;
             transition: background-color 0.3s, color 0.3s;
             transition: background-color 0.3s, color 0.3s;
            margin: 5px;
         }
         }


Linha 182: Linha 181:
             cursor: not-allowed;
             cursor: not-allowed;
         }
         }
     </style>  
     </style>
</head>
</head>
<body>
<body>
     <form id="mapForm">
     <form id="mapForm">
Linha 223: Linha 223:
                     <option value="tag">Filtrar por Tag</option>  
                     <option value="tag">Filtrar por Tag</option>  
                 </select>
                 </select>
                 <input type="text" id="searchIds" placeholder="Digite os números ou tags separados por vírgula" class="mapsCalc__select">
                 <input type="text" id="searchIds" placeholder="Digite os números ou tags separados por vírgula" class="maps__select">
             </div>
             </div>


             <div class="d-flex justify-center align-center flex-column">
             <div class="d-flex justify-center align-center flex-column">
Linha 237: Linha 236:
             <!-- As imagens e suas informações serão exibidas aqui -->
             <!-- As imagens e suas informações serão exibidas aqui -->
         </div>
         </div>
        <!-- Seção para os botões de tags -->
        <div id="tagButtonsContainer" class="d-flex">
            <button class="tag-button" data-value="Areia">Areia</button>
            <button class="tag-button" data-value="Gelo">Gelo</button>
            <button class="tag-button" data-value="Grama">Grama</button>
            <button class="tag-button" data-value="Pedra">Pedra</button>
            <button class="tag-button" data-value="Subaquático">Subaquático</button>
            <button class="tag-button" data-value="Terra">Terra</button>
            <button class="tag-button" data-value="Pisos">Pisos</button>
            <!-- Adicione outros botões de tags conforme necessário -->
        </div>
        <div id="selectedTags" class="d-flex"></div>
     </form>
     </form>


     <script>
     <script>
const specificOptions = {
        const specificOptions = {
1: {  
            1: {  
    'Areia': [  
                'Areia': [  
    { id: '101', local: 'Green Island', coordinates: '3780, 3326, 7',tags:['Areia','Água','Grama','Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/4/4c/Mapas_de_ADV_VERMELHO_-_3780%2C_3326%2C_7.webp' },  
                    { id: '101', local: 'Green Island', coordinates: '3780, 3326, 7', tags: ['Areia', 'Água', 'Grama', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/4/4c/Mapas_de_ADV_VERMELHO_-_3780%2C_3326%2C_7.webp' },  
    { id: '102', local: 'Wildwind Island', coordinates: '3969, 3300, 7',tags:['Areia','Terra','Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/5/58/Mapas_de_ADV_VERMELHO_-_3969%2C_3300%2C_7.webp' },  
                    { id: '102', local: 'Wildwind Island', coordinates: '3969, 3300, 7', tags: ['Areia', 'Terra', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/5/58/Mapas_de_ADV_VERMELHO_-_3969%2C_3300%2C_7.webp' },  
    { id: '103', local: 'Wildwind Island', coordinates: '4002, 3320, 7',tags:['Areia','Árvore','Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/0/07/Mapas_de_ADV_VERMELHO_-_4002%2C_3320%2C_7.webp' },  
                    { id: '103', local: 'Wildwind Island', coordinates: '3976, 3334, 7', tags: ['Areia'], imageUrl: 'https://wiki.pokexgames.com/images/6/62/Mapas_de_ADV_VERMELHO_-_3976%2C_3334%2C_7.webp' }  
    { id: '104', local: 'Saffron', coordinates: '4009, 3601, 7',tags:['Areia','Árvore','Terra','Água'], imageUrl: 'https://wiki.pokexgames.com/images/f/f5/Mapas_de_ADV_VERMELHO_-_4009%2C_3601%2C_7.webp' },  
                ],
    { id: '105', local: 'Hurricane Island', coordinates: '4166, 3302, 7',tags:['Areia','Árvore','Água'], imageUrl: 'https://wiki.pokexgames.com/images/0/0d/Mapas_de_ADV_VERMELHO_-_4166%2C_3302%2C_7.webp' },
                'Gelo': [
]
                    { id: '104', local: 'Snowy Mountain', coordinates: '3500, 3400, 7', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/7/74/Mapas_de_ADV_VERDE_-_3500%2C_3400%2C_7.webp' },  
                    { id: '105', local: 'Ice Palace', coordinates: '3700, 3200, 7', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/8/84/Mapas_de_ADV_VERDE_-_3700%2C_3200%2C_7.webp' }  
                ]
             },
             },
};
            2: {
 
                'Grama': [
        document.getElementById('enableFilter').addEventListener('change', function () {
                    { id: '106', local: 'Green Forest', coordinates: '3000, 3100, 7', tags: ['Grama', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/9/94/Mapas_de_ADV_VERDE_-_3000%2C_3100%2C_7.webp' }
            const filterSection = document.getElementById('filterSection');
                ],
            if (this.checked) {
                 'Pedra': [
                 filterSection.classList.remove('hidden');
                    { id: '107', local: 'Rocky Terrain', coordinates: '3200, 3400, 7', tags: ['Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/1/12/Mapas_de_ADV_VERDE_-_3200%2C_3400%2C_7.webp' }
            } else {
                ]
                filterSection.classList.add('hidden');
             }
             }
         });  
         };


         document.getElementById('searchIds').addEventListener('keypress', function (event) {
         const tagButtons = document.querySelectorAll('.tag-button');
            if (event.key === 'Enter') {
        const selectedTagsDiv = document.getElementById('selectedTags');
                event.preventDefault();
        const filterButton = document.getElementById('filterButton');
                document.getElementById('filterButton').click();
        const filterOption = document.getElementById('filterOption');
            }
        const searchIds = document.getElementById('searchIds');
         });
        const imageContainer = document.getElementById('imageContainer');
        const mapType = document.getElementById('mapType');
        const specificOption = document.getElementById('specificOption');
        const enableFilter = document.getElementById('enableFilter');
        const filterSection = document.getElementById('filterSection');
        const tagButtonsContainer = document.getElementById('tagButtonsContainer');
        const mapTypeSelection = document.getElementById('mapTypeSelection');
         const specificOptionsSection = document.getElementById('specificOptions');


         document.getElementById('mapType').addEventListener('change', function () {
         function filterImages() {
             const selectedMapType = this.value;
            imageContainer.innerHTML = '';
             const specificOptionSelect = document.getElementById('specificOption');
             const selectedMapType = mapType.value;
             const selectedLocal = specificOption.value;
            const filterByNumber = filterOption.value === 'number';
            const filterByTag = filterOption.value === 'tag';


             if (selectedMapType) {
             let selectedTags = [];
                specificOptionSelect.innerHTML = '<option value="">Selecione uma opção</option>';
            tagButtons.forEach(button => {
                const options = Object.keys(specificOptions[selectedMapType]);
                 if (button.classList.contains('selected')) {
                options.forEach(option => {
                    selectedTags.push(button.dataset.value);
                    specificOptionSelect.innerHTML += `<option value="${option}">${option}</option>`;
                }
                 });
            });
                document.getElementById('specificOptions').classList.remove('hidden');
            } else {
                document.getElementById('specificOptions').classList.add('hidden');
            }
        });


        document.getElementById('specificOption').addEventListener('change', function () {
            if (filterByNumber) {
            const selectedMapType = document.getElementById('mapType').value;
                const ids = searchIds.value.split(',').map(id => id.trim());
             const selectedOption = this.value;
                const filteredImages = Object.values(specificOptions)
            const imageContainer = document.getElementById('imageContainer');
                    .flatMap(options => Object.values(options))
                    .flat()
                    .filter(item => ids.includes(item.id));
                displayImages(filteredImages);
             } else if (filterByTag) {
                if (!selectedTags.length) return;
                let filteredImages = Object.values(specificOptions)
                    .flatMap(options => Object.values(options))
                    .flat()
                    .filter(item => {
                        return selectedTags.some(tag => item.tags.includes(tag));
                    });


            if (selectedMapType && selectedOption) {
                 if (selectedLocal) {
                const images = specificOptions[selectedMapType][selectedOption];
                     filteredImages = filteredImages.filter(item => item.tags.includes(selectedLocal));
                let imagesHtml = '';
 
                 if (Array.isArray(images)) {
                     images.forEach(image => {
                        imagesHtml += `
                            <div class="image-item">
                                <img src="${image.imageUrl}" alt="${selectedOption}">
                                <div class="image-info">
                        <b>Número do Mapa</b>: ${image.id} <br>
                        <b>Local</b>: ${image.local} <br>
                        <b>Coordenada</b>: ${image.coordinates}<br>
                        <b>Tag(s)</b>: ${image.tags.join(', ') || 'Nenhuma'}
                                </div>
                            </div>
                        `;
                    });
                 }
                 }


                 imageContainer.innerHTML = imagesHtml;
                 displayImages(filteredImages);
                imageContainer.classList.remove('hidden');
             } else {
             } else {
                 imageContainer.classList.add('hidden');
                 const filteredImages = Object.values(specificOptions)
                    .flatMap(options => Object.values(options))
                    .flat()
                    .filter(item => {
                        return (!selectedMapType || item.mapType === selectedMapType) &&
                              (!selectedLocal || item.local === selectedLocal) &&
                              (!selectedTags.length || selectedTags.some(tag => item.tags.includes(tag)));
                    });
                displayImages(filteredImages);
             }
             }
         });
         }


document.getElementById('filterButton').addEventListener('click', function () {
        function displayImages(images) {
    const searchIds = document.getElementById('searchIds').value.split(',').map(id => id.trim().toLowerCase());
            images.forEach(image => {
    const filterOption = document.getElementById('filterOption').value;
                const imageItem = document.createElement('div');
    const selectedMapType = document.getElementById('mapType').value;
                imageItem.className = 'image-item';
    const selectedSpecificOption = document.getElementById('specificOption').value;
                imageItem.innerHTML = `
    const imageContainer = document.getElementById('imageContainer');
                    <img src="${image.imageUrl}" alt="Map Image">
    let imagesHtml = '';
                    <div class="image-info">
    let allImages = [];
                        <p>Número do Mapa: ${image.id}</p>
if (filterOption === 'number') {
                        <p>Local: ${image.local}</p>
        if (searchIds.length > 0) {
                        <p>Coordenada: ${image.coordinates}</p>
            Object.keys(specificOptions).forEach(mapType => {
                        <p>Tag(s): ${image.tags.join(', ')}</p>
                const mapOptions = specificOptions[mapType];
                     </div>
                Object.keys(mapOptions).forEach(option => {
                `;
                     const images = mapOptions[option].filter(image => searchIds.includes(image.id));
                imageContainer.appendChild(imageItem);
                    allImages = allImages.concat(images);
                });
             });
             });
            imageContainer.classList.remove('hidden');
         }
         }
    }


    if (allImages.length > 0) {
         tagButtons.forEach(button => {
         allImages.sort((a, b) => a.local.localeCompare(b.local));
             button.addEventListener('click', function() {
 
                this.classList.toggle('selected');
        allImages.forEach(image => {
                updateSelectedTags();
             imagesHtml += `
                 filterImages();
                <div class="image-item">
             });
                    <img src="${image.imageUrl}" alt="Imagem ID ${image.id}">
                    <div class="image-info">
                        <b>Número do Mapa</b>: ${image.id} <br>
                        <b>Local</b>: ${image.local} <br>
                        <b>Coordenada</b>: ${image.coordinates}<br>
                        <b>Tag(s)</b>: ${image.tags.join(', ') || 'Nenhuma'}
                    </div>
                 </div>
             `;
         });
         });
    } else {
        imagesHtml = 'Nenhuma imagem encontrada com os critérios fornecidos.';
    }


    imageContainer.innerHTML = imagesHtml;
    imageContainer.classList.toggle('hidden', allImages.length === 0);
});
const tagButtons = document.querySelectorAll('.tag-button');
        const selectedTagsDiv = document.getElementById('selectedTags');
        // Função para atualizar as tags selecionadas
         function updateSelectedTags() {
         function updateSelectedTags() {
 
             selectedTagsDiv.innerHTML = '';
             // Adiciona as novas tags selecionadas
             tagButtons.forEach(button => {
             tagButtons.forEach(button => {
                 if (button.classList.contains('selected')) {
                 if (button.classList.contains('selected')) {
Linha 377: Linha 375:
         }
         }


         // Adiciona o listener para detectar cliques nos botões
         filterButton.addEventListener('click', filterImages);
        tagButtons.forEach(button => {
 
            button.addEventListener('click', function() {
        enableFilter.addEventListener('change', function() {
                 // Alterna a classe 'selected' para selecionar/deselecionar a tag
            if (this.checked) {
                 button.classList.toggle('selected');
                 mapTypeSelection.classList.add('hidden');
                 updateSelectedTags();
                specificOptionsSection.classList.add('hidden');
             });
                 filterSection.classList.remove('hidden');
                 imageContainer.innerHTML = '';
                imageContainer.classList.remove('hidden');
             } else {
                mapTypeSelection.classList.remove('hidden');
                specificOptionsSection.classList.remove('hidden');
                filterSection.classList.add('hidden');
                imageContainer.classList.add('hidden');
                searchIds.value = '';
                tagButtons.forEach(button => button.classList.remove('selected'));
                selectedTagsDiv.innerHTML = '';
            }
         });
         });
     </script>
     </script>
</body>
</body>
</html>
</html>

Edição das 03h27min de 4 de setembro de 2024

<!DOCTYPE html> <html lang="pt-BR">

<head>

   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Seleção e Exibição de Imagens</title>
   <style>
       .d-flex {
           display: flex;
           justify-content: center;
           align-items: center;
           flex-direction: column;
           margin-top: -15px;
       }
       .hidden {
           display: none;
       }
       .image-container {
           display: flex;
           flex-wrap: wrap;
           justify-content: center;
           gap: 10px;
           margin-top: 5px;
       }
       .image-container .image-item {
           flex: 1 0 30%;
           text-align: center;
       }
       .image-container img {
           object-fit: cover;
           margin-bottom: 5px;
       }
       .image-info {
           margin-top: 5px;
       }
       select,
       input[type="text"],
       button {
           margin: 5px;
       }
       #filterButton {
           background: none;
           border: none;
           padding: 0;
           cursor: pointer;
           margin-top: 5px;
           display: flex;
           align-items: center;
       }
       #filterButton img {
           border-radius: 12px;
           margin-right: 5px;
           align-items: center;
       }
       #filterButton span {
           font-size: 16px;
           color: #0d0d0d;
       }
       .mw-body-content {
           display: flex;
       }
       .mw-parser-output {
           display: inline-block;
           padding: .5rem 2rem;
           margin: 0 auto;
           border: 30px solid transparent;
           border-image: url(https://wiki.pokexgames.com/images/3/37/Calculadora-de-Boost.png) 38;
           min-width: 410px;
           min-height: 320px;
       }
       .input-group {
           position: relative;
           margin: 20px 0;
       }
       .input-group label {
           position: absolute;
           top: -18px;
           background: none;
           padding: 0 5px;
           font-size: 14px;
           font-weight: bold;
           color: #0d0d0d;
       }
       .maps__select {
           width: 100%;
           padding: 10px;
           font-size: 16px;
           border-radius: 5px;
           border: 1px solid #ccc;
           appearance: none;
           background-color: #fff;
           box-sizing: border-box;
       }
       .input-group input[type="text"] {
           width: 100%;
           padding: 10px;
           font-size: 16px;
           border-radius: 5px;
           border: 1px solid #ccc;
           box-sizing: border-box;
       }
       .maps__label {
           position: absolute;
           top: -18px;
           background: none;
           padding: 0 5px;
           font-size: 14px;
           font-weight: bold;
           color: #0d0d0d;
       }
       .hover-minimize:hover {
           transform: scale(0.95);
       }
       .filter-container {
           display: flex;
           align-items: center;
       }
       .filter-container input[type="checkbox"] {
           margin: 0;
           padding: 0;
           width: auto;
           height: auto;
           vertical-align: middle;
       }
       .filter-label {
           margin-left: 10px;
           font-size: 14px;
           font-weight: bold;
           color: #0d0d0d;
           line-height: 1.5;
       }
       /* Estilo para os botões de tags */
       .tag-button {
           background-color: #f0f0f0;
           border: 1px solid #ccc;
           border-radius: 20px;
           padding: 5px 15px;
           font-size: 14px;
           cursor: pointer;
           transition: background-color 0.3s, color 0.3s;
           margin: 5px;
       }
       .tag-button:hover {
           background-color: #ddd;
           color: #333;
       }
       .tag-button.selected {
           background-color: #007bff;
           color: #fff;
           border-color: #007bff;
       }
       .tag-button.disabled {
           background-color: #e0e0e0;
           color: #a0a0a0;
           border-color: #d0d0d0;
           cursor: not-allowed;
       }
   </style>

</head>

<body>

   <form id="mapForm">
           <select id="mapType" class="maps__select">
               <option value="">Selecione um mapa</option>
               <option value="1">Mapa Vermelho</option>
               <option value="2">Mapa Verde</option>
               <option value="3">Mapa Roxo</option>
           </select>
           <label class="maps__label" for="mapType">Tipo de Mapa</label>
           <input type="checkbox" id="enableFilter">
           <label for="enableFilter" class="filter-label">Ativar filtro</label>
           <button class="tag-button" data-value="Areia">Areia</button>
           <button class="tag-button" data-value="Gelo">Gelo</button>
           <button class="tag-button" data-value="Grama">Grama</button>
           <button class="tag-button" data-value="Pedra">Pedra</button>
           <button class="tag-button" data-value="Subaquático">Subaquático</button>
           <button class="tag-button" data-value="Terra">Terra</button>
           <button class="tag-button" data-value="Pisos">Pisos</button>
   </form>
   <script>
       const specificOptions = {
           1: { 
               'Areia': [ 
                   { id: '101', local: 'Green Island', coordinates: '3780, 3326, 7', tags: ['Areia', 'Água', 'Grama', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/4/4c/Mapas_de_ADV_VERMELHO_-_3780%2C_3326%2C_7.webp' }, 
                   { id: '102', local: 'Wildwind Island', coordinates: '3969, 3300, 7', tags: ['Areia', 'Terra', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/5/58/Mapas_de_ADV_VERMELHO_-_3969%2C_3300%2C_7.webp' }, 
                   { id: '103', local: 'Wildwind Island', coordinates: '3976, 3334, 7', tags: ['Areia'], imageUrl: 'https://wiki.pokexgames.com/images/6/62/Mapas_de_ADV_VERMELHO_-_3976%2C_3334%2C_7.webp' } 
               ],
               'Gelo': [ 
                   { id: '104', local: 'Snowy Mountain', coordinates: '3500, 3400, 7', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/7/74/Mapas_de_ADV_VERDE_-_3500%2C_3400%2C_7.webp' }, 
                   { id: '105', local: 'Ice Palace', coordinates: '3700, 3200, 7', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/8/84/Mapas_de_ADV_VERDE_-_3700%2C_3200%2C_7.webp' } 
               ]
           },
           2: { 
               'Grama': [ 
                   { id: '106', local: 'Green Forest', coordinates: '3000, 3100, 7', tags: ['Grama', 'Árvore'], imageUrl: 'https://wiki.pokexgames.com/images/9/94/Mapas_de_ADV_VERDE_-_3000%2C_3100%2C_7.webp' } 
               ],
               'Pedra': [ 
                   { id: '107', local: 'Rocky Terrain', coordinates: '3200, 3400, 7', tags: ['Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/1/12/Mapas_de_ADV_VERDE_-_3200%2C_3400%2C_7.webp' } 
               ]
           }
       };
       const tagButtons = document.querySelectorAll('.tag-button');
       const selectedTagsDiv = document.getElementById('selectedTags');
       const filterButton = document.getElementById('filterButton');
       const filterOption = document.getElementById('filterOption');
       const searchIds = document.getElementById('searchIds');
       const imageContainer = document.getElementById('imageContainer');
       const mapType = document.getElementById('mapType');
       const specificOption = document.getElementById('specificOption');
       const enableFilter = document.getElementById('enableFilter');
       const filterSection = document.getElementById('filterSection');
       const tagButtonsContainer = document.getElementById('tagButtonsContainer');
       const mapTypeSelection = document.getElementById('mapTypeSelection');
       const specificOptionsSection = document.getElementById('specificOptions');
       function filterImages() {
           imageContainer.innerHTML = ;
           const selectedMapType = mapType.value;
           const selectedLocal = specificOption.value;
           const filterByNumber = filterOption.value === 'number';
           const filterByTag = filterOption.value === 'tag';
           let selectedTags = [];
           tagButtons.forEach(button => {
               if (button.classList.contains('selected')) {
                   selectedTags.push(button.dataset.value);
               }
           });
           if (filterByNumber) {
               const ids = searchIds.value.split(',').map(id => id.trim());
               const filteredImages = Object.values(specificOptions)
                   .flatMap(options => Object.values(options))
                   .flat()
                   .filter(item => ids.includes(item.id));
               displayImages(filteredImages);
           } else if (filterByTag) {
               if (!selectedTags.length) return;
               let filteredImages = Object.values(specificOptions)
                   .flatMap(options => Object.values(options))
                   .flat()
                   .filter(item => {
                       return selectedTags.some(tag => item.tags.includes(tag));
                   });
               if (selectedLocal) {
                   filteredImages = filteredImages.filter(item => item.tags.includes(selectedLocal));
               }
               displayImages(filteredImages);
           } else {
               const filteredImages = Object.values(specificOptions)
                   .flatMap(options => Object.values(options))
                   .flat()
                   .filter(item => {
                       return (!selectedMapType || item.mapType === selectedMapType) &&
                              (!selectedLocal || item.local === selectedLocal) &&
                              (!selectedTags.length || selectedTags.some(tag => item.tags.includes(tag)));
                   });
               displayImages(filteredImages);
           }
       }
       function displayImages(images) {
           images.forEach(image => {
               const imageItem = document.createElement('div');
               imageItem.className = 'image-item';
               imageItem.innerHTML = `
                   <img src="${image.imageUrl}" alt="Map Image">

Número do Mapa: ${image.id}

Local: ${image.local}

Coordenada: ${image.coordinates}

Tag(s): ${image.tags.join(', ')}

               `;
               imageContainer.appendChild(imageItem);
           });
           imageContainer.classList.remove('hidden');
       }
       tagButtons.forEach(button => {
           button.addEventListener('click', function() {
               this.classList.toggle('selected');
               updateSelectedTags();
               filterImages();
           });
       });
       function updateSelectedTags() {
           selectedTagsDiv.innerHTML = ;
           tagButtons.forEach(button => {
               if (button.classList.contains('selected')) {
                   const tagItem = document.createElement('span');
                   tagItem.className = 'tag-item';
                   tagItem.textContent = button.dataset.value;
                   selectedTagsDiv.appendChild(tagItem);
               }
           });
       }
       filterButton.addEventListener('click', filterImages);
       enableFilter.addEventListener('change', function() {
           if (this.checked) {
               mapTypeSelection.classList.add('hidden');
               specificOptionsSection.classList.add('hidden');
               filterSection.classList.remove('hidden');
               imageContainer.innerHTML = ;
               imageContainer.classList.remove('hidden');
           } else {
               mapTypeSelection.classList.remove('hidden');
               specificOptionsSection.classList.remove('hidden');
               filterSection.classList.add('hidden');
               imageContainer.classList.add('hidden');
               searchIds.value = ;
               tagButtons.forEach(button => button.classList.remove('selected'));
               selectedTagsDiv.innerHTML = ;
           }
       });
   </script>

</body>

</html>