This commit is contained in:
Jake Paul
2025-11-23 00:01:12 -06:00
commit 1c45c7f7cd
16 changed files with 452 additions and 0 deletions

2
static/jquery-3.7.1.slim.min.js vendored Normal file

File diff suppressed because one or more lines are too long

68
static/main.js Normal file
View File

@@ -0,0 +1,68 @@
// real shit
function enlarge(url) {
const overlay = document.createElement("div");
overlay.className = "overlay";
const image = document.createElement("img");
image.src = url;
image.style.position = "fixed"; // Use 'fixed' to position relative to the viewport
image.style.top = "50%";
image.style.left = "50%";
image.style.transform = "translate(-50%, -50%)";
image.style.maxWidth = "90vw";
image.style.maxHeight = "90vh";
image.style.zIndex = "1000";
image.style.border = "2px solid #333";
image.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.5)";
image.className = "large";
overlay.appendChild(image);
document.body.appendChild(overlay);
overlay.onclick = function() {
document.body.removeChild(overlay);
};
}
async function ratePost(post, rating) {
const response = await fetch(`../vote/${post}/${rating}`, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ "rating": rating }),
});
if (response.status == 429) {
displayBottomMessage("You already voted today!");
}
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}
console.log(response.status);
const responseData = await response.json();
console.log(responseData);
window.location.reload();
}
function displayBottomMessage(messageText) {
let messageContainer = document.getElementById('api-message-container');
if (!messageContainer) {
messageContainer = document.createElement('div');
messageContainer.id = 'notification';
messageContainer.style.position = 'fixed';
messageContainer.style.bottom = '10px';
messageContainer.style.left = '10px';
document.body.appendChild(messageContainer);
}
messageContainer.textContent = messageText;
setTimeout(() => {
if (messageContainer && messageContainer.parentNode) {
messageContainer.parentNode.removeChild(messageContainer);
}
}, 1500);
}

BIN
static/nah.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

57
static/style.css Normal file
View File

@@ -0,0 +1,57 @@
/* woekwewe */
html { background:#595656; color: white;}
textarea { resize: none; border: 1px Solid;}
h1 { display: inline; margin: 0; padding: 0;}
.container { width: 60%; margin: auto; }
.nav { padding-left: 0px !important; padding:5px; }
.overlay::after {position: fixed; top: 10%; left: 10%; font-size: 24px; color: white; content: "Click away to exit...";}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.85);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 20px;
box-sizing: border-box;
}
.mod {
color: rgb(182, 0, 0);
}
img:hover {
cursor: pointer;
}
a {
color:blueviolet;
}
textarea[disabled] {
background: darkgrey;
}
.replies {
margin: 2em;
}
#notification {
font-size: 24px;
}
.replies {
margin-left: 10px;
}
th {
text-align: left;
}
a {
color: rgb(161, 161, 161);
}

9
static/threads.js Normal file
View File

@@ -0,0 +1,9 @@
// threads.js
// by lua (zav@tbdpowered.net)
function toggleContent(contentId, toggleElement) {
$("." + contentId).toggle();
var $toggle = $(toggleElement);
$toggle.text( ($toggle.text() == '[-]' ? '[+]' : '[-]') );
}

BIN
static/yeah.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB