1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-22 17:23:55 +01:00

product-overview fixes

This commit is contained in:
Matthias Kretschmann 2016-01-16 20:11:38 +01:00
parent a5b717dbd8
commit ab231e2717
4 changed files with 39 additions and 66 deletions

View File

@ -231,75 +231,41 @@
}
}
}
.product-overview {
padding: 175px 0;
border-top: 1px solid @greyHr;
h1 {
.sectionHeader;
}
p {
.copyTextSmall;
}
&:nth-of-type(odd) {
img {
float: left;
}
.text-column {
float: right;
}
}
&:nth-of-type(even) {
img {
float: right;
}
}
.text-column {
width: 45%;
}
img {
max-width: 55%;
}
&.small {
&:extend(.text-center, .subtemplate);
border-top: 0;
border-bottom: 25px solid @greyBg;
padding: 100px 0;
h1 {
font-size: 22px;
margin:0;
}
.text-column {
text-align: center;
h1 { font-size: @font-size-h3; }
.grid,
p { margin-bottom: 0; }
.row {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
@media (@screen-sm) {
flex-wrap: no-wrap;
}
}
@media screen and (max-width: @tabletWidth) {
padding: 100px 0;
&:first-of-type {
border-top: 0;
.grid { }
@media (@screen-sm) {
&:nth-of-type(odd) {
.grid {
flex-direction: row-reverse;
}
}
}
}
img {
max-width: 100%;
width: 55%;
}
.text-column {
text-align: center;
}
}
@media screen and (max-width: @phoneWidth) {
img {
display: none;
}
.text-column {
width: 100%;
}
}
}
.blue-box {
&:extend(.text-center);

View File

@ -3,13 +3,15 @@
padding-top: @spacer;
padding-bottom: @spacer;
@media (min-width: @tabletWidth) {
@media (@screen-sm) {
padding-top: (@spacer * 2);
padding-bottom: (@spacer * 2);
}
> .row { background-color: @white; }
&.grey > .row { background-color: transparent; }
&.case-studies {
padding: 0;
}

View File

@ -38,7 +38,7 @@
@line-height-base: 24px;
@line-height-small: 22px;
@line-height-large: 26px;
@line-height-large: 28px;
@text-color: @greyText;

View File

@ -272,13 +272,18 @@ class Subtemplate {
$content = get_sub_field('content');
$result = "<section class='subtemplate product-overview {$headingSize}'>
<div class='row row--content'>
$result = "<section class='subtemplate product-overview'>
<div class='row'>
<article class='grid grid--gutters grid--full grid-small--half'>
<figure class='grid__col grid__col--center'>
<img src='{$imageUrl}' alt='{$imageAlt}'>
<div class='text-column'>
</figure>
<div class='grid__col grid__col--center text-column'>
<h1 class='{$headingSize}'>{$subtemplateTitle}</h1>
<div>{$content}</div>
</div>
</article>
</div>
</section>";
return $result;