-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.ejs
174 lines (154 loc) · 4.28 KB
/
dashboard.ejs
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Games Hub</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-image: url("src/imgs/bg.jpg");
background-size: cover;
}
header {
background-color: #333;
color: white;
text-align: center;
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
header h1 {
margin: 0;
}
header p {
margin: 5px 0 0;
}
header img {
max-width: 50px;
border-radius: 50%;
}
nav {
background-color: #444;
padding: 10px;
text-align: center;
}
nav a {
color: white;
text-decoration: none;
padding: 10px;
margin: 5px;
border-radius: 5px;
background-color: #555;
transition: background-color 0.3s ease;
}
nav a:hover {
background-color: #666;
}
section {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
max-width: 800px;
margin: 20px auto;
background-color: #fff;
border-radius: 10px;
text-align: center;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}
.button {
display: inline-block;
padding: 10px 20px;
font-size: 16px;
text-align: center;
text-decoration: none;
cursor: pointer;
border: 1px solid #4caf50; /* Green border color */
color: #ffffff; /* White text color */
background-color: #4caf50; /* Green background color */
border-radius: 5px; /* Rounded corners */
}
button {
padding: 10px 20px;
background-color: #4caf50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
h2,
h3 {
color: #333;
}
.game-bar {
background-color: #333;
text-align: center;
padding: 10px;
display: flex;
justify-content: space-around;
bottom: 0;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
z-index: 1;
}
.game-bar a {
color: white;
text-decoration: none;
padding: 10px;
margin: 5px;
border-radius: 5px;
background-color: green;
transition: background-color 0.3s ease;
}
.game-bar a:hover {
background-color: #666;
}
</style>
</head>
<body>
<header>
<div>
<a href="/dashboard">
<h1>Games Hub</h1>
</a>
<p>Welcome, <%= user.username %>!</p>
</div>
<div>
<p>Nickname: <%= user.nickname %></p>
<% if (user.profilePicture) { %>
<img src="<%= user.profilePicture %>" alt="Profile Picture" />
<% } else { %>
<p>No profile picture uploaded</p>
<% } %>
<p>Your balance is $<%= user.balance %>.</p>
</div>
<form action="/logout" method="post">
<button type="submit">Logout</button>
</form>
<form action="/edit" method="get">
<button type="Update User">Update User</button>
</form>
</header>
<div class="game-bar">
<a href="/crash">Crash</a>
<a href="/slots">Slots</a>
<a href="/dice">Dice</a>
</div>
<section>
<h2>Welcome to the Games Hub!</h2>
<p>Choose your game from the navigation bar above.</p>
<br />
<p>Low on balance? Add $100 from the button below!</p>
<a href="/add-balance" class="button">Add Balance</a>
</section>
</body>
</html>