update section layouts

This commit is contained in:
Ray Elliott 2020-04-21 13:25:17 +00:00
parent 5a12828f17
commit 382073f98d
10 changed files with 168 additions and 59 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,30 +4,36 @@
<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">
<p class="h5">Complete this form and we will get back to you within one working day.</p> <div class="l-wrapper contact-section">
<form action="https://mailthis.to/remailthis" method="POST" encType="multipart/form-data"> <p class="h5">Complete this form and we will get back to you within one working day.</p>
<ul class="u-no-list"> <form action="https://mailthis.to/remailthis" method="POST" encType="multipart/form-data">
<li> <ul class="u-no-list">
<label for="name">Name</label> <li>
<input id="name" type="text" name="name"> <label for="name">Name</label>
</li> <input id="name" type="text" name="name">
<li> </li>
<label for="email">E-mail:</label> <li>
<input id="email" type="email" name="_replyto"> <label for="email">E-mail:</label>
</li> <input id="email" type="email" name="_replyto">
<li> </li>
<label for="msg">Message:</label> <li>
<textarea id="msg" name="message"></textarea> <label for="msg">Message:</label>
</li> <textarea id="msg" name="message"></textarea>
<li><input type="hidden" name="_subject" value="Contact Form Submission"></li> </li>
<li><input type="hidden" name="_honeypot" value=""></li> <li><input type="hidden" name="_subject" value="Contact Form Submission"></li>
<li><input type="hidden" name="_confirmation" value="Thank you, your message has been sent."></li> <li> <button id="js-form-send" type="submit">Send</button> <li><input type="hidden" name="_honeypot" value=""></li>
</li> <li><input type="hidden" name="_confirmation" value="Thank you, your message has been sent."></li> <li> <button id="js-form-send" type="submit">Send</button>
</ul> </li>
</form> </ul>
</form>
</div>
</div>
<h3 class="h4">Remember to Generate Access Token for URL</h3> <div class="l-section-block no-margin">
<div id="mapbox"></div> <div class="l-wrapper contact-section">
<h3 class="h4">Remember to Generate Access Token for URL</h3>
<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

@ -22,27 +22,34 @@
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;
}
@media (min-width: $wrapper-max-width) and (max-width: $wrapper-max-width--wide) {
padding-left: $padding-horizontal-s;
padding-right: $padding-horizontal-s;
}
@media (min-width: $wrapper-max-width--wide) {
padding-left: $padding-horizontal-s;
padding-right: $padding-horizontal-s;
}
} }
// TODO - need to move .l-section-pad rules into .l-section - so there is
// only the .l-section rules. Then that needs to be applied ONLY to the actual
// top level of a page section.
// 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
// that padding will be top, bottom and left, right
.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 +66,59 @@
} }
} }
.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: 100%;
@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%;
}
&.no-margin,
> p:last-child,
> .l-wrapper > p:last-child {
margin-bottom: 0;
}
}
// #position // #position
.l-absolute { .l-absolute {

View File

@ -8,12 +8,20 @@ $bp-menu-collpase: $bp-s;
$z-index__header: 100; $z-index__header: 100;
$wrapper-max-width: 80rem; $wrapper-max-width: $bp-l;
$wrapper-max-width--wide: 110rem; $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;
$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 +29,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 {