Compare commits

..

3 Commits

Author SHA1 Message Date
Ray Elliott dd60f943dd update wrapper width to leave gaps 2020-04-21 14:15:13 +00:00
Ray Elliott 5a8272b47d add gap around section block edges 2020-04-21 14:01:41 +00:00
Ray Elliott 382073f98d update section layouts 2020-04-21 13:25:17 +00:00
10 changed files with 176 additions and 62 deletions

View File

@ -5,12 +5,22 @@
<h2 class="section-header">About</h2> <h2 class="section-header">About</h2>
<div class="l-section-pad l-wrapper about-section"> <div class="l-section-block about-section">
An about Section. <div class="l-wrapper">
<p>An about Section.</p>
</div>
</div> </div>
<div class="l-section-pad l-wrapper about-section"> <div class="l-section-block is-wide about-section">
Another about Section. <div class="l-wrapper is-wide">
<p>A wide about Section and a wide wrapper.</p>
</div>
</div>
<div class="l-section-block is-full-width about-section">
<div class="l-wrapper is-full-width">
<p>A full width about section and a full width wrapper.</p>
</div>
</div> </div>
</div> </div>

View File

@ -4,7 +4,8 @@
<h2 class="section-header">Contact Us</h2> <h2 class="section-header">Contact Us</h2>
<div class="l-section-pad l-wrapper contact-section"> <div class="l-section-block no-margin">
<div class="l-wrapper contact-section">
<p class="h5">Complete this form and we will get back to you within one working day.</p> <p class="h5">Complete this form and we will get back to you within one working day.</p>
<form action="https://mailthis.to/remailthis" method="POST" encType="multipart/form-data"> <form action="https://mailthis.to/remailthis" method="POST" encType="multipart/form-data">
<ul class="u-no-list"> <ul class="u-no-list">
@ -26,8 +27,13 @@
</li> </li>
</ul> </ul>
</form> </form>
</div>
</div>
<div class="l-section-block no-margin">
<div class="l-wrapper contact-section">
<h3 class="h4">Remember to Generate Access Token for URL</h3> <h3 class="h4">Remember to Generate Access Token for URL</h3>
<div id="mapbox"></div> <div id="mapbox"></div>
</div> </div>
</div>
</article> </article>

View File

@ -1,6 +1,6 @@
<footer class="footer transition-fade"> <footer class="footer transition-fade">
<div class="l-underlay footer-bg"></div> <div class="l-underlay footer-bg"></div>
<div class="l-wrapper l-section-pad reduce-padding"> <div class="l-wrapper reduce-padding">
<ul class="l-flex-list-row footer__body"> <ul class="l-flex-list-row footer__body">
<li class="footer__body-section footer__body-section--m-left-align footer-section"> <li class="footer__body-section footer__body-section--m-left-align footer-section">
<h3 class="footer__heading">Let's keep in touch!</h3> <h3 class="footer__heading">Let's keep in touch!</h3>

View File

@ -1,15 +1,20 @@
<article id="services" class="l-section l-relative l-screen-min-full"> <article id="services" class="l-section l-relative">
<div class="l-underlay services-bg"></div> <div class="l-underlay services-bg"></div>
<h2 class="section-header">Services</h2> <h2 class="section-header">Services</h2>
<div class="l-section-pad l-wrapper services-section"> <div class="l-section-block is-wide services-section">
A Services Section. <div class="l-wrapper">
<p>A wide Services Section and a wide wrapper.</p>
</div>
</div> </div>
<div class="l-section-pad l-wrapper services-section"> <div class="l-section-block is-full-width services-section">
Another services Section. <div class="l-wrapper">
<p>A full width Services section and a normal wrapper.</p>
</div> </div>
</div>
</article> </article>

View File

@ -4,6 +4,7 @@ body {
background-color: var(--color-bg); background-color: var(--color-bg);
font-size: $font-size-body--xxs; font-size: $font-size-body--xxs;
line-height: $line-height-body;
@media (min-width: $bp-xs) { @media (min-width: $bp-xs) {
font-size: $font-size-body; font-size: $font-size-body;

View File

@ -3,6 +3,6 @@
} }
.contact-section { .contact-section {
background-color: rgba(aqua, 0.5); // background-color: rgba(aqua, 0.5);
} }

View File

@ -39,7 +39,11 @@
.nav-link { .nav-link {
display: block; display: block;
padding: 0.6em 1.5em; padding: 0.5 * $unit-size $unit-size;
@media (min-width: $bp-m) {
padding: 0.5 * $unit-size 2 * $unit-size;
}
&:last-child { &:last-child {
padding-right: 0; padding-right: 0;
@ -76,8 +80,8 @@
.menu-icon { .menu-icon {
display: block; display: block;
height: 1.2em; height: 1.6rem;
width: 1.2em; width: 1.6rem;
border-radius: 3px; border-radius: 3px;
background-color: currentColor; background-color: currentColor;

View File

@ -1,5 +1,5 @@
.l-wrapper { .l-wrapper {
width: 100%; width: $wrapper-width;
max-width: $wrapper-max-width; max-width: $wrapper-max-width;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -13,6 +13,7 @@
} }
@media (min-width: $bp-m) { @media (min-width: $bp-m) {
width: $wrapper-width-m;
padding-left: $padding-horizontal-m; padding-left: $padding-horizontal-m;
padding-right: $padding-horizontal-m; padding-right: $padding-horizontal-m;
} }
@ -22,27 +23,35 @@
padding-right: $padding-horizontal-l; padding-right: $padding-horizontal-l;
} }
&--wide { &.is-wide {
max-width: $wrapper-max-width--wide; max-width: $wrapper-max-width--wide;
} }
&.is-full-width {
max-width: initial;
} }
// TODO - need to move .l-section-pad rules into .l-section - so there is @media (min-width: $wrapper-max-width) and (max-width: $wrapper-max-width--wide) {
// only the .l-section rules. Then that needs to be applied ONLY to the actual padding-left: $padding-horizontal-s;
// top level of a page section. padding-right: $padding-horizontal-s;
// then sub sections can have a margin-bottom on them to sort out the margins }
// for them
// sub sections with individual backgrounds will have a padding applied to them @media (min-width: $wrapper-max-width--wide) {
// that padding will be top, bottom and left, right width: 100%;
padding-left: $padding-horizontal-s;
padding-right: $padding-horizontal-s;
}
}
.l-section { .l-section {
padding-top: 3.75rem;
}
.l-section-pad {
padding-top: $padding-vertical-xs; padding-top: $padding-vertical-xs;
padding-bottom: $padding-vertical-xs; padding-bottom: $padding-vertical-xs;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
@media (min-width: $bp-s) { @media (min-width: $bp-s) {
padding-top: $padding-vertical-s; padding-top: $padding-vertical-s;
padding-bottom: $padding-vertical-s; padding-bottom: $padding-vertical-s;
@ -59,6 +68,60 @@
} }
} }
.l-section-inline {
margin-bottom: $unit-size;
@media (min-width: $bp-m) {
margin-bottom: 2 * $unit-size;
}
&:last-child {
margin-bottom: 0;
}
}
.l-section-block {
margin-bottom: $unit-size;
padding-top: 0.5 * $unit-size;
padding-bottom: 0.5 * $unit-size;
width: 100%;
max-width: $wrapper-width;
@media (min-width: $bp-s) {
padding-top: $unit-size;
padding-bottom: $unit-size;
}
@media (min-width: $bp-m) {
margin-bottom: 2 * $unit-size;
padding-top: 2 * $unit-size;
padding-bottom: 2 * $unit-size;
}
@media (min-width: $bp-l) {
width: $wrapper-max-width;
}
&:last-child {
margin-bottom: 0;
}
&.is-wide {
width: $wrapper-max-width--wide;
}
&.is-full-width {
width: 100%;
max-width: initial;
}
&.no-margin,
> p:last-child,
> .l-wrapper > p:last-child {
margin-bottom: 0;
}
}
// #position // #position
.l-absolute { .l-absolute {

View File

@ -8,12 +8,22 @@ $bp-menu-collpase: $bp-s;
$z-index__header: 100; $z-index__header: 100;
$wrapper-max-width: 80rem;
$wrapper-max-width--wide: 110rem;
$font-size-body: 1em; $font-size-body: 1em;
$font-size-body--xxs: 0.9em; $font-size-body--xxs: 0.9em;
$line-height-body: 1.6;
$unit-size: 1.6rem;
$wrapper-width: calc(100vw - #{$unit-size / 2});
$wrapper-width-m: calc(100vw - #{$unit-size});
$wrapper-max-width: $bp-l;
$wrapper-max-width--wide: 110rem;
$font-size-h1--xs: 2.875rem;
$font-size-h1--s: 2.875rem;
$font-size-h1--m: 2.875rem;
$font-size-h1--l: 2.875rem;
// lerft, right padding of sections // lerft, right padding of sections
$padding-horizontal-xs: 8px; $padding-horizontal-xs: 8px;
$padding-horizontal-s: 32px; $padding-horizontal-s: 32px;
@ -21,10 +31,10 @@ $padding-horizontal-m: 64px;
$padding-horizontal-l: 96px; $padding-horizontal-l: 96px;
// top, bottom padding of sections // top, bottom padding of sections
$padding-vertical-xs: 24px; $padding-vertical-xs: 1 * $unit-size;
$padding-vertical-s: 32px; $padding-vertical-s: 1 * $unit-size;
$padding-vertical-m: 64px; $padding-vertical-m: 2 * $unit-size;
$padding-vertical-l: 96px; $padding-vertical-l: 2 * $unit-size;
$color-primary-100: #eff8ff; $color-primary-100: #eff8ff;
$color-primary-200: #aad4f5; $color-primary-200: #aad4f5;

View File

@ -31,16 +31,31 @@ html.is-animating .transition-fade {
} }
.section-header { .section-header {
font-size: 2.875rem; font-size: $font-size-h1--xs;
line-height: 1.2; line-height: 1.2;
text-align: center; text-align: center;
margin-bottom: 3.75rem; margin-bottom: $padding-vertical-xs;
@media (min-width: $bp-s) {
font-size: $font-size-h1--s;
margin-bottom: $padding-vertical-s;
}
@media (min-width: $bp-m) {
font-size: $font-size-h1--m;
margin-bottom: $padding-vertical-m;
}
@media (min-width: $bp-l) {
font-size: $font-size-h1--l;
margin-bottom: $padding-vertical-l;
}
} }
// mapbox // mapbox
.mapboxgl-map { .mapboxgl-map {
height: 30em; height: 18 * $unit-size;
} }
.social-icon { .social-icon {