Feature/TouristAttractionsAutoJs #1
14
js.js
14
js.js
@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
const inputDescription = document.querySelector('.input-text__descricao');
|
const inputDescription = document.querySelector('.input-text__descricao');
|
||||||
const form = document.querySelector('.form__tourist-attractions');
|
const form = document.querySelector('.form__tourist-attractions');
|
||||||
|
|
||||||
const ulList = document.querySelector('wrapper-ul__cards');
|
const ulList = document.querySelector('.wrapper-ul__cards');
|
||||||
|
|
||||||
//Image Preview
|
//Image Preview
|
||||||
inputFile.addEventListener('change', (e) => {
|
inputFile.addEventListener('change', (e) => {
|
||||||
@ -75,23 +75,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}else {
|
}else {
|
||||||
alert('Preencha todos os campos')
|
alert('Preencha todos os campos')
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
const renderListItems = () => {
|
function renderListItems () {
|
||||||
let spotStructure = '';
|
let spotStructure = '';
|
||||||
|
|
||||||
list.forEach((i) => {
|
list.forEach(function (i) {
|
||||||
spotStructure += `
|
spotStructure += `
|
||||||
<li class="wrapper-cards__li">
|
<li class="wrapper-cards__li">
|
||||||
|
|
||||||
<div class="cards">
|
<div class="result-card__img">
|
||||||
<img class="result-card__img" src="${i.image}" alt="Imagem Turismo" />
|
<img class="result-card__img" src="${i.image}" alt="Imagem Turismo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="result-card__text">
|
<div class="result-card__text">
|
||||||
<h2 class="result-card__title">${i.titulo}</h2>
|
<h2 class="result-card__title">${i.titulo}</h2>
|
||||||
p class="result-card__description">${i.description}</p>
|
<p> class="result-card__description">${i.description}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -100,7 +100,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ulList.innerHTML = spotStructure;
|
ulList.innerHTML = spotStructure;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user