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

View file

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