Responsive style++

This commit is contained in:
Midgard 2020-07-25 13:27:20 +02:00
parent 38f811784c
commit 79fc7413c9
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 34 additions and 35 deletions

View file

@ -18,6 +18,11 @@ header {
header h1 {
margin: 0;
font-size: 120%;
}
h1 a {
color: inherit;
text-decoration: none;
display: block;
padding: 10px;
}
@ -54,8 +59,15 @@ nav a {
color: black;
}
nav a:hover, nav a:focus {
background-color: rgba(255, 255, 255, 0.5);
header a {
transition: background-color 0.1s;
background-color: rgba(255, 255, 255, 0);
}
header a:hover, header a:focus, header a:active {
background-color: rgba(255, 255, 255, 0.3);
}
h1 a:hover, h1 a:focus, h1 a:active {
background-color: rgba(255, 255, 255, 0.1);
}
/*change the layout of the navigation bar for all the screens
@ -63,16 +75,11 @@ that have a width less or equal than 500px*/
@media only screen and (max-width: 750px) {
nav li {
display: block;
margin: 0;
}
nav a {
display: block;
}
.alignLeft, .alignRight {
border-top: 1px solid #000;
nav span, nav a {
padding: 10px;
}
}
@ -82,9 +89,12 @@ that have a width less or equal than 500px*/
}
.align {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
min-width: 750px;
}
}
.alignLeft {
@ -96,7 +106,6 @@ that have a width less or equal than 500px*/
float: right;
text-align: right;
}
}
main {
padding: 10px;
@ -113,20 +122,10 @@ input[type=text] {
box-sizing: border-box;
}
.accentuated {
.deemphasized {
color: #66351d;
}
:root {
--white: #afafaf;
--soft-grey: #808080;
--red: #e31b23;
--bodyColor: #292a2b;
--borderFormEls: hsl(0, 0%, 10%);
--bgFormEls: hsl(0, 0%, 14%);
--bgFormElsFocus: hsl(0, 7%, 20%);
}
select,
input,
textarea,
@ -134,9 +133,9 @@ button {
width: 100%;
line-height: 1.5;
padding: 15px 10px;
border: 1px solid var(--borderFormEls);
color: var(--white);
background: var(--bgFormEls);
border: 1px solid hsl(0, 0%, 10%);
color: #afafaf;
background: hsl(0, 0%, 14%);
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);
}
@ -146,7 +145,7 @@ textarea {
}
::placeholder {
color: var(--soft-grey);
color: #808080;
opacity: 0.8;
}
@ -155,7 +154,7 @@ select:focus,
input:focus,
textarea:focus,
button:focus {
background: var(--bgFormElsFocus);
background: hsl(0, 7%, 20%);
}
select:focus,

View file

@ -11,7 +11,7 @@
<body>
<header>
<h1 class="align">Zeus WPI Kelder&shy;registratie&shy;systeem</h1>
<h1><a href="/"><span class="align">Zeus WPI Kelder&shy;registratie&shy;systeem</span></a></h1>
<nav>
<div class="align">
<ul class="alignLeft">
@ -27,7 +27,7 @@
</ul>
<ul class="alignRight">
{% if user.is_authenticated %}
<li class="accentuated">
<li class="deemphasized">
<span>
Hallo, {{ user.username }}
</span>