-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12dkasdk23l2kssalc23kbvkjnsla.html
159 lines (146 loc) · 4.11 KB
/
12dkasdk23l2kssalc23kbvkjnsla.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>...</title>
<style>
body {
margin: 0;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
background-repeat: no-repeat;
background-size: cover;
background-color: #000;
opacity: 0.5;
}
/* Контейнер для изображения */
.vhs-container {
position: relative;
width: 80vw;
height: 45vw;
max-width: 1000px;
max-height: 1000px;
overflow: hidden;
background: no-repeat center center;
background-size: cover;
/* Вогнутые края */
box-shadow: 0 0 50px rgba(0, 0, 0, 0.7); /* Тень для эффекта экрана */
filter: contrast(1.2) brightness(1.9) saturate(1.5) blur(0.3px); /* Дополнительная стилизация */
}
/* Само изображение через background */
.vhs-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: no-repeat center center;
mask-image: radial-gradient(square, rgba(0,0,0,0) 1%, rgba(0,0,0,0.9) 100%);
background-size: cover;
filter: contrast(1.1) brightness(0.9);
animation: glitch 0.1s infinite alternate;
}
/* Эффект scanlines (полосы) */
.scanlines {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
rgba(0, 0, 0, 0.1) 50%,
transparent 50%
);
background-size: 100% 2px;
z-index: 2;
pointer-events: none;
}
/* Эффект шума */
.noise {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(https://cliply.co/wp-content/uploads/2021/07/402107790_STATIC_NOISE_400.gif);
opacity: 0.2;
z-index: 3;
pointer-events: none;
}
.extra-noise-better {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(https://static.wixstatic.com/media/ceec40_ac2af27d52b848b5afa2a713aff853af~mv2.gif);
opacity: 0.1;
mix-blend-mode: screen;
z-index: 4;
pointer-events: none;
}
/* Виньетка */
.vignette {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 5%, rgba(0,0,0,0.7) 100%);
z-index: 5;
pointer-events: none;
}
/* Анимация для создания легкого эффекта "глитча" */
@keyframes glitch {
0% {
transform: translate(0, 0);
}
50% {
transform: translate(-0.2px, -0.2px);
}
100% {
transform: translate(0.2px, 0.2px);
}
}
</style>
</head>
<body>
<div class="vhs-container">
<div class="scanlines"></div>
<div class="noise"></div>
<div class="extra-noise-better"></div>
<div class="vignette"></div>
</div>
<script>
function decode(main) {
return atob(main);
}
const images = {
morning: 'aHR0cHM6Ly90aW55bWFkbmVzcy5vbmxpbmUvYXNzZXRzL2ltYWdlcy9zZWNvbmRseS5wbmc=',
day: 'aHR0cHM6Ly90aW55bWFkbmVzcy5vbmxpbmUvYXNzZXRzL2ltYWdlcy9maXJzdGx5LnBuZw==',
night: 'aHR0cHM6Ly90aW55bWFkbmVzcy5vbmxpbmUvYXNzZXRzL2ltYWdlcy9pbmZvbnVuLnBuZw=='
};
function setVHSImage() {
const now = new Date();
const hour = (now.getUTCHours() + 3) % 24;
const vhsContainer = document.querySelector('.vhs-container');
let imageUrl;
if (hour >= 5 && hour < 19) {
imageUrl = decode(images.morning);
} else if (hour >= 19 && hour < 24) {
imageUrl = decode(images.day);
} else {
imageUrl = decode(images.night);
}
vhsContainer.style.setProperty("background-image", `url(${imageUrl})`);
}
setVHSImage();
</script>
</body>
</html>