let ulEl
let list = ["Мастер и Маргарита", "Гарри Поттер", "За пропастью во лжи", "Властелин колец", "Дюна", "Отцы и дети"]
const Header = document.createElement('h1');
Header.textContent = 'Домашняя библиотека'
document.body.append(Header)
const Addbutton = document.createElement('button');
Addbutton.textContent = 'Добавить книгу'
document.body.append(Addbutton)
const Searchbutton = document.createElement('button');
Searchbutton.textContent = 'Найти'
document.body.append(Searchbutton)
function newlist() {
ulEl = document.createElement('ol');
document.body.append(ulEl)
updateList()
}
function updateList() {
ulEl.innerHTML = list.map(v => `<li>${v}</li>`).join('')
}
function Adding() {
list.push(prompt('Введите название книги'))
updateList()
}
newlist(list)
Addbutton.onclick = Adding
flex-direction: column-reverse
const links = {
36624938042: 'https://marketing-parsing3.tilda.ws/im/tproduct/368371303452-radialnie-opravki-levie-korotkie-vdi-b3',
48534127142: 'https://marketing-parsing3.tilda.ws/im/tproduct/579863714382-blok-privodnoi-radialnii-vdi40-5480-er32'
}
const searchParams = new URLSearchParams(location.search)
const utm = searchParams.get('utm_term')
if(utm && links.hasOwnProperty(utm)) {
location.href = links[utm]
}
background-size: auto 150%;
background-position: 0 40%;
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
const swiper = new Swiper('.swiper', {
// ...
})
document.querySelectorAll('.my-swiper-btn').forEach(btn => {
btn.addEventListener('click', swiper.slideNext)
})