-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
139 lines (120 loc) · 5.3 KB
/
index.html
File metadata and controls
139 lines (120 loc) · 5.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="icon" type="image/png" sizes="310x310" href="ms-icon-310x310.png">
<meta property="og:image" content="ms-icon-310x310.png">
<meta name="twitter:image" content="ms-icon-310x310.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(100267893, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/100267893" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<title>Kawaii Face by Andr oDei</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #fff;
}
svg {
cursor: pointer;
}
.tap-message {
position: absolute;
top: 10px;
left: 10px;
font-family: monospace;
font-size: 10px;
color: black;
}
.kawaii-credit {
position: absolute;
bottom: 10px;
right: 10px;
font-family: monospace;
font-size: 20px;
color: black;
}
</style>
</head>
<body>
<div class="tap-message">Tap the screen or hold spacebar</div>
<a href="https://buymeacoffee.com/indexmod" style="position: absolute; top: 10px; right: 10px; font-size: 30px; text-decoration: none;">
☕
</a>
<svg id="face" xmlns="http://www.w3.org/2000/svg" width="500" height="auto" viewBox="0 0 200 200">
<!-- Лицо (немного изменена форма) -->
<ellipse cx="100" cy="100" rx="85" ry="80" fill="#F4CD8A"/>
<!-- Щёки -->
<g id="cheeks">
<circle id="cheek-left" cx="60" cy="120" r="15" fill="#d75e5d"/>
<circle id="cheek-right" cx="140" cy="120" r="15" fill="#d75e5d"/>
</g>
<!-- Глаза -->
<g id="eyes">
<path id="eye-left" d="M45 80 Q70 60 95 80" stroke="black" stroke-width="5" fill="none"/>
<path id="eye-right" d="M105 80 Q130 60 155 80" stroke="black" stroke-width="5" fill="none"/>
</g>
<!-- Нос -->
<circle id="nose" cx="100" cy="110" r="5" fill="black"/>
<!-- Рот -->
<path id="mouth" d="M80 140 Q100 160 120 140" stroke="black" stroke-width="5" fill="none"/>
</svg>
<script>
function generateFace() {
function randomRange(min, max) {
return Math.random() * (max - min) + min;
}
// Обновление щёк
let cheekOffset = randomRange(-5, 5);
document.getElementById('cheek-left').setAttribute('cx', 60 + cheekOffset);
document.getElementById('cheek-right').setAttribute('cx', 140 - cheekOffset);
// Обновление глаз
let eyeOffset = randomRange(-10, 10);
document.getElementById('eye-left').setAttribute('d', `M45 80 Q70 ${60 + eyeOffset} 95 80`);
document.getElementById('eye-right').setAttribute('d', `M105 80 Q130 ${60 + eyeOffset} 155 80`);
// Обновление рта
let mouthOffset = randomRange(150, 170);
document.getElementById('mouth').setAttribute('d', `M80 140 Q100 ${mouthOffset} 120 140`);
}
document.getElementById('face').addEventListener('click', generateFace);
document.getElementById('face').addEventListener('touchstart', generateFace);
document.addEventListener('keydown', function(event) {
if (event.code === 'Space') {
generateFace();
}
});
</script>
</body>
</html>