-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreg.html
More file actions
158 lines (130 loc) · 2.57 KB
/
Copy pathreg.html
File metadata and controls
158 lines (130 loc) · 2.57 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BlackRoad Registration</title>
<style>
:root{
--bg:#f4f6f8;
--card:#ffffff;
--accent:#1db954;
--text:#111;
--muted:#6b7280;
--border:#e5e7eb;
}
*{
box-sizing:border-box;
font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto;
}
body{
margin:0;
height:100vh;
background:linear-gradient(180deg,#f9fafb,#eef2f7);
display:flex;
align-items:center;
justify-content:center;
color:var(--text);
}
.card{
width:90%;
max-width:360px;
border-radius:18px;
padding:28px 22px;
}
.logo{
text-align:center;
margin-bottom:8px;
}
.logo h2{
margin:0;
letter-spacing:1px;
}
.subtitle{
text-align:center;
color:var(--muted);
margin-bottom:24px;
}
input{
width:100%;
padding:14px;
border-radius:12px;
border:1px solid var(--border);
background:#fff;
color:var(--text);
font-size:15px;
margin-bottom:14px;
outline:none;
}
input::placeholder{
color:#9ca3af;
}
input:focus{
border-color:var(--accent);
box-shadow:0 0 0 3px rgba(29,185,84,.15);
}
button{
width:100%;
padding:14px;
border:none;
border-radius:14px;
background:linear-gradient(135deg,#1db954,#19a44b);
color:#fff;
background:black;
font-size:16px;
font-weight:600;
cursor:pointer;
}
button:active{
transform:scale(.98);
}
.footer{
text-align:center;
margin-top:16px;
font-size:12px;
color:#9ca3af;
}
</style>
</head>
<body>
<div class="card">
<div class="logo">
<h2>Black<span>Road</span></h2>
</div>
<div class="subtitle">Create your account</div>
<input type="text" id="u" placeholder="Username">
<input type="password" id="p" placeholder="Password">
<button onclick="r()">Register</button>
</div>
<script>
function c(u, p, r) {
const d = indexedDB.open("black", 2);
d.onupgradeneeded = e => {
const db = e.target.result;
if (!db.objectStoreNames.contains("sst")) {
db.createObjectStore("sst");
}
};
d.onsuccess = e => {
const db = e.target.result;
const t = db.transaction("sst", "readwrite");
const s = t.objectStore("sst");
const o = { u, p };
const a = s.put(o,"user");
a.onsuccess = () => {
alert("BlackRoad account created successfully");
window.location.href = r;
};
};
}
function r(){
const u = document.getElementById("u").value.trim();
const p = document.getElementById("p").value.trim();
if(u === "" || p === ""){
alert("Enter all values");
}else{
c(u, p, "finpulse.html");
}
}
</script>
</body>
</html>