master #6

Open
karimov-adel wants to merge 39 commits from master into adel_branch_2.0
2 changed files with 16 additions and 3 deletions
Showing only changes of commit d328acfb93 - Show all commits

View File

@ -6,18 +6,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% WRITE pres.phr.decl.page-login %}</title> <title>{% WRITE pres.phr.decl.page-login %}</title>
<link rel="stylesheet" href="/assets/css/login.css"> <link rel="stylesheet" href="/assets/css/login.css">
<script src="/assets/js/login.js" defer></script>
</head> </head>
<body> <body>
{% PUT pass-pres-userinfo pres userinfo %}
<div class="form-container"> <div class="form-container">
<h1 class="hide-cursor no-select">{% WRITE pres.phr.decl.enter %}</h1> <h1 class="hide-cursor no-select">{% WRITE pres.phr.decl.enter %}</h1>
<form action="/login" method="post" enctype="application/x-www-form-urlencoded"> <form action="/login" method="post" enctype="application/x-www-form-urlencoded">
<label for="nickname">{% WRITE pres.phr.decl.nickname %}</label> <label for="nickname">{% WRITE pres.phr.decl.nickname %}</label>
<input type="text" name="nickname" id="nickname"><br> <input type="text" name="nickname" id="nickname"><br>
<label for="password">{% WRITE pres.phr.decl.password %}</label> <label for="password">{% WRITE pres.phr.decl.password %}</label>
<input type="password" name="password" id="password"><br> <input type="password" name="password" id="password"><br>
<button type="submit" class="hide-cursor no-select">{% WRITE pres.phr.act.enter %}</button> <button type="submit" class="hide-cursor no-select">{% WRITE pres.phr.act.enter %}</button>
</form> </form>
</div> </div>

14
assets/js/login.js Normal file
View File

@ -0,0 +1,14 @@
document.addEventListener('DOMContentLoaded', function() {
function handleSubmit(event) {
event.preventDefault();
const nickname = document.getElementById('nickname').value;
const password = document.getElementById('password').value;
window.location.href = '/assets/HypertextPages/list-rooms.nytl.html';
}
const form = document.querySelector('form');
form.addEventListener('submit', handleSubmit);
});