-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (95 loc) · 2.92 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#000000">
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js')
.then(() => console.log('Service Worker Registered'));
}
</script>
<title>Random Letters Generator</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f0f4f8;
color: #333;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
text-align: center;
background-color: #ffffff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 2em;
margin-bottom: 20px;
color: #4a90e2;
}
.letters {
font-size: 1.5em;
margin: 20px 0;
color: #333;
}
.letter {
font-size: 2em;
font-weight: bold;
color: #e94e77;
}
button {
background-color: #4a90e2;
color: white;
font-size: 1.2em;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #357ABD;
}
footer {
margin-top: 30px;
font-size: 0.8em;
color: #666;
}
</style>
</head>
<body>
<div class="container">
<h1>Key and System Generator</h1>
<div class="letters">
<p><strong>Key:</strong> <span class="letter" id="scale-letter">-</span></p>
<p><strong>CAGED System:</strong> <span class="letter" id="caged-letter">-</span></p>
</div>
<button onclick="generateRandomLetters()">Get Random Letters</button>
<footer>
<p>© 2024 Random Letters App</p>
</footer>
</div>
<script>
function generateRandomLetters() {
const caged = ['C', 'A', 'G', 'E', 'D'];
const scale = ['C', 'D', 'E', 'F', 'G', 'A', 'B'];
// Get random CAGED letter
const randomCaged = caged[Math.floor(Math.random() * caged.length)];
// Get random CDEFGAB letter
const randomScale = scale[Math.floor(Math.random() * scale.length)];
// Display the results
document.getElementById('caged-letter').textContent = randomCaged;
document.getElementById('scale-letter').textContent = randomScale;
}
</script>
</body>
</html>