Layout-fu

This commit is contained in:
Midgard 2020-07-22 17:25:59 +02:00
parent 4a17d4b9c0
commit cc5e3e3ecd
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 71 additions and 50 deletions

View file

@ -2,14 +2,27 @@ body {
background: #141313;
color: #999;
margin: 0;
font-family: monospace;
}
input, textarea {
font-family: inherit;
font-size: inherit;
}
header {
color: #141313;
background-color: #ff8000;
}
header h1 {
margin: 0;
font-size: 120%;
padding: 10px;
}
nav {
width: 100vw;
background-color: #ff8000;
margin-bottom: 1em;
padding-top: 1rem;
padding-bottom: 1em;
background-color: rgba(0, 0, 0, 0.1);
}
nav ul {
@ -20,14 +33,11 @@ nav ul {
nav li {
list-style-type: none;
display: inline-block;
margin: 0 1.5vw;
/* 3% of the height of the viewport */
font-size: 2vh;
margin: 0 1vw;
}
nav span {
padding: 2vw;
font-family: monospace;
}
nav a {
@ -71,10 +81,17 @@ that have a width less or equal than 500px*/
}
}
main {
margin: auto;
width: 50%;
padding: 10px;
@media only screen and (min-width: 750px) {
body {
font-size: 18px;
}
.align {
margin-left: auto;
margin-right: auto;
width: 50%;
padding: 10px;
}
}
input {

View file

@ -10,44 +10,48 @@
</head>
<body>
<nav>
<button id="nav-button"></button>
<ul class="alignLeft">
<li>
<a href="{% url 'events:index' %}">
Home</a>
</li>
<li>
<a href="{% url 'users:profile' %}">
Profile
</a>
</li>
</ul>
<ul class="alignRight">
{% if user.is_authenticated %}
<li class="accentuated">
<span>
Hello, {{ user.username }}
</span>
</li>
<li>
<a href="{% url 'users:logout' %}">
Logout
</a>
</li>
{% else %}
<li>
<a href="{% url 'oauth:login' %}">
Login
</a>
</li>
{% endif %}
<header>
<h1 class="align">Zeus WPI Kelder&shy;registratie&shy;systeem™</h1>
<nav>
<div class="align">
<button id="nav-button"></button>
<ul class="alignLeft">
<li>
<a href="{% url 'events:index' %}">
Home</a>
</li>
<li>
<a href="{% url 'users:profile' %}">
Profile
</a>
</li>
</ul>
<ul class="alignRight">
{% if user.is_authenticated %}
<li class="accentuated">
<span>
Hello, {{ user.username }}
</span>
</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>
</nav>
<h1>Zeus WPI Kelderregistratiesysteem™</h1>
<main>
</ul>
<div style="clear: both;"></div>
</div>
</nav>
</header>
<main class="align">
{% block content %}{% endblock %}
</main>
<script>