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 { header h1 {
margin: 0; margin: 0;
font-size: 120%; font-size: 120%;
}
h1 a {
color: inherit;
text-decoration: none;
display: block;
padding: 10px; padding: 10px;
} }
@ -54,8 +59,15 @@ nav a {
color: black; color: black;
} }
nav a:hover, nav a:focus { header a {
background-color: rgba(255, 255, 255, 0.5); 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 /*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) { @media only screen and (max-width: 750px) {
nav li { nav li {
display: block;
margin: 0; margin: 0;
} }
nav a { nav span, nav a {
display: block; padding: 10px;
}
.alignLeft, .alignRight {
border-top: 1px solid #000;
} }
} }
@ -82,20 +89,22 @@ that have a width less or equal than 500px*/
} }
.align { .align {
display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
width: 50%; width: 50%;
min-width: 750px;
} }
}
.alignLeft { .alignLeft {
float: left; float: left;
text-align: left; text-align: left;
} }
.alignRight { .alignRight {
float: right; float: right;
text-align: right; text-align: right;
}
} }
main { main {
@ -113,20 +122,10 @@ input[type=text] {
box-sizing: border-box; box-sizing: border-box;
} }
.accentuated { .deemphasized {
color: #66351d; 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, select,
input, input,
textarea, textarea,
@ -134,9 +133,9 @@ button {
width: 100%; width: 100%;
line-height: 1.5; line-height: 1.5;
padding: 15px 10px; padding: 15px 10px;
border: 1px solid var(--borderFormEls); border: 1px solid hsl(0, 0%, 10%);
color: var(--white); color: #afafaf;
background: var(--bgFormEls); background: hsl(0, 0%, 14%);
transition: background-color 0.3s cubic-bezier(0.57, 0.21, 0.69, 1.25), 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); transform 0.3s cubic-bezier(0.57, 0.21, 0.69, 1.25);
} }
@ -146,7 +145,7 @@ textarea {
} }
::placeholder { ::placeholder {
color: var(--soft-grey); color: #808080;
opacity: 0.8; opacity: 0.8;
} }
@ -155,7 +154,7 @@ select:focus,
input:focus, input:focus,
textarea:focus, textarea:focus,
button:focus { button:focus {
background: var(--bgFormElsFocus); background: hsl(0, 7%, 20%);
} }
select:focus, select:focus,

View file

@ -11,7 +11,7 @@
<body> <body>
<header> <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> <nav>
<div class="align"> <div class="align">
<ul class="alignLeft"> <ul class="alignLeft">
@ -27,7 +27,7 @@
</ul> </ul>
<ul class="alignRight"> <ul class="alignRight">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li class="accentuated"> <li class="deemphasized">
<span> <span>
Hallo, {{ user.username }} Hallo, {{ user.username }}
</span> </span>