mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
Admin panel and punishments
This commit is contained in:
+705
-69
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,212 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
|
||||
<title>create paste</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav-div">
|
||||
<a href="/">home</a>
|
||||
<a href="/pastes">recent pastes</a>
|
||||
<a href="/archive">archive</a>
|
||||
{html}
|
||||
</div>
|
||||
<div class="container-wrapper">
|
||||
<div class="dash-container">
|
||||
<div class="wrapper">
|
||||
<div class="idek-wrapper">
|
||||
<div class="account-info">
|
||||
<span id="username">Username: {username}</span>
|
||||
<span id="uuid">UUID: {uuid}</span>
|
||||
<span id="uid">UID: {uid}</span>
|
||||
<span id="creationdate">{creationdate}</span>
|
||||
<span id="lastlogindate">{lastlogindate}</span>
|
||||
<span id="type">Account Type: {type}</span>
|
||||
<span id="pastescount">Total Pastes: {totalpastes}</span>
|
||||
<span id="pasteSize">Total Pastes Size: {totalsize}</span>
|
||||
</div>
|
||||
<div class="pastes-wrapper">
|
||||
<h3>Your Pastes</h3>
|
||||
<div class="list-container">
|
||||
{pastes}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="idek-wrapper">
|
||||
<div class="accounts-wrapper">
|
||||
<h3>Accounts</h3>
|
||||
<div class="list-container">
|
||||
{accounts}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
function localizeDateTime(unixTimestamp) {
|
||||
const date = new Date(unixTimestamp * 1000);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const creationdateElement = document.getElementById('creationdate');
|
||||
const lastlogindateElement = document.getElementById('lastlogindate');
|
||||
|
||||
const creationdateText = creationdateElement.innerText.trim();
|
||||
const lastlogindateText = lastlogindateElement.innerText.trim();
|
||||
|
||||
creationdateElement.innerText = "Creation Date: " + localizeDateTime(parseInt(creationdateText));
|
||||
lastlogindateElement.innerText = "Last Login Date: " + localizeDateTime(parseInt(lastlogindateText));
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.list-container{
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
body{
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0d0d0d;
|
||||
}
|
||||
.container-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.dash-container {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
background-color: #181818;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
width: 80%;
|
||||
max-height: 80vh;
|
||||
min-height: 20%;
|
||||
height: fit-content;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.idek-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
.account-info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #222222;
|
||||
width: 48%;
|
||||
padding: 20px;
|
||||
margin-right: 5px;
|
||||
border-radius: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.pastes-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 48%;
|
||||
margin-left: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-color: #222222;
|
||||
max-height: 70vh;
|
||||
}
|
||||
.accounts-wrapper{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-color: #222222;
|
||||
max-height: 70vh;
|
||||
}
|
||||
.wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.list-a{
|
||||
transition: 300ms;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
width: 90%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #2a2a2a;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
border: #3a3a3a00 2px solid;
|
||||
}
|
||||
.list-a:hover{
|
||||
transition: background-color 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
.list-item{
|
||||
list-style: none;
|
||||
}
|
||||
.nav-div{
|
||||
top: 0;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background-color: #181818;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.nav-div a{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #222222;
|
||||
transition: 300ms;
|
||||
border: #2a2a2a00 2px solid;
|
||||
}
|
||||
.nav-div a:hover{
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
|
||||
<title>{username}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="nav-div">
|
||||
<a href="/">home</a>
|
||||
<a href="/pastes">recent pastes</a>
|
||||
<a href="/archive">archive</a>
|
||||
{html}
|
||||
</div>
|
||||
<div class="container-wrapper">
|
||||
<div class="account-container">
|
||||
<div class="account-info">
|
||||
<h2>{username}</h2>
|
||||
<h3>UUID: {uuid}</h3>
|
||||
<h3>UID: {uid}</h3>
|
||||
<h3 id="creationdate">{creationdate}</h3>
|
||||
<h3 id="lastlogindate">{lastlogindate}</h3>
|
||||
<h3>Account Type: {type}</h3>
|
||||
<h3>Total Pastes: {totalpastes}</h3>
|
||||
<h3>Total Pastes Size: {totalsize}</h3>
|
||||
</div>
|
||||
<div class="collumn-2">
|
||||
<div class="action-wrapper">
|
||||
<h2 style="text-align: center;">Actions</h2>
|
||||
<div class="button-wrapper">
|
||||
<a onclick="banAccount()" class="button">{typeban}</a>
|
||||
<a href="/dash" class="button">back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pastes-wrapper">
|
||||
<h2 style="text-align: center;">Pastes</h2>
|
||||
<div class="pastes-container">
|
||||
{pastes}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
function localizeDateTime(unixTimestamp) {
|
||||
const date = new Date(unixTimestamp * 1000);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const creationdateElement = document.getElementById('creationdate');
|
||||
const lastlogindateElement = document.getElementById('lastlogindate');
|
||||
|
||||
const creationdateText = creationdateElement.innerText.trim();
|
||||
const lastlogindateText = lastlogindateElement.innerText.trim();
|
||||
|
||||
creationdateElement.innerText = "Creation Date: " + localizeDateTime(parseInt(creationdateText));
|
||||
lastlogindateElement.innerText = "Last Login Date: " + localizeDateTime(parseInt(lastlogindateText));
|
||||
});
|
||||
function banAccount() {
|
||||
let reason = prompt('Enter the reason for {typeban}ning the account');
|
||||
fetch('/api/accounts/admin/{typeban}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
uuid: '{uuid}',
|
||||
reason: `${reason}`
|
||||
})
|
||||
|
||||
}).then(response => response.json())
|
||||
.then(obj => {
|
||||
const result = JSON.parse(obj);
|
||||
if (result.message != null) {
|
||||
alert(result.message);
|
||||
} else {
|
||||
alert(`Failed to {typeban} account for ${result.error}`);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
h3{
|
||||
word-break: keep-all;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.list-a {
|
||||
transition: background-color 300ms;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
width: 90%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #2a2a2a;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
border: #3a3a3a00 2px solid;
|
||||
}
|
||||
|
||||
.list-a:hover {
|
||||
transition: background-color 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.collumn-2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 48%;
|
||||
max-width: 48%;
|
||||
}
|
||||
|
||||
.pastes-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
width: 85%;
|
||||
max-width: 100%;
|
||||
background-color: #222222;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
height: fit-content;
|
||||
margin-top: 20px;
|
||||
height: 77.1%;
|
||||
max-height: 77.1%;
|
||||
}
|
||||
|
||||
.pastes-container {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0d0d0d;
|
||||
}
|
||||
|
||||
.container-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 98.7vh;
|
||||
}
|
||||
|
||||
.account-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 80%;
|
||||
padding: 20px;
|
||||
background-color: #181818;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
|
||||
.account-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #222222;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
width: fit-content;
|
||||
width: 48%;
|
||||
max-width: 48%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.action-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
width: 85%;
|
||||
max-width: 100%;
|
||||
background-color: #222222;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
height: fit-content;
|
||||
max-height: 20%;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.button {
|
||||
text-decoration: none;
|
||||
transition: 300ms;
|
||||
width: fit-content;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
background-color: #2a2a2a;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
color: white;
|
||||
border: #2a2a2a00 2px solid;
|
||||
cursor: pointer;
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
min-width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: 2px solid #3a3a3a;
|
||||
}
|
||||
|
||||
.nav-div {
|
||||
top: 0;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background-color: #181818;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
|
||||
.nav-div a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #222222;
|
||||
transition: 300ms;
|
||||
border: #2a2a2a00 2px solid;
|
||||
}
|
||||
|
||||
.nav-div a:hover {
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</html>
|
||||
@@ -11,6 +11,7 @@
|
||||
<a href="/">home</a>
|
||||
<a href="/pastes">recent pastes</a>
|
||||
<a href="/archive">archive</a>
|
||||
{html}
|
||||
</div>
|
||||
<div class="container-wrapper">
|
||||
<div class="pastes-container">
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
|
||||
<title>create paste</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav-div">
|
||||
<a href="/">home</a>
|
||||
<a href="/pastes">recent pastes</a>
|
||||
<a href="/archive">archive</a>
|
||||
{html}
|
||||
</div>
|
||||
<div class="container-wrapper">
|
||||
<div class="dash-container">
|
||||
<div class="wrapper">
|
||||
<div class="idek-wrapper">
|
||||
<div class="account-info">
|
||||
<span id="username">Username: {username}</span>
|
||||
<span id="uuid">UUID: {uuid}</span>
|
||||
<span id="uid">UID: {uid}</span>
|
||||
<span id="creationdate">{creationdate}</span>
|
||||
<span id="lastlogindate">{lastlogindate}</span>
|
||||
<span id="type">Account Type: {type}</span>
|
||||
<span id="pastescount">Total Pastes: {totalpastes}</span>
|
||||
<span id="pasteSize">Total Pastes Size: {totalsize}</span>
|
||||
</div>
|
||||
<div class="pastes-wrapper">
|
||||
<h3>Your Pastes</h3>
|
||||
{pastes}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
function localizeDateTime(unixTimestamp) {
|
||||
const date = new Date(unixTimestamp * 1000);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const creationdateElement = document.getElementById('creationdate');
|
||||
const lastlogindateElement = document.getElementById('lastlogindate');
|
||||
|
||||
const creationdateText = creationdateElement.innerText.trim();
|
||||
const lastlogindateText = lastlogindateElement.innerText.trim();
|
||||
|
||||
creationdateElement.innerText = "Creation Date: " + localizeDateTime(parseInt(creationdateText));
|
||||
lastlogindateElement.innerText = "Last Login Date: " + localizeDateTime(parseInt(lastlogindateText));
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
body{
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0d0d0d;
|
||||
}
|
||||
.container-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.dash-container {
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
background-color: #181818;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
width: 80%;
|
||||
max-height: 80vh;
|
||||
min-height: 20%;
|
||||
height: fit-content;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.idek-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
.account-info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #222222;
|
||||
width: 48%;
|
||||
padding: 20px;
|
||||
margin-right: 5px;
|
||||
border-radius: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.pastes-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 48%;
|
||||
margin-left: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-color: #222222;
|
||||
max-height: 70vh;
|
||||
}
|
||||
.wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.list-a{
|
||||
transition: background-color 300ms;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #2a2a2a;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
border: #3a3a3a00 2px solid;
|
||||
}
|
||||
.list-a:hover{
|
||||
transition: background-color 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
.list-item{
|
||||
list-style: none;
|
||||
}
|
||||
.nav-div{
|
||||
top: 0;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background-color: #181818;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.nav-div a{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #222222;
|
||||
transition: 300ms;
|
||||
border: #2a2a2a00 2px solid;
|
||||
}
|
||||
.nav-div a:hover{
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
|
||||
<title>create paste</title>
|
||||
<title>Error {code}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav-div">
|
||||
@@ -37,7 +37,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.error-container{
|
||||
display: flex;
|
||||
|
||||
@@ -69,7 +69,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.creation-container{
|
||||
display: flex;
|
||||
|
||||
@@ -69,7 +69,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.creation-container{
|
||||
display: flex;
|
||||
|
||||
+162
-119
@@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
|
||||
<title>{pastetitle}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="nav-div">
|
||||
<a href="/">home</a>
|
||||
@@ -15,25 +16,39 @@
|
||||
</div>
|
||||
<div class="container-wrapper">
|
||||
<div class="paste-container">
|
||||
<h1>{pastetitle}</h1>
|
||||
<h1 id="paste-title" title="{pastetitle}">{pastetitle}</h1>
|
||||
<h3 class="uploader-text">{username} <a id="creationdate">{creationdate}</a> {pastesize}</h3>
|
||||
<div class="paste-wrapper">
|
||||
<p>{content}</p>
|
||||
</div>
|
||||
<div class="buttons-wrapper">
|
||||
<a href="/raw/{pasteid}">
|
||||
<button id="view-raw-button" class="button">View Raw</button>
|
||||
<button id="view-raw-button" class="button">view raw</button>
|
||||
</a>
|
||||
<button id="copy-button" class="button">Copy</button>
|
||||
<button id="download-button" class="button">Download</button>
|
||||
<button id="copy-button" class="button">copy</button>
|
||||
<button id="download-button" class="button">download</button>
|
||||
{deletebutton}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById("copy-button").addEventListener("click", function(){
|
||||
function localizeDateTime(unixTimestamp) {
|
||||
const date = new Date(unixTimestamp * 1000);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const creationdateElement = document.getElementById('creationdate');
|
||||
const creationdateText = creationdateElement.innerText.trim();
|
||||
|
||||
creationdateElement.innerText = localizeDateTime(parseInt(creationdateText));
|
||||
});
|
||||
|
||||
document.getElementById("copy-button").addEventListener("click", function () {
|
||||
navigator.clipboard.writeText(document.querySelector(".paste-wrapper").innerText);
|
||||
});
|
||||
document.getElementById("download-button").addEventListener("click", function(){
|
||||
document.getElementById("download-button").addEventListener("click", function () {
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(document.querySelector(".paste-wrapper").innerText));
|
||||
element.setAttribute('download', '{pasteid}.txt');
|
||||
@@ -42,117 +57,145 @@
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
});
|
||||
{deletescript}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
body{
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0d0d0d;
|
||||
}
|
||||
.container-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.paste-container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
padding: 20px;
|
||||
background-color: #181818;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
max-height: 80vh;
|
||||
min-height: 20%;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.paste-wrapper{
|
||||
width: 95%;
|
||||
height: fit-content;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: #1d1d1d;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
text-wrap: wrap;
|
||||
font-weight: 500;
|
||||
max-height: 80%;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.buttons-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.buttons-wrapper a{
|
||||
text-decoration: none;
|
||||
}
|
||||
.button{
|
||||
transition: 300ms;
|
||||
background-color: #222222;
|
||||
color: white;
|
||||
border: 2px solid #33333300;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
font-size: 1.05rem;
|
||||
padding: 10px;
|
||||
}
|
||||
.button:hover{
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: 2px solid #3a3a3a;
|
||||
}
|
||||
.nav-div{
|
||||
top: 0;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background-color: #181818;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
.nav-div a{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #222222;
|
||||
transition: 300ms;
|
||||
border: #2a2a2a00 2px solid;
|
||||
}
|
||||
.nav-div a:hover{
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</html>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap');
|
||||
body {
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0d0d0d;
|
||||
}
|
||||
|
||||
.container-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 98.7vh;
|
||||
}
|
||||
|
||||
.paste-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
padding: 20px;
|
||||
background-color: #181818;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
max-height: 80vh;
|
||||
min-height: 20%;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
|
||||
.paste-wrapper {
|
||||
width: 95%;
|
||||
height: fit-content;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: #1d1d1d;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
text-wrap: wrap;
|
||||
font-weight: 500;
|
||||
max-height: 80%;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
|
||||
.buttons-wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.buttons-wrapper a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.button {
|
||||
transition: 300ms;
|
||||
background-color: #222222;
|
||||
color: white;
|
||||
border: 2px solid #33333300;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
font-size: 1.05rem;
|
||||
padding: 10px;
|
||||
font-family: "Noto Sans Mono", "Consolas", "SF Mono", monospace;
|
||||
font-weight: 625;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: 2px solid #3a3a3a;
|
||||
}
|
||||
|
||||
.uploader-text {
|
||||
margin-top: -1.2rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.user-a {
|
||||
color: rgb(190, 190, 190);
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.nav-div {
|
||||
top: 0;
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background-color: #181818;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
height: fit-content;
|
||||
overflow-y: auto;
|
||||
border: #222222 2px solid;
|
||||
}
|
||||
|
||||
.nav-div a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #222222;
|
||||
transition: 300ms;
|
||||
border: #2a2a2a00 2px solid;
|
||||
}
|
||||
|
||||
.nav-div a:hover {
|
||||
transition: 300ms;
|
||||
background-color: #333333;
|
||||
border: #3a3a3a 2px solid;
|
||||
}
|
||||
</style>
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="buttons-wrapper">
|
||||
<a href="/">create paste</a>
|
||||
<a href="/archives">paste archives</a>
|
||||
<a href="/archive">paste archives</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.pastes-container{
|
||||
display: flex;
|
||||
|
||||
@@ -81,7 +81,7 @@ body{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 98.7vh;
|
||||
}
|
||||
.creation-container{
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user