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 149: Linha 149:
     </div>
     </div>


    <script>
<script>
        const specificOptions = {
    const specificOptions = {
            1: { // Mapa Vermelho
        1: { // Mapa Vermelho
                '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: 'Desert', coordinates: '4500, 5300, 5', tags: ['Areia'], imageUrl: 'https://wiki.pokexgames.com/images/5/55/Mapa_Vermelho_ADV_-_4500%2C_5300%2C_5.webp' }
                { id: '102', local: 'Desert', coordinates: '4500, 5300, 5', tags: ['Areia'], imageUrl: 'https://wiki.pokexgames.com/images/5/55/Mapa_Vermelho_ADV_-_4500%2C_5300%2C_5.webp' }
                ],
            ],
                'Grama': [
            'Grama': [
                    { id: '103', local: 'Grassland', coordinates: '5600, 4700, 8', tags: ['Grama'], imageUrl: 'https://wiki.pokexgames.com/images/6/67/Mapa_Vermelho_ADV_-_5600%2C_4700%2C_8.webp' }
                { id: '103', local: 'Grassland', coordinates: '5600, 4700, 8', tags: ['Grama'], imageUrl: 'https://wiki.pokexgames.com/images/6/67/Mapa_Vermelho_ADV_-_5600%2C_4700%2C_8.webp' }
                ]
            ]
            },
        },
            2: { // Mapa Verde
        2: { // Mapa Verde
                'Gelo': [
            'Gelo': [
                    { id: '201', local: 'Frozen Lake', coordinates: '5100, 3300, 6', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/7/7b/Mapa_Verde_ADV_-_5100%2C_3300%2C_6.webp' }
                { id: '201', local: 'Frozen Lake', coordinates: '5100, 3300, 6', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/7/7b/Mapa_Verde_ADV_-_5100%2C_3300%2C_6.webp' }
                ],
            ],
                'Pedra': [
            'Pedra': [
                    { id: '202', local: 'Rocky Mountains', coordinates: '4700, 5600, 5', tags: ['Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/8/8e/Mapa_Verde_ADV_-_4700%2C_5600%2C_5.webp' }
                { id: '202', local: 'Rocky Mountains', coordinates: '4700, 5600, 5', tags: ['Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/8/8e/Mapa_Verde_ADV_-_4700%2C_5600%2C_5.webp' }
                ]
            ]
            },
        },
            3: { // Mapa Roxo
        3: { // Mapa Roxo
                'Subaquático': [
            'Subaquático': [
                    { id: '301', local: 'Underwater Cave', coordinates: '3000, 2900, 4', tags: ['Água', 'Subaquático'], imageUrl: 'https://wiki.pokexgames.com/images/9/93/Mapa_Roxo_ADV_-_3000%2C_2900%2C_4.webp' }
                { id: '301', local: 'Underwater Cave', coordinates: '3000, 2900, 4', tags: ['Água', 'Subaquático'], imageUrl: 'https://wiki.pokexgames.com/images/9/93/Mapa_Roxo_ADV_-_3000%2C_2900%2C_4.webp' }
                ],
            ],
                'Terra': [
            'Terra': [
                    { id: '302', local: 'Earth Plains', coordinates: '3400, 4400, 6', tags: ['Terra'], imageUrl: 'https://wiki.pokexgames.com/images/a/a1/Mapa_Roxo_ADV_-_3400%2C_4400%2C_6.webp' }
                { id: '302', local: 'Earth Plains', coordinates: '3400, 4400, 6', tags: ['Terra'], imageUrl: 'https://wiki.pokexgames.com/images/a/a1/Mapa_Roxo_ADV_-_3400%2C_4400%2C_6.webp' }
                ]
            ]
            }
        }
        };
    };


        const mapTypeSelect = document.getElementById('mapType');
    const mapTypeSelect = document.getElementById('mapType');
        const specificOptionSelect = document.getElementById('specificOption');
    const specificOptionSelect = document.getElementById('specificOption');
        const filterOptions = document.getElementById('filterOptions');
    const filterOptions = document.getElementById('filterOptions');
        const tagButtons = document.getElementById('tagButtons');
    const tagButtons = document.getElementById('tagButtons');
        const imageContainer = document.getElementById('imageContainer');
    const imageContainer = document.getElementById('imageContainer');
        const enableFilter = document.getElementById('enableFilter');
    const enableFilter = document.getElementById('enableFilter');
    const filterTypeSelect = document.getElementById('filterType');
    const searchIdsInput = document.getElementById('searchIds');
    const filterButton = document.getElementById('filterButton');


function updateTags() {
    function updateTags() {
    const selectedMapType = mapTypeSelect.value;
        const selectedMapType = mapTypeSelect.value;
    const selectedOption = specificOptionSelect.value;
        const selectedOption = specificOptionSelect.value;


    let tags = [];
        let tags = [];
    if (selectedMapType && selectedOption) {
        if (selectedMapType && selectedOption) {
        const options = specificOptions[selectedMapType];
            const options = specificOptions[selectedMapType];
        if (options && options[selectedOption]) {
            if (options && options[selectedOption]) {
            options[selectedOption].forEach(item => {
                options[selectedOption].forEach(item => {
                tags = [...new Set([...tags, ...item.tags])];
                    tags = [...new Set([...tags, ...item.tags])];
            });
                });
            }
         }
         }
    }


    tagButtons.innerHTML = '';
        tagButtons.innerHTML = '';


    // Mapeia as tags para habilitar ou desabilitar
        const disabledTags = {
    const disabledTags = {
            'Areia': 'Areia',
        'Areia': 'Areia',
            'Gelo': 'Gelo',
        'Gelo': 'Gelo',
            'Grama': 'Grama',
        'Grama': 'Grama',
            'Pedra': 'Pedra',
        'Pedra': 'Pedra',
            'Subaquático': 'Água',
        'Subaquático': 'Água',
            'Terra': 'Terra',
        'Terra': 'Terra',
            'Pisos': 'Piso'
        'Pisos': 'Piso'
        };
    };


    tags.forEach(tag => {
        tags.forEach(tag => {
        const button = document.createElement('button');
            const button = document.createElement('button');
        button.textContent = tag;
            button.textContent = tag;
        button.classList.add('tag-button');
            button.classList.add('tag-button');
        if (disabledTags[selectedOption] === tag) {
            if (disabledTags[selectedOption] === tag) {
            button.disabled = true; // Desabilitar a tag correspondente ao Local do X
                button.disabled = true; // Desabilitar a tag correspondente ao Local do X
            button.classList.add('disabled');
                button.classList.add('disabled');
        }
        button.addEventListener('click', () => {
            if (!button.disabled) {
                button.classList.toggle('selected');
                filterImages();
             }
             }
            button.addEventListener('click', () => {
                if (!button.disabled) {
                    button.classList.toggle('selected');
                    filterImages();
                }
            });
            tagButtons.appendChild(button);
         });
         });
        tagButtons.appendChild(button);
    });
    tagButtons.classList.toggle('hidden', tags.length === 0);
}


        tagButtons.classList.toggle('hidden', tags.length === 0);
    }


function filterImages() {
    function filterImages() {
    const selectedTags = Array.from(document.querySelectorAll('.tag-button.selected')).map(btn => btn.textContent);
        const selectedTags = Array.from(document.querySelectorAll('.tag-button.selected')).map(btn => btn.textContent);
    const selectedMapType = mapTypeSelect.value;
        const selectedMapType = mapTypeSelect.value;
    const selectedOption = specificOptionSelect.value;
        const selectedOption = specificOptionSelect.value;
    const filterById = searchIdsInput.value.trim();
        const filterById = searchIdsInput.value.trim();


    imageContainer.innerHTML = '';
        imageContainer.innerHTML = '';


    let itemsToFilter = [];
        let itemsToFilter = [];


    if (selectedMapType) {
        if (selectedMapType) {
        const options = specificOptions[selectedMapType];
            const options = specificOptions[selectedMapType];
        if (options) {
            if (options) {
            if (selectedOption && options[selectedOption]) {
                if (selectedOption && options[selectedOption]) {
                itemsToFilter = options[selectedOption];
                    itemsToFilter = options[selectedOption];
                }
             }
             }
         }
         } else {
    } else {
            // Se nenhum tipo de mapa for selecionado, reunir itens de todos os tipos de mapa
        // If no map type is selected, gather items from all map types
            for (const mapType in specificOptions) {
        for (const mapType in specificOptions) {
                for (const local in specificOptions[mapType]) {
            for (const local in specificOptions[mapType]) {
                    itemsToFilter = itemsToFilter.concat(specificOptions[mapType][local]);
                itemsToFilter = itemsToFilter.concat(specificOptions[mapType][local]);
                }
             }
             }
         }
         }
    }


    if (itemsToFilter.length > 0) {
        if (itemsToFilter.length > 0) {
        const filteredItems = itemsToFilter.filter(item => {
            const filteredItems = itemsToFilter.filter(item => {
            const matchesTag = selectedTags.length === 0 || selectedTags.some(tag => item.tags.includes(tag));
                const matchesTag = selectedTags.length === 0 || selectedTags.some(tag => item.tags.includes(tag));
            const matchesId = filterById === '' || filterById.split(',').map(id => id.trim()).includes(item.id);
                const matchesId = filterById === '' || filterById.split(',').map(id => id.trim()).includes(item.id);
            const matchesLocal = selectedOption === '' || item.tags.includes(selectedOption);
                const matchesLocal = selectedOption === '' || item.tags.includes(selectedOption);
           
               
            return matchesTag && matchesId && matchesLocal;
                return matchesTag && matchesId && matchesLocal;
        });
            });


        filteredItems.forEach(item => {
            filteredItems.forEach(item => {
            const itemDiv = document.createElement('div');
                const itemDiv = document.createElement('div');
            itemDiv.classList.add('image-item');
                itemDiv.classList.add('image-item');


            const img = document.createElement('img');
                const img = document.createElement('img');
            img.src = item.imageUrl;
                img.src = item.imageUrl;
            img.alt = `Mapa ${item.id}`;
                img.alt = `Mapa ${item.id}`;
            itemDiv.appendChild(img);
                itemDiv.appendChild(img);


            const infoDiv = document.createElement('div');
                const infoDiv = document.createElement('div');
            infoDiv.classList.add('image-info');
                infoDiv.classList.add('image-info');
            infoDiv.innerHTML = `
                infoDiv.innerHTML = `
                <strong>Número do Mapa:</strong> ${item.id}<br>
                    <strong>Número do Mapa:</strong> ${item.id}<br>
                <strong>Local:</strong> ${item.local}<br>
                    <strong>Local:</strong> ${item.local}<br>
                <strong>Coordenada:</strong> ${item.coordinates}<br>
                    <strong>Coordenada:</strong> ${item.coordinates}<br>
                <strong>Tag(s):</strong> ${item.tags.join(', ')}
                    <strong>Tag(s):</strong> ${item.tags.join(', ')}
            `;
                `;
            itemDiv.appendChild(infoDiv);
                itemDiv.appendChild(infoDiv);


            imageContainer.appendChild(itemDiv);
                imageContainer.appendChild(itemDiv);
        });
            });


        if (filteredItems.length === 0) {
            if (filteredItems.length === 0) {
            imageContainer.innerHTML = '<p>Nenhuma imagem encontrada para os critérios selecionados.</p>';
                imageContainer.innerHTML = '<p>Nenhuma imagem encontrada para os critérios selecionados.</p>';
            }
         }
         }
     }
     }
}


        function handleFilterChange() {
    function handleFilterChange() {
            const isFilterEnabled = enableFilter.checked;
        const isFilterEnabled = enableFilter.checked;
            const filterTypeSelect = document.getElementById('filterType');
            const searchIdsInput = document.getElementById('searchIds');
            const filterButton = document.getElementById('filterButton');


            if (isFilterEnabled) {
        if (isFilterEnabled) {
                mapTypeSelect.disabled = true;
            mapTypeSelect.disabled = true;
                specificOptionSelect.disabled = true;
            specificOptionSelect.disabled = true;
                filterOptions.classList.remove('hidden');
            filterOptions.classList.remove('hidden');
                tagButtons.classList.add('hidden');  
            tagButtons.classList.add('hidden');  


                filterTypeSelect.value = 'number';  
            filterTypeSelect.value = 'number';  
                filterButton.addEventListener('click', () => {
            filterButton.addEventListener('click', () => {
                    filterImages();
                filterImages();
                });
            });


                mapTypeSelect.value = '';
            mapTypeSelect.value = '';
                specificOptionSelect.value = '';
            specificOptionSelect.value = '';
                searchIdsInput.value = '';
            searchIdsInput.value = '';
                imageContainer.innerHTML = '';
            imageContainer.innerHTML = '';
            } else {
        } else {
                mapTypeSelect.disabled = false;
            mapTypeSelect.disabled = false;
                specificOptionSelect.disabled = false;
            specificOptionSelect.disabled = false;
                filterOptions.classList.add('hidden');
            filterOptions.classList.add('hidden');
                tagButtons.classList.remove('hidden');  
            tagButtons.classList.remove('hidden');  


                searchIdsInput.value = '';
            searchIdsInput.value = '';
                imageContainer.innerHTML = '';
            imageContainer.innerHTML = '';
                updateTags();
            updateTags();
            }
         }
         }
    }
    enableFilter.addEventListener('change', handleFilterChange);
    mapTypeSelect.addEventListener('change', () => {
        updateTags();
        filterImages();
    });
    specificOptionSelect.addEventListener('change', () => {
        updateTags();
        filterImages();
    });


        enableFilter.addEventListener('change', handleFilterChange);
    // Inicializa a exibição das tags e imagens
        mapTypeSelect.addEventListener('change', () => {
    updateTags();
            updateTags();
</script>
            filterImages();
        });
        specificOptionSelect.addEventListener('change', () => {
            updateTags();
            filterImages();
        });


        updateTags();
    </script>
</body>
</body>
</html>
</html>

Edição das 01h12min 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 de Mapas</title>
   <style>
       .hidden {
           display: none;
       }
       .input-group {
           margin: 20px 0;
       }
       .maps__select,
       .input-group input[type="text"],
       .input-group button {
           width: 100%;
           padding: 10px;
           margin-top: 5px;
           font-size: 16px;
           border-radius: 5px;
           border: 1px solid #ccc;
       }
       .image-container {
           display: flex;
           flex-wrap: wrap;
           gap: 10px;
           margin-top: 20px;
       }
       .image-item {
           flex: 1 0 30%;
           text-align: center;
       }
       .image-item img {
           max-width: 100%;
           height: auto;
       }
       .image-info {
           margin-top: 5px;
       }
       .tag-button {
           display: inline-block;
           background-color: #f1f1f1;
           color: #333;
           padding: 10px 20px;
           margin: 5px;
           border: 1px solid #ccc;
           border-radius: 20px;
           cursor: pointer;
           font-size: 16px;
       }
       .tag-button.selected {
           background-color: #15864e;
           color: #fff;
       }
       .filter-container {
           display: flex;
           align-items: center;
           margin-bottom: 20px;
       }
       .filter-container input[type="checkbox"] {
           margin-right: 10px;
       }
       .filter-container label {
           font-size: 16px;
       }
       .selected-tags {
           margin: 20px;
           padding: 10px;
           background-color: #f9f9f9;
           border: 1px solid #ccc;
           border-radius: 5px;
       }
       .tag-item {
           display: inline-block;
           background-color: #007BFF;
           color: white;
           padding: 5px 10px;
           margin-right: 5px;
           border-radius: 3px;
           font-size: 14px;
       }

.tag-button.disabled {

   background-color: #e0e0e0;
   color: #b0b0b0;
   cursor: not-allowed;
   border: 1px solid #ccc;

}

   </style>

</head> <body>

       <label for="mapType">Tipo de Mapa</label>
       <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 for="specificOption">Local do X</label>
       <select id="specificOption" class="maps__select">
           <option value="">Selecione uma opção</option>
           <option value="Areia">Areia</option>
           <option value="Gelo">Gelo</option>
           <option value="Grama">Grama</option>
           <option value="Pedra">Pedra</option>
           <option value="Subaquático">Subaquático</option>
           <option value="Terra">Terra</option>
           <option value="Pisos">Pisos</option>
       </select>
       <input type="checkbox" id="enableFilter">
       <label for="enableFilter">Ativar filtro</label>

<script>

   const specificOptions = {
       1: { // Mapa Vermelho
           '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: 'Desert', coordinates: '4500, 5300, 5', tags: ['Areia'], imageUrl: 'https://wiki.pokexgames.com/images/5/55/Mapa_Vermelho_ADV_-_4500%2C_5300%2C_5.webp' }
           ],
           'Grama': [
               { id: '103', local: 'Grassland', coordinates: '5600, 4700, 8', tags: ['Grama'], imageUrl: 'https://wiki.pokexgames.com/images/6/67/Mapa_Vermelho_ADV_-_5600%2C_4700%2C_8.webp' }
           ]
       },
       2: { // Mapa Verde
           'Gelo': [
               { id: '201', local: 'Frozen Lake', coordinates: '5100, 3300, 6', tags: ['Gelo'], imageUrl: 'https://wiki.pokexgames.com/images/7/7b/Mapa_Verde_ADV_-_5100%2C_3300%2C_6.webp' }
           ],
           'Pedra': [
               { id: '202', local: 'Rocky Mountains', coordinates: '4700, 5600, 5', tags: ['Pedra'], imageUrl: 'https://wiki.pokexgames.com/images/8/8e/Mapa_Verde_ADV_-_4700%2C_5600%2C_5.webp' }
           ]
       },
       3: { // Mapa Roxo
           'Subaquático': [
               { id: '301', local: 'Underwater Cave', coordinates: '3000, 2900, 4', tags: ['Água', 'Subaquático'], imageUrl: 'https://wiki.pokexgames.com/images/9/93/Mapa_Roxo_ADV_-_3000%2C_2900%2C_4.webp' }
           ],
           'Terra': [
               { id: '302', local: 'Earth Plains', coordinates: '3400, 4400, 6', tags: ['Terra'], imageUrl: 'https://wiki.pokexgames.com/images/a/a1/Mapa_Roxo_ADV_-_3400%2C_4400%2C_6.webp' }
           ]
       }
   };
   const mapTypeSelect = document.getElementById('mapType');
   const specificOptionSelect = document.getElementById('specificOption');
   const filterOptions = document.getElementById('filterOptions');
   const tagButtons = document.getElementById('tagButtons');
   const imageContainer = document.getElementById('imageContainer');
   const enableFilter = document.getElementById('enableFilter');
   const filterTypeSelect = document.getElementById('filterType');
   const searchIdsInput = document.getElementById('searchIds');
   const filterButton = document.getElementById('filterButton');
   function updateTags() {
       const selectedMapType = mapTypeSelect.value;
       const selectedOption = specificOptionSelect.value;
       let tags = [];
       if (selectedMapType && selectedOption) {
           const options = specificOptions[selectedMapType];
           if (options && options[selectedOption]) {
               options[selectedOption].forEach(item => {
                   tags = [...new Set([...tags, ...item.tags])];
               });
           }
       }
       tagButtons.innerHTML = ;
       const disabledTags = {
           'Areia': 'Areia',
           'Gelo': 'Gelo',
           'Grama': 'Grama',
           'Pedra': 'Pedra',
           'Subaquático': 'Água',
           'Terra': 'Terra',
           'Pisos': 'Piso'
       };
       tags.forEach(tag => {
           const button = document.createElement('button');
           button.textContent = tag;
           button.classList.add('tag-button');
           if (disabledTags[selectedOption] === tag) {
               button.disabled = true; // Desabilitar a tag correspondente ao Local do X
               button.classList.add('disabled');
           }
           button.addEventListener('click', () => {
               if (!button.disabled) {
                   button.classList.toggle('selected');
                   filterImages();
               }
           });
           tagButtons.appendChild(button);
       });
       tagButtons.classList.toggle('hidden', tags.length === 0);
   }
   function filterImages() {
       const selectedTags = Array.from(document.querySelectorAll('.tag-button.selected')).map(btn => btn.textContent);
       const selectedMapType = mapTypeSelect.value;
       const selectedOption = specificOptionSelect.value;
       const filterById = searchIdsInput.value.trim();
       imageContainer.innerHTML = ;
       let itemsToFilter = [];
       if (selectedMapType) {
           const options = specificOptions[selectedMapType];
           if (options) {
               if (selectedOption && options[selectedOption]) {
                   itemsToFilter = options[selectedOption];
               }
           }
       } else {
           // Se nenhum tipo de mapa for selecionado, reunir itens de todos os tipos de mapa
           for (const mapType in specificOptions) {
               for (const local in specificOptions[mapType]) {
                   itemsToFilter = itemsToFilter.concat(specificOptions[mapType][local]);
               }
           }
       }
       if (itemsToFilter.length > 0) {
           const filteredItems = itemsToFilter.filter(item => {
               const matchesTag = selectedTags.length === 0 || selectedTags.some(tag => item.tags.includes(tag));
               const matchesId = filterById ===  || filterById.split(',').map(id => id.trim()).includes(item.id);
               const matchesLocal = selectedOption ===  || item.tags.includes(selectedOption);
               
               return matchesTag && matchesId && matchesLocal;
           });
           filteredItems.forEach(item => {
               const itemDiv = document.createElement('div');
               itemDiv.classList.add('image-item');
               const img = document.createElement('img');
               img.src = item.imageUrl;
               img.alt = `Mapa ${item.id}`;
               itemDiv.appendChild(img);
               const infoDiv = document.createElement('div');
               infoDiv.classList.add('image-info');
               infoDiv.innerHTML = `
                   Número do Mapa: ${item.id}
Local: ${item.local}
Coordenada: ${item.coordinates}
Tag(s): ${item.tags.join(', ')} `; itemDiv.appendChild(infoDiv);
               imageContainer.appendChild(itemDiv);
           });
           if (filteredItems.length === 0) {

imageContainer.innerHTML = '

Nenhuma imagem encontrada para os critérios selecionados.

';

           }
       }
   }
   function handleFilterChange() {
       const isFilterEnabled = enableFilter.checked;
       if (isFilterEnabled) {
           mapTypeSelect.disabled = true;
           specificOptionSelect.disabled = true;
           filterOptions.classList.remove('hidden');
           tagButtons.classList.add('hidden'); 
           filterTypeSelect.value = 'number'; 
           filterButton.addEventListener('click', () => {
               filterImages();
           });
           mapTypeSelect.value = ;
           specificOptionSelect.value = ;
           searchIdsInput.value = ;
           imageContainer.innerHTML = ;
       } else {
           mapTypeSelect.disabled = false;
           specificOptionSelect.disabled = false;
           filterOptions.classList.add('hidden');
           tagButtons.classList.remove('hidden'); 
           searchIdsInput.value = ;
           imageContainer.innerHTML = ;
           updateTags();
       }
   }
   enableFilter.addEventListener('change', handleFilterChange);
   mapTypeSelect.addEventListener('change', () => {
       updateTags();
       filterImages();
   });
   specificOptionSelect.addEventListener('change', () => {
       updateTags();
       filterImages();
   });
   // Inicializa a exibição das tags e imagens
   updateTags();

</script>

</body> </html>