folder-structure #9

Merged
vex merged 15 commits from folder-structure into develop 2024-11-18 17:18:38 +00:00
4 changed files with 39 additions and 0 deletions
Showing only changes of commit d6126e6889 - Show all commits

View File

@ -9,5 +9,6 @@
<body>
<h1>Hello there...</h1>
<a href="/example">Test</a>
<a href="/login">Login</a>
</body>
</html>

27
public/login/index.html Normal file
View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<div>
<label>
E-Mail
<br>
<input type="text" id="loginMail">
</label>
<br>
<label>
Passwort
<br>
<input type="password" id="loginPassword">
</label>
<br>
<button onclick="login()">Login</button>
</div>
<!-- scripts -->
<script src="login.js"></script>
</body>
</html>

7
scripts/login.js Normal file
View File

@ -0,0 +1,7 @@
let nameEl = document.getElementById("loginMail");
let passwordEl = document.getElementById("loginPassword");
function login() {
//console.log(nameEl.value)
//console.log(passwordEl.value)
}

View File

@ -9,4 +9,8 @@ router.get('/example', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/example/index.html'));
})
router.get('/login', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/login/index.html'));
})
module.exports = router;