go_winter_work_2025/bash/rest/home.html
Vitaliy Turov 50f600e168
Some checks failed
Deploy to Server (Docker) / deploy (push) Failing after 9s
feature/train_bash (#7)
Reviewed-on: https://git.gocommunity.ru/walleri1/go_winter_work_2025/pulls/7
Co-authored-by: Vitaliy Turov <walleri1@yandex.ru>
Co-committed-by: Vitaliy Turov <walleri1@yandex.ru>
2025-02-15 11:59:59 +03:00

49 lines
976 B
HTML

HTTP/1.1 200 OK
Content-Type: text/html
<!DOCTYPE html>
<html>
<head>
<style>
section {
display: inline-block;
margin-left: 40%;
margin-top: 10%;
}
section p {
color: black;
}
</style>
</head>
<body>
<section>
<p>Hello, {{name}}</p>
<form method="POST" action="/logout">
<input type="submit" value="Logout" />
</form>
<a href="javascript:void(0)">Blue theme</a>
</section>
</body>
<footer>
<script>
let themeElem = document.querySelector('a');
let nameElem = document.querySelector('section > p');
themeElem.addEventListener('click', function(evt) {
if (nameElem.style.color == 'blue') {
nameElem.style.color = 'black';
themeElem.text = 'Blue theme';
} else {
nameElem.style.color = 'blue';
themeElem.text = 'Black theme';
}
})
</script>
</footer>
</html>