mirror of
https://github.com/milk-net/milk-net.github.io.git
synced 2025-04-19 05:33:40 -05:00
Delete forum directory
This commit is contained in:
parent
a7726c278a
commit
eec838423e
5 changed files with 0 additions and 204 deletions
|
@ -1,37 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MilkBoard | Login / Register</title>
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Login / Register</h1>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section id="login-register">
|
||||
<form id="auth-form">
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username" required>
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" required>
|
||||
<div class="turnstile-container">
|
||||
<div class="cf-turnstile" data-sitekey="0x4AAAAAABL-mVGZhgs_SDwZ"></div>
|
||||
</div>
|
||||
<button type="submit" id="auth-submit">Login/Register</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="/"><img src="/assets/img/88x31.png" loading="lazy" width="88" height="31"></a>
|
||||
<a href="/"><img src="/assets/img/88x31_light.png" loading="lazy" width="88" height="31"></a>
|
||||
</footer>
|
||||
|
||||
<script src="auth.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
document.getElementById("auth-form").addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
const username = document.getElementById("username").value;
|
||||
const password = document.getElementById("password").value;
|
||||
|
||||
const turnstileResponse = document.querySelector(".cf-turnstile-response").value;
|
||||
if (!turnstileResponse) {
|
||||
alert("Please complete the CAPTCHA");
|
||||
return;
|
||||
}
|
||||
|
||||
// Simulate authentication (In a real application, verify credentials and CAPTCHA on the server)
|
||||
if (username && password) {
|
||||
localStorage.setItem("username", username);
|
||||
window.location.href = "index.html";
|
||||
} else {
|
||||
alert("Invalid login credentials");
|
||||
}
|
||||
});
|
|
@ -1,36 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MilkBoard</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>MilkBoard</h1>
|
||||
<div id="auth-links">
|
||||
<a href="auth.html">Login/Register</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section id="post-list">
|
||||
<!-- Posts will be displayed here dynamically -->
|
||||
</section>
|
||||
|
||||
<section id="new-post">
|
||||
<h2>Create</h2>
|
||||
<textarea id="post-content" placeholder="Write your post here..." disabled></textarea>
|
||||
<button id="post-submit" disabled>Submit Post</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="/"><img src="/assets/img/88x31.png" loading="lazy" width="88" height="31"></a>
|
||||
<a href="/"><img src="/assets/img/88x31_light.png" loading="lazy" width="88" height="31"></a>
|
||||
</footer>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,46 +0,0 @@
|
|||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const postContent = document.getElementById("post-content");
|
||||
const postSubmit = document.getElementById("post-submit");
|
||||
const postList = document.getElementById("post-list");
|
||||
const authLinks = document.getElementById("auth-links");
|
||||
|
||||
let currentUser = null; // Store the current user info
|
||||
|
||||
// Check if user is logged in
|
||||
const checkUser = () => {
|
||||
// Simulate user authentication for now (In real case, check from the server)
|
||||
const user = localStorage.getItem("username");
|
||||
if (user) {
|
||||
currentUser = user;
|
||||
postContent.disabled = false;
|
||||
postSubmit.disabled = false;
|
||||
authLinks.innerHTML = `<span>Logged in as ${user}</span> | <a href="auth.html" onclick="logout()">Logout</a>`;
|
||||
} else {
|
||||
postContent.disabled = true;
|
||||
postSubmit.disabled = true;
|
||||
}
|
||||
};
|
||||
|
||||
// Handle post creation
|
||||
postSubmit.addEventListener("click", () => {
|
||||
const content = postContent.value.trim();
|
||||
if (content) {
|
||||
const newPost = document.createElement("div");
|
||||
newPost.classList.add("post");
|
||||
newPost.innerHTML = `
|
||||
<h3>${currentUser}</h3>
|
||||
<p>${content}</p>
|
||||
`;
|
||||
postList.prepend(newPost);
|
||||
postContent.value = '';
|
||||
}
|
||||
});
|
||||
|
||||
// Logout functionality
|
||||
const logout = () => {
|
||||
localStorage.removeItem("username");
|
||||
checkUser();
|
||||
};
|
||||
|
||||
checkUser();
|
||||
});
|
|
@ -1,65 +0,0 @@
|
|||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#auth-links a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
#post-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.post {
|
||||
background-color: #f9f9f9;
|
||||
padding: 15px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue