-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
134 lines (117 loc) · 3.66 KB
/
index.html
File metadata and controls
134 lines (117 loc) · 3.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tibia Name Generator</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: #2a2a2a;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
}
#noise-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.15;
pointer-events: none;
z-index: 0;
}
.name-box {
background: rgba(40, 40, 40, 0.9);
border: 1px solid #555;
padding: 40px 60px;
margin-bottom: 30px;
min-width: 400px;
text-align: center;
position: relative;
z-index: 1;
}
#character_name {
font-size: 2.5em;
font-weight: 300;
color: #fff;
text-align: center;
border: none;
background: transparent;
width: 100%;
outline: none;
font-family: inherit;
letter-spacing: 2px;
}
#character_name::placeholder {
color: #666;
}
button {
background: #444;
color: #fff;
border: 1px solid #666;
padding: 15px 40px;
font-size: 1em;
cursor: pointer;
transition: background 0.2s;
font-family: inherit;
position: relative;
z-index: 1;
}
button:hover {
background: #555;
}
button:active {
background: #333;
}
</style>
</head>
<body>
<div style="text-align: center; position: relative; z-index: 1;">
<div class="name-box">
<input
type="text"
id="character_name"
placeholder="..."
readonly
/>
</div>
<button type="button" id="generate_random_name" data-max-length="21">Generate</button>
</div>
<canvas id="noise-canvas"></canvas>
<script>
// Static textured background
(function() {
const canvas = document.getElementById('noise-canvas');
const ctx = canvas.getContext('2d');
function drawTexture() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const imageData = ctx.createImageData(canvas.width, canvas.height);
const data = imageData.data;
// Create subtle static noise texture
for (let i = 0; i < data.length; i += 4) {
const value = Math.random() * 30 + 40; // Subtle variation around grey
data[i] = value; // R
data[i + 1] = value; // G
data[i + 2] = value; // B
data[i + 3] = 255; // A
}
ctx.putImageData(imageData, 0, 0);
}
drawTexture();
window.addEventListener('resize', drawTexture);
})();
</script>
<script type="text/javascript" src="random_name_generator.js"></script>
</body>
</html>