-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
179 lines (164 loc) · 3.77 KB
/
index.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=">
<title>Romanoff</title>
<style>
:root {
--background: white;
--text: black;
}
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.browser {
max-width: 750px;
width: 95%;
border-radius: 12px;
max-height: 650px;
position: relative;
overflow: hidden;
box-shadow: inset 0 0 1px 1px black;
}
.browser__header {
padding: 15px;
position: relative;
}
.browser__header::after {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: black;
content: "";
}
.browser__header i {
display: inline-block;
vertical-align: middle;
width: 10px;
height: 10px;
border-radius: 100px;
margin-right: 5px;
border: 1px solid black;
}
.browser__header i:nth-child(1) {
background: #e85d75;
}
.browser__header i:nth-child(2) {
background: #eec643;
}
.browser__header i:nth-child(3) {
background: #79b791;
}
.browser__content {
padding: 20px;
padding-bottom: 5vh;
}
.browser h1, .browser p {
color: var(--text);
transition: color 200ms linear 100ms;
}
.browser__content p {
line-height: 1.5;
}
.toggle {
position: absolute;
top: 14px;
right: 15px;
}
.toggle label {
position: relative;
display: block;
width: 50px;
height: 22px;
background: #fff;
border: 1px solid var(--text);
border-radius: 100px;
cursor: pointer;
}
.toggle label::before {
position: absolute;
width: 900px;
height: 900px;
background: var(--background);
z-index: 10;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border-radius: 100%;
opacity: 1;
transform: translate3d(-47%, 0, 0) scale(0.1);
transition: background 300ms ease-in-out 200ms, opacity 350ms ease-in-out 200ms, transform 400ms ease-in-out;
pointer-events: none;
content: "";
opacity: 0;
z-index: -999;
}
.toggle label::after {
position: absolute;
top: 0;
bottom: 0;
left: 4px;
margin: auto;
width: 14px;
height: 14px;
background: #fff;
border: 1px solid black;
content: "";
border-radius: 100px;
transition: background 200ms linear, transform 200ms ease-in-out 100ms;
}
.toggle input {
display: none;
}
.toggle input:checked ~ label:after {
background: #000;
transform: translate3d(27px, 0, 0);
}
.toggle input:checked ~ label:before {
transform: translate3d(-84%, 23%, 0) scale(1);
transition: background 300ms ease-in-out, opacity 30ms ease-in-out, transform 400ms ease-in-out;
opacity: 1;
}
</style>
</head>
<body>
<div class="browser">
<div class="browser__header">
<i></i>
<i></i>
<i></i>
</div>
<div class="browser__content">
<h1>ra1nbow | Rbteam</h1>
<p>Доброго времени суток.</p>
<p>Эта страницы команды Rbteam (ra1nbow).</p>
<p>Я не знаю, правда, зачем ты сюда зашел. Эта страница ничем тебе не поможет :). Команда не является настоящей командой. Мы не делаем совместные заказы. Ну раз уж зашел - посмотри, как сделан переключатель темы.</p>
</div>
<div class="toggle">
<input type="checkbox" id="toggle">
<label for="toggle" />
</div>
</div>
<script type="text/javascript">
const toggle = document.querySelector('.toggle');
let root = document.documentElement;
toggle.addEventListener('change', e => {
if (e.target.checked) {
root.style.setProperty('--background', 'black');
root.style.setProperty('--text', 'white');
} else {
root.style.setProperty('--background', 'white');
root.style.setProperty('--text', 'black');
}
})
</script>
</body>
</html>