-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (74 loc) · 1.72 KB
/
index.html
File metadata and controls
78 lines (74 loc) · 1.72 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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>(><)</title>
<style>
body {
background: #0f1115;
color: #e6e6eb;
font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.app {
background: #161922;
border-radius: 16px;
padding: 24px;
width: min(360px, 92vw);
box-shadow: 0 10px 30px rgba(0,0,0,.35);
text-align: center;
}
h1 {
font-size: 1.2rem;
margin-bottom: 16px;
}
.preview {
background: #0f1115;
border-radius: 12px;
padding: 28px 12px;
font-size: 2.2rem;
margin-bottom: 18px;
user-select: all;
}
button {
background: #2d6cff;
border: none;
color: #fff;
padding: 10px 20px;
border-radius: 999px;
cursor: pointer;
font-size: 1rem;
font-weight: 600;
}
button:active { transform: scale(.96); }
</style>
</head>
<body>
<div class="app">
<h1>(><)</h1>
<div id="preview" class="preview"></div>
<button id="rand">生成</button>
</div>
<script>
const patterns = [
'(><)',
'<)(>',
'(<> )'.replace(' ', ''),
'()><',
'><()',
')><(',
')<>('
];
const preview = document.getElementById('preview');
function pick() {
preview.textContent = patterns[Math.floor(Math.random() * patterns.length)];
}
document.getElementById('rand').onclick = pick;
pick();
</script>
</body>
</html>