33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
document.addEventListener("DOMContentLoaded", function() {
|
||
const eventName = ''; // Получаем название мероприятия из предыдущей страницы
|
||
const urlParams = new URLSearchParams(window.location.search);
|
||
const artistName = urlParams.get('name');
|
||
document.getElementById('artistName').textContent = artistName;
|
||
|
||
const heroSection = document.getElementById('heroSection');
|
||
const eventDescription = document.getElementById('eventDescription');
|
||
const eventDates = document.getElementById('eventDates');
|
||
const eventPerformers = document.getElementById('eventPerformers');
|
||
|
||
// Загрузка изображения мероприятия
|
||
heroSection.style.background = `url('pictures/${eventName}.jpg') center/cover no-repeat`;
|
||
|
||
// Загрузка информации из .txt файлов с помощью JavaScript
|
||
fetch(`artists/${eventName}-description.txt`)
|
||
.then(response => response.text())
|
||
.then(data => {
|
||
eventDescription.textContent = data;
|
||
});
|
||
|
||
fetch(`artists/${eventName}-dates.txt`)
|
||
.then(response => response.text())
|
||
.then(data => {
|
||
eventDates.textContent = data;
|
||
});
|
||
|
||
fetch(`artists/${eventName}-performers.txt`)
|
||
.then(response => response.text())
|
||
.then(data => {
|
||
eventPerformers.textContent = data;
|
||
});
|
||
}); |