From a0d85a00bd2b57b77ec571b1d5584f712346ca65 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 3 Mar 2016 16:16:30 +0100 Subject: [PATCH] fix all the layout things, closes #36, #37 --- assets/_src/less/ascribe.less | 71 ++++++++++----------- assets/_src/less/ascribe/_grid.less | 8 +-- assets/_src/less/ascribe/_subtemplates.less | 4 -- controller/classes/Subtemplate.php | 64 ++++++++----------- 4 files changed, 62 insertions(+), 85 deletions(-) diff --git a/assets/_src/less/ascribe.less b/assets/_src/less/ascribe.less index b52804f..2aa81b7 100644 --- a/assets/_src/less/ascribe.less +++ b/assets/_src/less/ascribe.less @@ -39,12 +39,14 @@ // MAIN .above-chevron { - margin-top: -160px; - margin-bottom: -160px; - position: relative; - z-index: 3; + > .subtemplate { + background: #fff; + margin-top: -80px; + margin-bottom: -80px; + } } + // SUBTEMPLATES .four-oh-four { font-size: 34px; @@ -355,7 +357,8 @@ .galleriesPressTitle; } img { - display:block; + display: block; + margin: auto; } @media (min-width: @tabletWidth) { @@ -369,18 +372,25 @@ } .faq { - .copyTextMedium; + + > h1 { margin-top: 0; } + dl,dt,dd { - margin:0; - padding:0; + margin: 0; + padding: 0; } + + dd:not(:last-child) { + margin-bottom: @spacer; + } + + dt { + &:extend(.bold); + } + .featured-faqs { - margin-bottom:75px; dt { - &:extend(.fontRegular); - font-size: 25px; - line-height: 32px; color: @pink; cursor: pointer; } @@ -388,7 +398,7 @@ max-height:0; overflow-y:hidden; transition: .2s ease-out; - margin-bottom: 5px; + margin-bottom: @spacer; &.open { max-height: 800px; @@ -396,12 +406,7 @@ } } .regular-faqs { - dt { - &:extend(.fontRegular); - } - dd { - margin-bottom: 60px; - } + } } @@ -523,14 +528,16 @@ } } } + + +// +// Subtemplate: Media Downloads Buttons +// .downloads { - .left { - float: left; - } - .right { - float: right; - } + text-align: center; } + + .upcoming-events, .past-events { .event-container { @@ -856,17 +863,3 @@ h1 > a, .subtemplate.press-articles > div > div > img { margin-bottom: 70px; } - -.subtemplate.downloads a[href=''] { - display: none; -} - -.subtemplate.downloads a[href=''] + a:not([href='']) { - float: none; - display: inline-block; - margin: 0 auto; -} - -.subtemplate.downloads .centered-content { - text-align: center; -} diff --git a/assets/_src/less/ascribe/_grid.less b/assets/_src/less/ascribe/_grid.less index bc36276..05a5e20 100644 --- a/assets/_src/less/ascribe/_grid.less +++ b/assets/_src/less/ascribe/_grid.less @@ -98,7 +98,7 @@ // Gutters // .grid--gutters { - margin: -(@gutter-space/2) 0 @gutter-space (-(@gutter-space/2)); + margin: -(@gutter-space) 0 @gutter-space (-@gutter-space); > .grid__col { padding: @gutter-space 0 0 @gutter-space;; @@ -107,7 +107,7 @@ @media (@screen-sm) { .grid-small--gutters { - margin: -(@gutter-space/2) 0 @gutter-space (-(@gutter-space/2)); + margin: -(@gutter-space) 0 @gutter-space (-@gutter-space); > .grid__col { padding: @gutter-space 0 0 @gutter-space; @@ -117,7 +117,7 @@ @media (@screen-md) { .grid-medium--gutters { - margin: -(@gutter-space/2) 0 @gutter-space (-(@gutter-space/2)); + margin: -(@gutter-space) 0 @gutter-space (-@gutter-space); > .grid__col { padding: @gutter-space 0 0 @gutter-space; @@ -127,7 +127,7 @@ @media (@screen-lg) { .grid-large--gutters { - margin: -(@gutter-space/2) 0 @gutter-space (-(@gutter-space/2)); + margin: -(@gutter-space) 0 @gutter-space (-@gutter-space); > .grid__col { padding: @gutter-space 0 0 @gutter-space; diff --git a/assets/_src/less/ascribe/_subtemplates.less b/assets/_src/less/ascribe/_subtemplates.less index c4fc4cb..1304cb2 100644 --- a/assets/_src/less/ascribe/_subtemplates.less +++ b/assets/_src/less/ascribe/_subtemplates.less @@ -28,10 +28,6 @@ .subtemplate__title { margin-top: 0; margin-bottom: @spacer; - - .above-chevron > .subtemplate:first-child & { - margin-top: (@spacer * 2); - } } .subtemplate__description { diff --git a/controller/classes/Subtemplate.php b/controller/classes/Subtemplate.php index d734386..6750db7 100644 --- a/controller/classes/Subtemplate.php +++ b/controller/classes/Subtemplate.php @@ -598,12 +598,10 @@ class Subtemplate { } } - $result = "
-
-

{$subtemplateTitle}

-
{$content}
-
{$teamMemberMarkup}
-
+ $result = "
+

{$subtemplateTitle}

+
{$content}
+
{$teamMemberMarkup}
"; return $result; @@ -614,11 +612,9 @@ class Subtemplate { $bgColor = get_sub_field('background_color'); - $result = "
-
-

{$subtemplateTitle}

-
{$content}
-
+ $result = "
+

{$subtemplateTitle}

+
{$content}
"; return $result; @@ -627,11 +623,9 @@ class Subtemplate { $content = get_sub_field('content'); - $result = "
-
-

{$subtemplateTitle}

-
{$content}
-
+ $result = "
+

{$subtemplateTitle}

+
{$content}
"; return $result; @@ -679,12 +673,10 @@ class Subtemplate { } $regularFAQ .= ""; - $result = "
-
+ $result = "

{$subtemplateTitle}

{$featuredFAQ} {$regularFAQ} -
"; return $result; @@ -705,10 +697,10 @@ class Subtemplate { } } - $result = "
+ $result = "

{$subtemplateTitle}

{$values}
-
"; +
"; return $result; } @@ -733,11 +725,9 @@ class Subtemplate { $careerMarkup .= get_sub_field('empty_text'); } - $result = "
-
-

{$subtemplateTitle}

-
    {$careerMarkup}
-
+ $result = "
+

{$subtemplateTitle}

+
    {$careerMarkup}
"; return $result; @@ -772,7 +762,7 @@ class Subtemplate { } } - $result = "
+ $result = "

{$subtemplateTitle}

Media Companies
{$pressMarkup}
@@ -785,7 +775,7 @@ class Subtemplate { $buttonUrl = get_sub_field('button_url'); $buttonText = get_sub_field('button_text'); - $result = "
+ $result = "
{$buttonText}
"; @@ -810,14 +800,12 @@ class Subtemplate { } } - $result = "
-
-

{$subtemplateTitle}

+ $result = "
+

{$subtemplateTitle}

-
-
{$content}
- -
+
+
{$content}
+
"; @@ -912,7 +900,7 @@ class Subtemplate { $sidebar = $this->eventSidebar(); - $result = "
+ $result = "

Events

@@ -1074,7 +1062,7 @@ class Subtemplate { $sidebar = $this->eventSidebar(); - $result = "
+ $result = "

Upcoming Events

@@ -1084,7 +1072,7 @@ class Subtemplate {
-
+

Past Events