This repository was archived by the owner on Sep 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
161 lines (132 loc) · 6.57 KB
/
index.html
File metadata and controls
161 lines (132 loc) · 6.57 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<link href="stylesheet-dark.css" rel="stylesheet">
<link href="stylesheet-light.css" rel="stylesheet">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<title>lab1</title>
</head>
<body>
<header>
<p class="info left"> Наумова Н.А, P3201</p>
<p class="info right">Вариант 201015</p>
<div style="clear: left"></div>
</header>
<section>
<div class="content-container container">
<svg class="graph" viewBox="0 0 1000 1000">
<path d="M 300 500
l 0 400 200 0 0 -200 400 -200 -400 0 0 -200 z
A 200 200 0 0 1 500 300 z
"
fill="lightskyblue" stroke-width="2"></path>
<path d=" M 0 500
l 1000 0 -25 -15
m 25 15
l -25 15
M 100 490 l 0 20
M 300 490 l 0 20
M 700 490 l 0 20
M 900 490 l 0 20
M 500 1000
l 0 -1000 -15 30
m 15 -30
l 15 30
M 490 900 l 20 0
M 490 700 l 20 0
M 490 300 l 20 0
M 490 100 l 20 0" stroke="black" fill="transparent" stroke-width="1"></path>
<text x="8%" y="47.5%" font-size="45" class="graph-text">-R</text>
<text x="24%" y="47.5%" font-size="45" class="graph-text">-R/2</text>
<text x="66%" y="47.5%" font-size="45" class="graph-text">R/2</text>
<text x="89%" y="47.5%" font-size="45" class="graph-text">R</text>
<text x="52%" y="91.5%" font-size="45" class="graph-text">-R</text>
<text x="52%" y="71.5%" font-size="45" class="graph-text">-R/2</text>
<text x="52%" y="31.5%" font-size="45" class="graph-text">R/2</text>
<text x="52%" y="11.5%" font-size="45" class="graph-text">R</text>
<text x="46.5%" y="54%" font-size="45" class="graph-text">0</text>
<text x="97.5%" y="54.5%" font-size="40" class="graph-view__text-x">x</text>
<text x="45%" y="2%" font-size="40" class="graph-view__text-x">y</text>
</svg>
<form method="GET" action="check.php" target="graphics">
<div class="control-points block region">
<div id="xInput">
<p class="title"><label title="X"> Значение X </label></p>
<table class="main">
<tr>
<td><input type="checkbox" name="x" value="-2.0" id="-2.0">-2</td>
<td><input type="checkbox" name="x" value="-1.5" id="-1.5">-1.5</td>
<td><input type="checkbox" name="x" value="-1.0" id="-1.0">-1</td>
</tr>
<tr>
<td><input type="checkbox" name="x" value="-0.5" id="-0.5">-0.5</td>
<td><input type="checkbox" name="x" value="0.0" id="0.0">0</td>
<td><input type="checkbox" name="x" value="0.5" id="0.5">0.5</td>
</tr>
<tr>
<td><input type="checkbox" name="x" value="1.0" id="1.0">1</td>
<td><input type="checkbox" name="x" value="1.5" id="1.5">1.5</td>
<td><input type="checkbox" name="x" value="2.0" id="2.0">2</td>
</tr>
</table>
</div>
<div >
<p class="title"><label for="Y"> Значение Y </label></p>
<p><input class="input_Y" id="y" type="text" name="y" placeholder="(-5 .. 3)"><br></p>
</div>
<div >
<p class="title"><label for="R"> Значение R </label></p>
<p><input class="input_R" id="r" type="text" name="r" placeholder="(1 .. 4)"><br></p>
</div>
<div class="block invisible" id="errors-area">
</div>
</div>
<button class="region" type="submit" id="submit-button">IMMA_CHARGIN_MAH_LAZER</button>
<div class="switch" align="right" onclick="aaaaa()">
<input type="checkbox" align="right" id="switch-1" name="switch-1" class="switch-check">
<label for="switch-1">сделать красиво?</label>
</div>
</form>
</div>
</section>
<script src="script.js"></script>
<script>
function aaaaa() {
let head = document.head,
link = document.createElement('link');
link.rel = 'stylesheet';
// проверяем значение из localStorage если dark то темная тема
if (localStorage.getItem('themeStyle') === 'dark') {
link.href = 'stylesheet-dark.css'; // ссылка на темный стиль
document.getElementById('switch-1').setAttribute('checked', true); // переключаем чекбокс в положение "темная тема"
}
// по умолчанию светлая тема
else {
link.href = 'stylesheet-light.css'; // ссылка на светлый стиль
}
head.appendChild(link); // вставляем <link rel="stylesheet" href="light|dark.css"> в шапку страницы между темаги head
// событие при переключении чекбокса
document.getElementById('switch-1').addEventListener('change', ev => {
let btn = ev.target;
// если чекбокс включен
if (btn.checked) {
link.href = 'stylesheet-dark.css'; // сключаем темную тему
localStorage.setItem('themeStyle', 'dark'); // записываем значение в localStorage
} else {
link.href = 'stylesheet-light.css'; // включаем светлую тему
localStorage.setItem('themeStyle', 'light'); // записываем значение в localStorage
}
});
}
</script>
<footer >
<p class="info left">
Санкт-Петербург, 2019
</p>
<p class="info right">
</p>
<div style="clear: left"></div>
</footer>
</body>
</html>