save username in cookie
This commit is contained in:
parent
539a36dffe
commit
2d98665f92
7 changed files with 149 additions and 95 deletions
21
Lab01/app/templates/tasks.tmpl
Normal file
21
Lab01/app/templates/tasks.tmpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ .title }}</title>
|
||||
{{template "head" .}}
|
||||
</head>
|
||||
<body>
|
||||
{{template "navbar" .}}
|
||||
|
||||
<div class="position-absolute top-50 start-50 translate-middle">
|
||||
<div class="fs-3">{{ .title }}</div>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
{{template "scripts" .}}
|
||||
<script>
|
||||
userLoggedIn().then((loggedIn) => !loggedIn && redirect("/login"));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue