init,working

This commit is contained in:
2025-09-15 13:41:37 -06:00
commit 016d4e3c0f
10 changed files with 2582 additions and 0 deletions

BIN
www/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

35
www/index.html Normal file
View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>FileShare</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
</head>
<body>
<br>
<br>
<h1>FileShare</h1>
<br>
<br>
<form action="/upload" method="POST" enctype="multipart/form-data">
<label for="upload" id="upload_btn">Select file</label>
<input type="file" name="upload" id="upload">
<label for="submit">Upload</label>
<input type="submit" id="submit">
</form>
</body>
</html>
<script defer>
const btn = document.getElementById("upload_btn");
document.getElementById("upload").onchange = (e) => {
let filename = e.target.value;
const last = filename.lastIndexOf('\\');
filename = filename.substring(last+1);
btn.innerText = filename;
}
</script>

41
www/main.css Normal file
View File

@@ -0,0 +1,41 @@
html {
font-family: Arial, Helvetica, sans-serif;
}
body {
max-width: 500px;
margin: auto;
}
h1 {
text-align: center;
font-size: 3rem;
}
form {
display: flex;
flex-direction: column;
}
label {
color: white;
border: solid 2px black;
border-radius: 10px;
background-color: rgba(0,0,255,0.5);
margin: 5px;
padding: 20px;
text-align: center;
}
label:hover {
cursor: pointer;
color: black;
background-color: rgba(0, 0, 255, 0.4);
}
input {
display: none;
}
a {
color: rgba(0,0,255,0.5);
font-size: 2rem;
}
a, p {
margin: auto;
display: block;
text-align: center;
}