Move navbar CSS to its own file

This commit is contained in:
Markus Wang Halvorsen 2018-02-10 15:04:57 +01:00
parent b1623f9da1
commit 56e6766520
18 changed files with 186 additions and 175 deletions

View File

@ -50,6 +50,7 @@ $events = array_values(array_filter(
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">

View File

@ -30,6 +30,7 @@ $users = $userManager->getAllUserData();
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">

View File

@ -26,6 +26,7 @@ if(!($isAdmin | $projectGroup | $activityGroup)){
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<link rel="stylesheet" href="../css/admin.css"> <link rel="stylesheet" href="../css/admin.css">

View File

@ -50,6 +50,7 @@ $projects = array_values(array_filter(
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">

View File

@ -32,6 +32,7 @@ $day = (isset($_GET['day']))
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Aktivitets&shy;verk&shy;stedet</header> <header>Aktivitets&shy;verk&shy;stedet</header>

View File

@ -12,6 +12,7 @@ use \pvv\side\Agenda;
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Sosial&shy;verk&shy;stedet</header> <header>Sosial&shy;verk&shy;stedet</header>

View File

@ -12,6 +12,7 @@ use \pvv\side\Agenda;
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Sosial&shy;verk&shy;stedet</header> <header>Sosial&shy;verk&shy;stedet</header>

View File

@ -1,9 +1,4 @@
header { header {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 50px; margin-top: 50px;
padding: 3vh 15vw; padding: 3vh 15vw;
width: 70vw; width: 70vw;
@ -12,8 +7,10 @@ header {
} }
header .logo { header .logo {
display: block;
width: 24vh; width: 24vh;
height: 24vh; height: 24vh;
margin: auto;
} }
main { main {
@ -23,8 +20,8 @@ main {
.info { .info {
text-align: center; text-align: center;
width: 100%; width: 100%;
padding: 0 0; padding: 0;
margin-top: 0; margin: 0;
overflow-y: hidden; overflow-y: hidden;
} }
@ -32,11 +29,11 @@ main {
.essentials { .essentials {
width: 100%; width: 100%;
margin: 1.8em 0; margin: 1.8em 0;
padding: .2em 0; padding: 0;
list-style: none; list-style: none;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
justify-content: center;
} }
.essentials li { .essentials li {

165
www/css/nav.css Normal file
View File

@ -0,0 +1,165 @@
nav {
position: fixed;
z-index: 99;
top: 0;
width: 100vw;
height: 50px;
background-color: #002244;
overflow: hidden;
}
nav * {
background-color: #002244;
color: #fff;
margin: 0;
padding: 0;
}
nav h2 {
display: inline-block;
position: fixed;
top: 0;
margin-left: .65em;
line-height: 5vh;
color: #002244;
}
nav .logo{
position: fixed;
top: 6px;
left: 6px;
width: 38px;
height: 38px;
}
nav ul {
position: fixed;
top: 0;
left: 50px;
width: 100vw;
height: 45px;
list-style: none;
}
nav li {
height: 100%;
line-height: 50px;
}
nav a {
display: inline-block;
height: 40px;
margin: 0 .7em;
text-decoration: none;
font-size: 1.2em;
text-align: center;
border-bottom: 2px solid rgba(255, 255, 255, 0);
transition: border-bottom .3s ease;
}
nav a:hover {
border-bottom: 2px solid rgba(255, 255, 255, 1);
transition: border-bottom .3s ease;
}
nav a.active {
border-bottom: 2px solid rgba(255, 255, 255, 1);
transition: none;
}
nav .login {
position: fixed;
top: 0;
right: 0;
height: 45px;
line-height: 55px;
}
#navopen {
display: none;
}
@media(max-width: 800px){
nav .logo {
visibility: hidden;
}
nav .login {
display: none;
}
nav ul {
left: 0px;
height: 50px;
}
nav a {
display: none;
border-bottom: none;
text-align: left;
margin: 0;
}
nav a:hover {
border-bottom: none;
}
nav a.active {
display: block;
height: 50px;
line-height: 50px;
padding: 0 .5em;
border-bottom: none;
}
#navopen {
display: block;
position: fixed;
top: 0;
right: 0;
line-height: 50px;
text-align: center;
width: 50px;
height: 50px;
margin: 0;
padding: 0;
background-color: #002244;
}
.opennav a {
display: block;
text-align: left;
margin: 0;
padding: 0 .5em;
}
.opennav a:hover {
background-color: #00407F;
}
.opennav a:hover li {
background-color: #00407F;
}
.opennav a.active:hover {
background-color: #002244;
}
.opennav a.active:hover li {
background-color: #002244;
}
.opennav .login {
position: relative;
display: block;
border-top: 1px solid gray;
}
}

View File

@ -7,95 +7,6 @@ body {
font-style: -apple-system, 'avenir next', avenir, roboto, noto, ubuntu, 'helvetica neue', helvetica, arial, sans-serif; font-style: -apple-system, 'avenir next', avenir, roboto, noto, ubuntu, 'helvetica neue', helvetica, arial, sans-serif;
} }
nav {
position: fixed;
z-index: 99;
top: 0;
width: 100vw;
height: 50px;
background-color: #002244;
overflow: hidden;
}
nav * {
background-color: #002244;
color: #fff;
margin: 0;
padding: 0;
}
nav h2 {
display: inline-block;
position: fixed;
top: 0;
margin-left: .65em;
line-height: 5vh;
color: #002244;
}
nav .logo{
position: fixed;
top: 6px;
left: 6px;
width: 38px;
height: 38px;
}
nav ul {
position: fixed;
top: 0;
left: 50px;
width: 100vw;
height: 45px;
list-style: none;
}
nav li {
height: 100%;
line-height: 50px;
}
nav a {
display: inline-block;
height: 40px;
margin: 0 .7em;
text-decoration: none;
font-size: 1.2em;
text-align: center;
border-bottom: 2px solid rgba(255, 255, 255, 0);
transition: border-bottom .3s ease;
}
nav a:hover {
border-bottom: 2px solid rgba(255, 255, 255, 1);
transition: border-bottom .3s ease;
}
nav a.active {
border-bottom: 2px solid rgba(255, 255, 255, 1);
transition: none;
}
nav .login {
position: fixed;
top: 0;
right: 0;
height: 45px;
line-height: 55px;
}
#navopen {
display: none;
}
main { main {
padding: 1em 15vw; padding: 1em 15vw;
height: 100vh; height: 100vh;
@ -122,81 +33,4 @@ main h2 {
background-color: #00407F; background-color: #00407F;
transition: background-color .2s ease; transition: background-color .2s ease;
}
@media(max-width: 800px){
nav .logo {
visibility: hidden;
}
nav .login {
display: none;
}
nav ul {
left: 0px;
height: 50px;
}
nav a {
display: none;
border-bottom: none;
text-align: left;
margin: 0;
}
nav a:hover {
border-bottom: none;
}
nav a.active {
display: block;
height: 50px;
line-height: 50px;
padding: 0 .5em;
border-bottom: none;
}
#navopen {
display: block;
position: fixed;
top: 0;
right: 0;
line-height: 50px;
text-align: center;
width: 50px;
height: 50px;
margin: 0;
padding: 0;
background-color: #002244;
}
.opennav a {
display: block;
text-align: left;
margin: 0;
padding: 0 .5em;
}
.opennav a:hover {
background-color: #00407F;
}
.opennav a:hover li {
background-color: #00407F;
}
.opennav a.active:hover {
background-color: #002244;
}
.opennav a.active:hover li {
background-color: #002244;
}
.opennav .login {
position: relative;
display: block;
border-top: 1px solid gray;
}
} }

View File

@ -23,6 +23,7 @@ $agenda = new \pvv\side\Agenda([
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/nav.css">
<link rel="stylesheet" href="css/splash.css"> <link rel="stylesheet" href="css/splash.css">
<link rel="stylesheet" href="css/landing.css"> <link rel="stylesheet" href="css/landing.css">

View File

@ -35,6 +35,7 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<link rel="stylesheet" href="../css/calendar.css"> <link rel="stylesheet" href="../css/calendar.css">

View File

@ -12,6 +12,7 @@ require __DIR__ . '/../../sql_config.php';
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Kommunikasjons&shy;verk&shy;stedet</header> <header>Kommunikasjons&shy;verk&shy;stedet</header>

View File

@ -15,6 +15,7 @@ $agenda = new \pvv\side\Agenda([
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Kurs&shy;verk&shy;stedet</header> <header>Kurs&shy;verk&shy;stedet</header>

View File

@ -12,6 +12,7 @@ use \pvv\side\Agenda;
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Sosial&shy;verk&shy;stedet</header> <header>Sosial&shy;verk&shy;stedet</header>

View File

@ -8,6 +8,7 @@ p {hyphens: auto;}
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<header>Programvareverkstedet</header> <header>Programvareverkstedet</header>

View File

@ -42,6 +42,7 @@ if (isset($_SESSION['userdata'])) { // if logged in with feide
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<header>Registrerings&shy;verks&shy;stedet</header> <header>Registrerings&shy;verks&shy;stedet</header>

View File

@ -18,6 +18,7 @@ $projects = $projectManager->getAll();
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/splash.css"> <link rel="stylesheet" href="../css/splash.css">
<header>Prosjekt&shy;verk&shy;stedet</header> <header>Prosjekt&shy;verk&shy;stedet</header>