]> _ Git - ccv-wordpress.git/commitdiff
Done #3601 @1.25
authorStephen Cameron <stephen@cubedesigners.com>
Mon, 20 Apr 2020 16:57:31 +0000 (18:57 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Mon, 20 Apr 2020 16:57:31 +0000 (18:57 +0200)
wp-content/themes/CCV/app/setup.php
wp-content/themes/CCV/resources/assets/styles/common/spacing.styl
wp-content/themes/CCV/resources/assets/styles/components/footer.styl
wp-content/themes/CCV/resources/views/partials/footer.blade.php
wp-content/themes/CCV/webpack.mix.js

index 84108c1a01ec0f074d1c896e36682608e2ec2701..fbbc5d89101a0cae67a3b16dc5c416e207a54f56 100755 (executable)
@@ -150,6 +150,10 @@ add_action('widgets_init', function () {
             'name'          => __('Footer Column 2', 'ccv'),
             'id'            => 'sidebar-footer-2'
         ] + $config);
+    register_sidebar([
+            'name'          => __('Footer Column 3', 'ccv'),
+            'id'            => 'sidebar-footer-3'
+        ] + $config);
     register_sidebar([
             'name'          => __('Footer Copyright', 'ccv'),
             'id'            => 'sidebar-footer-copyright'
index cbe004fbe93927d0c60b6b628a6465fec76a599c..b6aa4ab34c06698d22270430e4dd600303ade893 100644 (file)
@@ -1,12 +1,13 @@
 // Apply spacing between elements but not before first one
 // Ref: https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/
-.spaced > * + *
-  margin-top: 1.5em
-.spaced-lg > * + *
-  margin-top: 2em
+@responsive
+  .spaced > * + *
+    margin-top: 1.5em
+  .spaced-lg > * + *
+    margin-top: 2em
 
-.spaced-horizontal > * + *
-  margin-left: 0.75em
+  .spaced-horizontal > * + *
+    margin-left: 0.75em
 
 // Generate utility classes for padding/margin based on vw units
 // This will generate classes like pt-1v, pt-2v, pr-1v etc.
index f4fe00710aa079691db553b2df4dbfcfdb0e7dc8..1a0f8109b9b9c433d7cec1344222615b23920733 100644 (file)
@@ -1,4 +1,36 @@
+$breakpoint-footer = 1024px
+
 .site-footer
+
+  &-cols
+    @apply flex
+    constrain(padding-bottom, 5vw)
+
+    +below($breakpoint-footer)
+      @apply flex-col
+
+      // Spacing between column blocks
+      > * + *
+        margin-top: 2em
+
+  &-col
+    @apply w-1/3
+    constrain(padding-left, 10vw)
+    constrain(padding-right, 5vw)
+
+    +below($breakpoint-footer)
+      @apply w-full
+
+    +below(500px)
+      padding-left: 35px // Matches capped 5vw on other sections
+
+    > * + *
+      margin-top: 1.5em
+
+
   a:not(.btn)
     &:hover
       @apply text-pink
+
+  img
+    display: inline-block
index f95bd0c057cbfd41b13d0901356ca4b938fa1642..c2c5d48dff1c4f54d14224bc5fa87840f741d5db 100644 (file)
@@ -1,11 +1,14 @@
 <footer class="site-footer bg-purple-dark text-white antialiased pt-2v pb-1v">
   <div class="container">
-    <div class="flex pb-2v sm:flex-col-reverse">
-      <div class="w-1/2 pl-4v sm:pl-2v sm:w-full sm:pt-8">
+    <div class="site-footer-cols">
+      <div class="site-footer-col">
         @php(dynamic_sidebar('sidebar-footer-1'))
       </div>
-      <div class="w-1/2 pl-4v sm:pl-2v pr-2v sm:w-full">
-      @php(dynamic_sidebar('sidebar-footer-2'))
+      <div class="site-footer-col">
+        @php(dynamic_sidebar('sidebar-footer-2'))
+      </div>
+      <div class="site-footer-col">
+        @php(dynamic_sidebar('sidebar-footer-3'))
       </div>
     </div>
 
index b1e562e988774bddd9108a065c79acebfec03c2b..5d6d3e2c11bf12f7e7d530c0cd80f7933303cc07 100644 (file)
@@ -107,8 +107,10 @@ mix.purgeCss({
     'italic',
     'mt-2',
     'mb-6',
+    'mr-3',
     'mr-6',
     'float-left',
+    'inline-block',
     'xs:block',
     'xs:float-none',
     'xs:mx-auto',