From a1e2a734193aeb3b77cf8963a33a2d97f6ed1cba Mon Sep 17 00:00:00 2001 From: Voxel Date: Tue, 15 Apr 2025 15:19:14 -0400 Subject: [PATCH] Delete forum directory --- forum/auth.html | 28 --------------- forum/auth.js | 37 -------------------- forum/index.html | 30 ---------------- forum/script.js | 50 -------------------------- forum/style.css | 91 ------------------------------------------------ 5 files changed, 236 deletions(-) delete mode 100644 forum/auth.html delete mode 100644 forum/auth.js delete mode 100644 forum/index.html delete mode 100644 forum/script.js delete mode 100644 forum/style.css diff --git a/forum/auth.html b/forum/auth.html deleted file mode 100644 index 67fb062..0000000 --- a/forum/auth.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Auth - MilkNet Forum - - - - -
-

Login

-
-
-

- - -
- -

Already registered?

-
-
- -
- - - - diff --git a/forum/auth.js b/forum/auth.js deleted file mode 100644 index 495f260..0000000 --- a/forum/auth.js +++ /dev/null @@ -1,37 +0,0 @@ -function getUsers() { - return JSON.parse(localStorage.getItem('users') || '{}'); -} - -function saveUsers(users) { - localStorage.setItem('users', JSON.stringify(users)); -} - -function register() { - const username = document.getElementById('reg-username').value.trim(); - const password = document.getElementById('reg-password').value; - - if (!username || !password) return alert("Fill in all fields"); - - const token = document.querySelector('[name="cf-turnstile-response"]')?.value; - if (!token) return alert("Please complete the CAPTCHA"); - - const users = getUsers(); - if (users[username]) return alert("Username already taken"); - - users[username] = { password }; - saveUsers(users); - localStorage.setItem('loggedInUser', username); - window.location.href = "index.html"; -} - -function login() { - const username = document.getElementById('login-username').value.trim(); - const password = document.getElementById('login-password').value; - - const users = getUsers(); - if (!users[username]) return alert("User does not exist"); - if (users[username].password !== password) return alert("Incorrect password"); - - localStorage.setItem('loggedInUser', username); - window.location.href = "index.html"; -} diff --git a/forum/index.html b/forum/index.html deleted file mode 100644 index a70f563..0000000 --- a/forum/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - MilkNet Forum - - - -
-

MilkNet Forum

- - -
- - - - - -
- - - - diff --git a/forum/script.js b/forum/script.js deleted file mode 100644 index eff5cea..0000000 --- a/forum/script.js +++ /dev/null @@ -1,50 +0,0 @@ -function uploadImage() { - const fileInput = document.getElementById('image-upload'); - const file = fileInput.files[0]; - - if (!file) { - alert('Please select an image to upload.'); - return; - } - - const formData = new FormData(); - formData.append('file', file); - - // Send the file to culiao.lol for upload - fetch('https://culiao.lol/upload', { - method: 'POST', - body: formData, - }) - .then(response => response.json()) - .then(data => { - if (data.success) { - const imageUrl = data.url; // Assuming the response includes the URL - alert('Image uploaded successfully! Image URL: ' + imageUrl); - addImageToPost(imageUrl); - } else { - console.error('Upload failed:', data); - alert('Image upload failed. Please try again.'); - } - }) - .catch(error => { - console.error('Error uploading image:', error); - alert('An error occurred during image upload.'); - }); -} - -function addImageToPost(imageUrl) { - const postContent = document.getElementById('post-content'); - postContent.value += `\n![Image](${imageUrl})`; // Add image URL to post content -} - -function submitPost() { - const postContent = document.getElementById('post-content').value; - if (!postContent) { - alert("Please write something before submitting."); - return; - } - - // Here you can process the post content and submit it to your forum (e.g., save it to localStorage or display on the page) - console.log("Post submitted: " + postContent); - alert("Post submitted!"); -} diff --git a/forum/style.css b/forum/style.css deleted file mode 100644 index 0fc7321..0000000 --- a/forum/style.css +++ /dev/null @@ -1,91 +0,0 @@ -/* Solid black background */ -body, html { - height: 100%; - margin: 0; - padding: 0; - font-family: sans-serif; - background: black; - color: white; - display: flex; - flex-direction: column; - align-items: center; - overflow-y: auto; -} - -/* Header logo */ -header { - text-align: center; - margin: 30px 0; -} - -header h1 { - font-size: 2.5em; - margin: 0; - color: white; -} - -/* Containers */ -#new-thread, .thread, .reply, .auth-container { - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.2); - padding: 15px; - margin-bottom: 20px; - border-radius: 10px; - width: 90%; - max-width: 700px; -} - -/* Text inputs */ -textarea, input[type="text"], input[type="password"] { - width: 100%; - background: #222; - color: white; - padding: 10px; - margin-top: 10px; - border: none; - border-radius: 5px; -} - -/* Buttons */ -button { - margin-top: 10px; - padding: 10px 16px; - border: none; - background: #444; - color: white; - border-radius: 5px; - cursor: pointer; -} - -button:hover { - background: #666; -} - -/* Images */ -img { - max-width: 100%; - margin-top: 10px; - border-radius: 5px; -} - -/* Emoji picker area */ -.emoji-wrap { - position: relative; -} - -.emoji-button { - position: absolute; - right: 10px; - bottom: 10px; - background: transparent; - border: none; - font-size: 1.2em; - cursor: pointer; - color: white; -} - -/* Auth container for login/register */ -.auth-container { - margin-top: 50px; - text-align: center; -}