-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (60 loc) · 1.74 KB
/
index.html
File metadata and controls
69 lines (60 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-15BE3046RV"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-15BE3046RV');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>bartokstudio - grafikdesign</title>
<link rel="stylesheet" href="styles/styles.css">
<script defer src="scripts/main.js"></script>
<script defer src="scripts/fade.js"></script>
<style>
.background-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
overflow: hidden;
z-index: -1;
}
.background-container img {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 2s ease-in-out;
}
.background-container img.active {
opacity: 1;
}
</style>
</head>
<body>
<div class="navbar-container-start"></div>
<div class="background-container">
<img src="assets/img/slide-1.png" class="active" alt="LOCH Leute Illustration">
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
let images = document.querySelectorAll(".background-container img");
let currentIndex = 0;
function fadeImages() {
let nextIndex = (currentIndex + 1) % images.length;
images[currentIndex].classList.remove("active");
images[nextIndex].classList.add("active");
currentIndex = nextIndex;
}
setInterval(fadeImages, 5000);
});
</script>
</body>
</html>