1
0
Fork 0

[SITE CSS] fix some spacing issue at mobile layout

- bigger margin on the bottom of the footer
- invert font color of mobile menu button at photos pages
- swap li and a tags in mobile menu. bigger width menu not changed, because big click target is needed
- bigger margin in top of the headings h1 to h4
This commit is contained in:
Jannik Beyerstedt 2016-04-24 23:02:37 +02:00
parent 77a1e27445
commit e6b11f4585
7 changed files with 18 additions and 6 deletions

View file

@ -8,6 +8,7 @@ body {
h1, h2, h3, h4 { h1, h2, h3, h4 {
margin-bottom: 18px; margin-bottom: 18px;
margin-top: 1em;
font-family: 'Crimson Text', serif; } font-family: 'Crimson Text', serif; }
h5 { h5 {
@ -198,12 +199,12 @@ html {
@media (max-width: 543px) { @media (max-width: 543px) {
body { body {
/* Margin bottom by footer height */ /* Margin bottom by footer height */
margin-bottom: 192px; } margin-bottom: 205px; }
footer { footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 162px; } } height: 175px; } }
/* /*
* HELPERS * HELPERS

Binary file not shown.

View file

@ -14,6 +14,10 @@ a {
nav ul.nav.main { nav ul.nav.main {
color: #fff; } } color: #fff; } }
@media (max-width: 543px) {
.navbar-toggler {
color: #fff; } }
footer { footer {
background-color: #303030; background-color: #303030;
color: #e6e6e6; } color: #e6e6e6; }

Binary file not shown.

View file

@ -14,6 +14,7 @@ body {
} }
h1, h2, h3, h4 { h1, h2, h3, h4 {
margin-bottom: 18px; margin-bottom: 18px;
margin-top: 1em;
font-family: 'Crimson Text', serif; font-family: 'Crimson Text', serif;
} }
h5 { h5 {
@ -247,7 +248,7 @@ footer {
/* make footer sticky */ /* make footer sticky */
$footer_height: 85px; $footer_height: 85px;
$footer_height_xs: 162px; $footer_height_xs: 175px;
$footer_margin: 30px; $footer_margin: 30px;
html { html {
position: relative; position: relative;

View file

@ -25,6 +25,11 @@ a {
} }
} }
} }
@include media-breakpoint-down(xs) {
.navbar-toggler {
color: $nav_fgColor;
}
}
footer { footer {
background-color: darken($color_bg_inv, 7%); background-color: darken($color_bg_inv, 7%);
color: darken($color_font_inv, 10%); color: darken($color_font_inv, 10%);

View file

@ -24,12 +24,13 @@ if ($page->depth() == 1) {
<div class="bg-inverse p-a-1"> <div class="bg-inverse p-a-1">
<nav> <nav>
<ul class="nav mobileNav"> <ul class="nav mobileNav">
<li><a href="<?php echo $site->url()?>">Home</a></li>
<?php foreach ($site->children()->visible() as $p) : ?> <?php foreach ($site->children()->visible() as $p) : ?>
<a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><li><?php echo $p->title() ?></li></a> <li><a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><?php echo $p->title() ?></a></li>
<?php if ($p->hasVisibleChildren() && $p->template() != 'blog') : ?> <?php if ($p->hasVisibleChildren() && $p->template() != 'blog') : ?>
<ul class=""> <ul class="">
<?php foreach ($p->children()->visible() as $c) : ?> <?php foreach ($p->children()->visible() as $c) : ?>
<a href="<?php echo $c->url()?>" <?php echo ($page == $c)?'class="active"':'' ?>><li><?php echo $c->title() ?></li></a> <li><a href="<?php echo $c->url()?>" <?php echo ($page == $c)?'class="active"':'' ?>><?php echo $c->title() ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php endif; ?> <?php endif; ?>
@ -49,7 +50,7 @@ if ($page->depth() == 1) {
<nav aria-hidden="true"> <nav aria-hidden="true">
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar"> <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar">
Menü <i class="fa fa-bars"></i> Menü
</button> </button>
<ul class="nav hidden-xs-down <?php echo ($subnav)?'main':'home' ?>"> <ul class="nav hidden-xs-down <?php echo ($subnav)?'main':'home' ?>">