From 56e6766520290983511b959165981924c8c3d763 Mon Sep 17 00:00:00 2001 From: halworsen Date: Sat, 10 Feb 2018 15:04:57 +0100 Subject: [PATCH] Move navbar CSS to its own file --- www/admin/aktiviteter/index.php | 1 + www/admin/brukere/index.php | 1 + www/admin/index.php | 1 + www/admin/prosjekter/index.php | 1 + www/aktiviteter/index.php | 1 + www/anime/index.php | 1 + www/brettspill/index.php | 1 + www/css/landing.css | 15 ++- www/css/nav.css | 165 +++++++++++++++++++++++++++++++ www/css/style.css | 166 -------------------------------- www/index.php | 1 + www/kalender/index.php | 1 + www/kontakt/index.php | 1 + www/kurs/index.php | 1 + www/nerdepitsa/index.php | 1 + www/om/index.html | 1 + www/paamelding/index.php | 1 + www/prosjekt/index.php | 1 + 18 files changed, 186 insertions(+), 175 deletions(-) create mode 100644 www/css/nav.css diff --git a/www/admin/aktiviteter/index.php b/www/admin/aktiviteter/index.php index 141ad86..ee90c1e 100644 --- a/www/admin/aktiviteter/index.php +++ b/www/admin/aktiviteter/index.php @@ -50,6 +50,7 @@ $events = array_values(array_filter( + diff --git a/www/admin/brukere/index.php b/www/admin/brukere/index.php index 741a48e..14c1e26 100644 --- a/www/admin/brukere/index.php +++ b/www/admin/brukere/index.php @@ -30,6 +30,7 @@ $users = $userManager->getAllUserData(); + diff --git a/www/admin/index.php b/www/admin/index.php index c210b47..98e7a95 100644 --- a/www/admin/index.php +++ b/www/admin/index.php @@ -26,6 +26,7 @@ if(!($isAdmin | $projectGroup | $activityGroup)){ + diff --git a/www/admin/prosjekter/index.php b/www/admin/prosjekter/index.php index 5118db2..fd64b39 100644 --- a/www/admin/prosjekter/index.php +++ b/www/admin/prosjekter/index.php @@ -50,6 +50,7 @@ $projects = array_values(array_filter( + diff --git a/www/aktiviteter/index.php b/www/aktiviteter/index.php index 14d7e4e..f41069b 100644 --- a/www/aktiviteter/index.php +++ b/www/aktiviteter/index.php @@ -32,6 +32,7 @@ $day = (isset($_GET['day'])) +
Aktivitets­verk­stedet
diff --git a/www/anime/index.php b/www/anime/index.php index 83ec42f..169d4c7 100755 --- a/www/anime/index.php +++ b/www/anime/index.php @@ -12,6 +12,7 @@ use \pvv\side\Agenda; +
Sosial­verk­stedet
diff --git a/www/brettspill/index.php b/www/brettspill/index.php index 6827060..4d99dc5 100755 --- a/www/brettspill/index.php +++ b/www/brettspill/index.php @@ -12,6 +12,7 @@ use \pvv\side\Agenda; +
Sosial­verk­stedet
diff --git a/www/css/landing.css b/www/css/landing.css index 9a1d313..11bc3af 100644 --- a/www/css/landing.css +++ b/www/css/landing.css @@ -1,9 +1,4 @@ header { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - margin-top: 50px; padding: 3vh 15vw; width: 70vw; @@ -12,8 +7,10 @@ header { } header .logo { + display: block; width: 24vh; height: 24vh; + margin: auto; } main { @@ -23,8 +20,8 @@ main { .info { text-align: center; width: 100%; - padding: 0 0; - margin-top: 0; + padding: 0; + margin: 0; overflow-y: hidden; } @@ -32,11 +29,11 @@ main { .essentials { width: 100%; margin: 1.8em 0; - padding: .2em 0; + padding: 0; list-style: none; display: flex; - justify-content: center; align-items: center; + justify-content: center; } .essentials li { diff --git a/www/css/nav.css b/www/css/nav.css new file mode 100644 index 0000000..9522412 --- /dev/null +++ b/www/css/nav.css @@ -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; + } +} \ No newline at end of file diff --git a/www/css/style.css b/www/css/style.css index 9737d8a..27a9ba6 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -7,95 +7,6 @@ body { 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 { padding: 1em 15vw; height: 100vh; @@ -122,81 +33,4 @@ main h2 { background-color: #00407F; 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; - } } \ No newline at end of file diff --git a/www/index.php b/www/index.php index 0dadbe3..3ccba50 100644 --- a/www/index.php +++ b/www/index.php @@ -23,6 +23,7 @@ $agenda = new \pvv\side\Agenda([ + diff --git a/www/kalender/index.php b/www/kalender/index.php index 14c315e..b13e7ec 100644 --- a/www/kalender/index.php +++ b/www/kalender/index.php @@ -35,6 +35,7 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year)); + diff --git a/www/kontakt/index.php b/www/kontakt/index.php index c761a84..ed94d8b 100755 --- a/www/kontakt/index.php +++ b/www/kontakt/index.php @@ -12,6 +12,7 @@ require __DIR__ . '/../../sql_config.php'; +
Kommunikasjons­verk­stedet
diff --git a/www/kurs/index.php b/www/kurs/index.php index bf5df35..9fdf1e3 100644 --- a/www/kurs/index.php +++ b/www/kurs/index.php @@ -15,6 +15,7 @@ $agenda = new \pvv\side\Agenda([ +
Kurs­verk­stedet
diff --git a/www/nerdepitsa/index.php b/www/nerdepitsa/index.php index 56d510f..d7f08c1 100755 --- a/www/nerdepitsa/index.php +++ b/www/nerdepitsa/index.php @@ -12,6 +12,7 @@ use \pvv\side\Agenda; +
Sosial­verk­stedet
diff --git a/www/om/index.html b/www/om/index.html index 9f101e1..95de363 100644 --- a/www/om/index.html +++ b/www/om/index.html @@ -8,6 +8,7 @@ p {hyphens: auto;} +
Programvareverkstedet
diff --git a/www/paamelding/index.php b/www/paamelding/index.php index c918e13..85de18a 100644 --- a/www/paamelding/index.php +++ b/www/paamelding/index.php @@ -42,6 +42,7 @@ if (isset($_SESSION['userdata'])) { // if logged in with feide +
Registrerings­verks­stedet
diff --git a/www/prosjekt/index.php b/www/prosjekt/index.php index 1f66499..7c1d6f3 100644 --- a/www/prosjekt/index.php +++ b/www/prosjekt/index.php @@ -18,6 +18,7 @@ $projects = $projectManager->getAll(); +
Prosjekt­verk­stedet