kers/templates/base.html

214 lines
3.4 KiB
HTML
Raw Normal View History

2020-07-22 04:08:30 +02:00
<!DOCTYPE html>
<html>
2020-07-22 05:44:49 +02:00
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<title>{% block title %}Zeus WPI Kelderregistratiesysteem™{% endblock %}</title>
{% block styles %}{% endblock %}
<style>
2020-07-22 14:06:16 +02:00
body {
background: #141313;
color: #999;
margin: 0;
}
2020-07-22 05:44:49 +02:00
nav {
width: 100vw;
background-color: #ff8000;
margin-bottom: 1em;
padding-top: 1rem;
padding-bottom: 1em;
}
nav ul {
margin: 0;
padding: 0;
}
nav li {
list-style-type: none;
2020-07-22 14:06:16 +02:00
display: inline-block;
2020-07-22 15:10:49 +02:00
margin: 0 1.5vw;
2020-07-22 14:06:16 +02:00
/* 3% of the height of the viewport */
2020-07-22 15:10:49 +02:00
font-size: 2vh;
2020-07-22 05:44:49 +02:00
}
2020-07-22 15:17:27 +02:00
nav span {
padding: 2vw;
font-family: monospace;
}
2020-07-22 05:44:49 +02:00
nav a {
text-decoration: none;
color: black;
padding: 2vw;
font-family: monospace;
}
2020-07-22 14:06:16 +02:00
nav a:hover, nav a:focus, nav button:hover, nav buttton:focus {
background-color: rgba(255, 255, 255, 0.5);
}
button {
display: none;
2020-07-22 05:44:49 +02:00
}
/*change the layout of the navigation bar for all the screens
that have a width less or equal than 500px*/
@media only screen and (max-width: 750px) {
2020-07-22 14:06:16 +02:00
nav li {
display: block;
2020-07-22 05:44:49 +02:00
margin: 0;
}
2020-07-22 14:06:16 +02:00
nav a {
2020-07-22 05:44:49 +02:00
display: block;
}
button {
display: block;
padding: 2vw;
font-size: 3vh;
2020-07-22 14:06:16 +02:00
background-color: #ff8000;
2020-07-22 05:44:49 +02:00
border: none;
cursor: pointer;
}
}
2020-07-22 14:06:16 +02:00
main {
margin: auto;
width: 50%;
padding: 10px;
}
input {
width: 100%;
}
input[type=text] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
2020-07-22 05:44:49 +02:00
}
2020-07-22 15:10:49 +02:00
.alignLeft {
float: left;
}
.alignRight {
float: right;
}
2020-07-22 15:17:27 +02:00
2020-07-22 15:10:49 +02:00
.accentuated {
color: #66351d;
}
2020-07-22 15:17:27 +02:00
:root {
--white: #afafaf;
--red: #e31b23;
--bodyColor: #292a2b;
--borderFormEls: hsl(0, 0%, 10%);
--bgFormEls: hsl(0, 0%, 14%);
--bgFormElsFocus: hsl(0, 7%, 20%);
}
select,
input,
textarea,
button {
width: 100%;
line-height: 1.5;
padding: 15px 10px;
border: 1px solid var(--borderFormEls);
color: var(--white);
background: var(--bgFormEls);
transition: background-color 0.3s cubic-bezier(0.57, 0.21, 0.69, 1.25),
transform 0.3s cubic-bezier(0.57, 0.21, 0.69, 1.25);
}
textarea {
height: 170px;
}
::placeholder {
color: inherit;
opacity: 1;
}
2020-07-22 15:21:49 +02:00
/* On focus styling */
select:focus,
input:focus,
textarea:focus,
button:focus {
background: var(--bgFormElsFocus);
}
select:focus,
input:focus,
textarea:focus {
transform: scale(1.02);
}
2020-07-22 05:44:49 +02:00
</style>
</head>
<body>
<nav>
2020-07-22 14:06:16 +02:00
<button id="nav-button"></button>
2020-07-22 15:10:49 +02:00
<ul class="alignLeft">
2020-07-22 05:44:49 +02:00
<li>
<a href="{% url 'events:index' %}">
Home</a>
</li>
<li>
<a href="{% url 'users:profile' %}">
Profile
</a>
</li>
</ul>
2020-07-22 15:10:49 +02:00
<ul class="alignRight">
{% if user.is_authenticated %}
<li class="accentuated">
2020-07-22 15:17:27 +02:00
<span>
Hello, {{ user.username }}
</span>
2020-07-22 15:10:49 +02:00
</li>
<li>
<a href="{% url 'users:logout' %}">
Logout
</a>
</li>
{% else %}
<li>
<a href="{% url 'oauth:login' %}">
Login
</a>
</li>
{% endif %}
</ul>
<div style="clear: both;"></div>
2020-07-22 05:44:49 +02:00
</nav>
<h1>Zeus WPI Kelderregistratiesysteem™</h1>
2020-07-22 14:06:16 +02:00
<main>
2020-07-22 15:10:49 +02:00
{% block content %}{% endblock %}
2020-07-22 14:06:16 +02:00
</main>
2020-07-22 05:44:49 +02:00
<script>
document.addEventListener("DOMContentLoaded", function () {
let button = document.getElementById('nav-button')
button.addEventListener('click', () => {
if (button.innerText === "☰") {
button.innerText = "✖";
} else {
button.innerText = "☰";
}
})
});
</script>
2020-07-22 14:06:16 +02:00
</body>
2020-07-22 04:08:30 +02:00
</html>