Delete forum directory

This commit is contained in:
Voxel 2025-04-15 15:19:14 -04:00 committed by GitHub
parent c15e9a26c4
commit a1e2a73419
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 0 additions and 236 deletions

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auth - MilkNet Forum</title>
<link rel="stylesheet" href="style.css">
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
</head>
<body>
<div class="auth-container">
<h1>Login</h1>
<input type="text" id="reg-username" placeholder="Username"><br>
<input type="password" id="reg-password" placeholder="Password"><br>
<div class="cf-turnstile" data-sitekey="0x4AAAAAABL-mVGZhgs_SDwZ"></div><br>
<button onclick="register()">Register</button>
<hr>
<h2>Already registered?</h2>
<input type="text" id="login-username" placeholder="Username"><br>
<input type="password" id="login-password" placeholder="Password"><br>
<button onclick="login()">Login</button>
</div>
<script src="auth.js"></script>
</body>
</html>

View file

@ -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";
}

View file

@ -1,30 +0,0 @@
<script>
if (!localStorage.getItem('loggedInUser')) {
window.location.href = "auth.html";
}
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MilkNet Forum</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="auth-container">
<h1>MilkNet Forum</h1>
<!-- Forum Post Section -->
<div id="new-thread">
<textarea id="post-content" placeholder="Write your post..."></textarea>
<input type="file" id="image-upload">
<button onclick="uploadImage()">Upload</button>
<button onclick="submitPost()">Post</button>
</div>
<script src="script.js"></script>
</body>
</html>

View file

@ -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!");
}

View file

@ -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;
}