-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
75 lines (67 loc) · 2.08 KB
/
Copy pathexample.html
File metadata and controls
75 lines (67 loc) · 2.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Knowledge</title>
<style>
.container {
max-width: 600px;
margin: auto;
background-color: var(--tg-theme-secondary-bg-color);
border-radius: 10px;
padding: 20px;
}
body {
font-family: Arial, sans-serif;
background-color: var(--tg-theme-bg-color);
color: var(--tg-theme-text-color);
margin: 0;
}
.back button {
display: block;
width: 80px;
height: 30px;
padding: 10px;
margin: 5px 0;
border: none;
border-radius: 5px;
background-color: var(--tg-theme-button-color);
color: var(--tg-theme-button-text-color);
text-align: center;
cursor: pointer;
}
.button {
display: block;
width: 100%;
height: 50px;
padding: 10px;
margin: 5px 0;
border: none;
border-radius: 5px;
background-color: var(--tg-theme-button-color);
color: var(--tg-theme-button-text-color);
text-align: center;
cursor: pointer;
}
.button:hover {
background-color: var(--tg-theme-button-color-hover);
}
</style>
</head>
<body>
<div class="container">
<div class="back">
<button class="button_back" onclick="window.location.href='index.html';">Назад</button>
</div>
</div>
<script src="https://telegram.org/js/telegram-web-app.js"></script>
<script>
let tg = window.Telegram.WebApp;
Telegram.WebApp.onEvent('themeChanged', function() {
document.body.style.backgroundColor = Telegram.WebApp.themeParams.bg_color;
document.body.style.color = Telegram.WebApp.themeParams.text_color;
});
</script>
</body>
</html>