asd
This commit is contained in:
commit
8b82bde024
10 changed files with 1043 additions and 0 deletions
41
static/socials/index.html
Normal file
41
static/socials/index.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="main.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
|
||||
<title>VP - Socials</title>
|
||||
</head>
|
||||
<body class="row container-fluid">
|
||||
<h1><br>Socials</h1>
|
||||
<div class="col-md-6 col-xl-4">
|
||||
<div class="miniCard row container-fluid" id="discCard">
|
||||
<h2>Discord</h2>
|
||||
<div class="col-sm-6">
|
||||
<img id="discPFP" src="https://api.lanyard.rest/534132311781015564.png" class="pfp">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<p><span id="discUser">bingus_violet</span></p>
|
||||
<p>Status: <span id="discStatus">Offline</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4">
|
||||
<div class="miniCard row container-fluid">
|
||||
<h2>Revolt</h2>
|
||||
<div class="col-sm-6">
|
||||
<img src="https://autumn.revolt.chat/avatars/6HqUpYqnO7_Uagmbb7SqTqKHOjP0fQ0VQh0jz2PJwF/IMG_5404.jpg" class="pfp">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<p><span id="revUser">BingusViolet#5573</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
23
static/socials/main.js
Normal file
23
static/socials/main.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
var statColors = {
|
||||
"Do Not Disturb": "rgb(255, 25, 25)",
|
||||
"online": "rgb(0, 255, 0)",
|
||||
"idle": "rgb(255, 255, 25)",
|
||||
"offline": "rgb(150, 150, 150)"
|
||||
}
|
||||
|
||||
fetch('https://api.lanyard.rest/v1/users/534132311781015564', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
},
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(response => {
|
||||
var userdata = response.data.discord_user
|
||||
var statusData = response.data.discord_status
|
||||
|
||||
$("#discUser").text(JSON.stringify(userdata.username).slice(1, -1))
|
||||
$("#discStatus").text(JSON.stringify(statusData).charAt(1).toUpperCase() + JSON.stringify(statusData).slice(2, -1))
|
||||
$("#discPFP, #discCard").css("border-color", statColors[JSON.stringify(statusData).slice(1, -1)])
|
||||
// $("*").text(JSON.stringify(response))
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue