49 lines
976 B
HTML
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>
|