Skip to content

Commit 4689558

Browse files
committed
test update
1 parent 70b4292 commit 4689558

File tree

2 files changed

+250
-0
lines changed

2 files changed

+250
-0
lines changed

dashboard.py

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ async def gilgang():
5252
async def dashboard():
5353
return await render_template('server.html')
5454

55+
@app.route('/dashboard/<server_id>', methods=["GET"])
56+
@route_cors(allow_origin="*")
57+
async def dashboard_staff(server_id):
58+
return await render_template('staff.html')
59+
5560
if __name__ == '__main__':
5661
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
5762
context.load_cert_chain(cert, key)

dashboard/staff.html

+245
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<title>Rayz</title>
6+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
7+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
8+
<style>
9+
:root {
10+
--guilded-color: #F5C400;
11+
--guilded-hovor-color: #9b7c00;
12+
--body-color: #242424;
13+
--text-default-color: #ffffff;
14+
--button-color: #535461;
15+
--header-color: #181818;
16+
--a-hover-color: #6352fd;
17+
}
18+
19+
*,:after,:before {
20+
box-sizing: border-box;
21+
margin: 0
22+
}
23+
24+
body {
25+
font-family: roboto, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
26+
background-color: #242424;
27+
color: #ffffff;
28+
line-height: 1;
29+
margin: 0;
30+
}
31+
32+
#container {
33+
display: grid;
34+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
35+
grid-gap: 10px;
36+
margin: 20px;
37+
}
38+
39+
.grid-item {
40+
background-color: #0f0f0f;
41+
border-radius: 15px;
42+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 1);
43+
overflow: hidden;
44+
text-align: center;
45+
}
46+
47+
.grid-item img {
48+
max-width: 100%;
49+
height: auto;
50+
object-fit: cover;
51+
object-position: center;
52+
border-radius: 10px 10px 0 0;
53+
}
54+
55+
.grid-item .profile-info {
56+
padding: 20px;
57+
}
58+
59+
.grid-item h3 {
60+
font-size: 24px;
61+
margin-bottom: 5px;
62+
}
63+
64+
.grid-item p {
65+
font-size: 16px;
66+
margin-bottom: 0;
67+
}
68+
69+
.Header {
70+
display: flex;
71+
position: static;
72+
height: 55px;
73+
width: 100%;
74+
background: var(--header-color);
75+
align-items: center;
76+
padding: 0 50px 0 0x;
77+
flex-wrap: wrap;
78+
}
79+
80+
.Header a {
81+
float: left;
82+
display: block;
83+
padding: 14px 16px;
84+
border-radius: 0.4rem;
85+
text-decoration: none;
86+
}
87+
88+
.Header_btn {
89+
color: var(--text-default-color);
90+
text-decoration: none;
91+
font-weight: 500;
92+
padding: 10px 15px;
93+
background-color: #181818;
94+
}
95+
96+
div {
97+
display: block;
98+
}
99+
100+
section {
101+
padding: 5rem 0;
102+
}
103+
104+
.HomePageTop {
105+
min-height: 100vh;
106+
margin: 200px;
107+
}
108+
109+
.HomePageTopDiv {
110+
position: relative;
111+
z-index: 20;
112+
padding-bottom: 6rem;
113+
}
114+
115+
.HomePageText {
116+
max-width: 36rem;
117+
text-align: center;
118+
margin-bottom: 2rem;
119+
margin-left: auto;
120+
margin-right: auto;
121+
}
122+
123+
.HomePageP {
124+
font-size: 3rem;
125+
color: var(--text-default-color);
126+
padding-top: 10rem;
127+
text-align: center;
128+
}
129+
130+
.HomePageButtons {
131+
display: flex;
132+
align-items: center;
133+
justify-content: center;
134+
flex-wrap: wrap;
135+
}
136+
137+
.HomePageButtonRoot {
138+
box-shadow: 0 4px 50px rgba(83,84,97, 0.2);
139+
border-radius: 0.5rem;
140+
padding: 1rem;
141+
margin: 0.25rem;
142+
}
143+
144+
.HomePageButton {
145+
background: var(--button-color);
146+
border: 2px solid #242424;
147+
color: var(--text-default-color);
148+
width: 100%;
149+
max-width: 20rem;
150+
font-size: 1.9rem;
151+
}
152+
153+
.HomePageButtonInvite {
154+
background: var(--guilded-color);
155+
border: 2px solid #242424;
156+
color: var(--text-default-color);
157+
width: 100%;
158+
max-width: 20rem;
159+
font-size: 2rem;
160+
}
161+
162+
button.HomePageButton:hover {
163+
transition: 0.25s;
164+
background: #36363f;
165+
cursor: pointer;
166+
}
167+
168+
button.HomePageButtonInvite:hover {
169+
transition: 0.25s;
170+
background: var(--guilded-hovor-color);
171+
cursor: pointer;
172+
}
173+
174+
a:hover {
175+
transition: 0.25s;
176+
text-decoration: none;
177+
color: var(--a-hover-color);
178+
}
179+
180+
a:-webkit-any-link {
181+
cursor: pointer;
182+
}
183+
184+
.Logo {
185+
padding: 0 0x 0 50px;
186+
width: 50px;
187+
height: 50px;
188+
}
189+
</style>
190+
</head>
191+
192+
<body>
193+
<div class="Header" id="Header">
194+
<img class="Logo" src="https://api.rayzbot.xyz/image/logo.png" alt="botlogo">
195+
<a role="button" class="Header_btn" href="https://rayzbot.xyz/">Home</a>
196+
<a role="button" class="Header_btn" href="https://rayzbot.xyz/dashboard">Dashboard</a>
197+
</div>
198+
199+
<section class="HomePageTop">
200+
<div class="HomePageDiv HomePageTopDiv">
201+
<div id="container"></div>
202+
</div>
203+
</section>
204+
</body>
205+
206+
<script>
207+
var url = window.location.href;
208+
var urlParts = url.split('/');
209+
var serverId = urlParts[urlParts.length - 1];
210+
211+
212+
$.ajax({
213+
url: "https://api.rayzbot.xyz/server/"+ serverId +"/info",
214+
type: "GET",
215+
dataType: "json",
216+
success: function(data) {
217+
const select = document.getElementById("notification");
218+
if (data.code === 200) {
219+
const container = document.getElementById('container');
220+
Object.keys(data.server_staff).forEach((key) => {
221+
const item = data.server_staff[key];
222+
const gridItem = document.createElement('div');
223+
gridItem.classList.add('grid-item');
224+
gridItem.innerHTML = `<img src="${item.avatar}" alt="${item.name}"><h3>${item.name}</h3>`;
225+
container.appendChild(gridItem);
226+
});
227+
}
228+
if (data.code === 404) {
229+
const displayContent = document.createElement('option');
230+
displayContent.classList.add('StatusError');
231+
const optionText = document.createTextNode(data.message);
232+
const paragraphElement = document.createElement('p');
233+
paragraphElement.classList.add("Search")
234+
paragraphElement.appendChild(optionText);
235+
displayContent.appendChild(paragraphElement);
236+
select.appendChild(displayContent);
237+
setTimeout(function() {
238+
select.removeChild(displayContent);
239+
}, 4000);
240+
} else {
241+
}
242+
}
243+
});
244+
</script>
245+
</html>

0 commit comments

Comments
 (0)