]> _ Git - ccv-wordpress.git/commitdiff
WIP #3053
authorStephen Cameron <stephen@cubedesigners.com>
Thu, 14 Nov 2019 17:19:38 +0000 (18:19 +0100)
committerStephen Cameron <stephen@cubedesigners.com>
Thu, 14 Nov 2019 17:19:38 +0000 (18:19 +0100)
wp-content/mu-plugins/cube/src/Elementor/Setup.php
wp-content/themes/CCV/resources/assets/styles/components/news.styl
wp-content/themes/CCV/resources/assets/styles/widgets/image-box.styl
wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl
wp-content/themes/CCV/tailwind.config.js

index b58a460914c9a4e1a7ce12183d19b01fae95f409..9a71741def59f7e7579b13d611b7384c3cd3afab 100644 (file)
@@ -21,7 +21,7 @@ class Setup {
     public function register_customisations() {
 
         $this->_customise_sections();
-        $this->_customise_image_widget();
+        $this->_customise_image_box_widget();
 
     }
 
@@ -160,26 +160,25 @@ class Setup {
 
     }
 
-    protected function _customise_image_widget() {
+    protected function _customise_image_box_widget() {
 
-        // Add controls to image widget in editor
-        add_action( 'elementor/element/image/section_image/before_section_end', function( $element, $args ) {
+        // Add controls to image box widget in editor
+        add_action( 'elementor/element/image-box/section_image/before_section_end', function( $element, $args ) {
 
             /** @var \Elementor\Element_Base $element */
             $element->add_control(
-                'link_icon',
+                'content_alignment',
                 [
-                    'label' => __( 'Link Icon', 'cube' ),
+                    'label' => __( 'Vertical Alignment', 'cube' ),
                     'type' => Controls_Manager::SELECT,
                     'options' => [
-                        '' => __( 'None', 'cube' ),
-                        'tour-360' => __( '360 Tour', 'cube' ),
-                        'enlarge' => __( 'Enlarge', 'cube' ),
+                        'flex-start' => __( 'Top', 'cube' ),
+                        'center' => __( 'Center', 'cube' ),
+                        'flex-end' => __( 'Bottom', 'cube' ),
                     ],
-                    'default' => '',
-                    'prefix_class' => 'icon-',
-                    'condition' => [
-                        'link_to!' => 'none',
+                    'default' => 'center',
+                    'selectors' => [
+                        '{{WRAPPER}} .elementor-image-box-wrapper' => 'align-items: {{VALUE}};',
                     ],
                 ]
             );
index d190c764e59b88c353bfbab8002d8627a1bbb1c1..f1b9654d87943f9356ca4c1d9649cd214ec1a77e 100644 (file)
@@ -1,8 +1,9 @@
 .post
 
   &-featured-image
-    @apply bg-gray-300 bg-cover bg-center
+    @apply bg-cover bg-center
     @apply w-full
+    background-color: #ddd
     constrain(margin-right, 5vw)
     constrain(margin-bottom, 5vw)
     max-width: 336px
index 436f8502f61691f10c59973bd82fc18e289e5fc4..6b193931af7842e9b2d5ce54e6b6428a7481c20f 100644 (file)
@@ -4,9 +4,12 @@
   &-wrapper
     @apply text-left
 
-  &-img img
     +below(768px)
-      @apply mx-auto
+      @apply text-center
+
+  &-img
+    display: flex
+    justify-content: center
 
   &-title
     @apply font-body text-lg mb-6
index de313fb09de28702034d60f87d7337d7f743114b..eb95eac5d85078fbc31a3b73504065f091ecd09c 100644 (file)
@@ -49,6 +49,9 @@
   > * + * // Automatic spacing between direct child elements
     margin-top: 1.5em
 
+  h3 + p, h4 + p
+    margin-top: 0.5em
+
   h3
     @apply font-body font-medium text-lg
 
index 360f92fd952969b84b74eb394a1302499d241403..db1a845b84b57bb7afed2ca2140bda185d71de4b 100644 (file)
@@ -3,6 +3,7 @@ const { wordpressUtilities } = require('tailwindcss-wordpress');
 
 module.exports = {
   theme: {
+
     screens: {
       // We're using the desktop-first approach to media queries so everything is max-width based
       // The most important breakpoint is when the columns stack. This is defined in setup.styl
@@ -14,30 +15,35 @@ module.exports = {
       'sm': {'max': '767px'}, // => @media (max-width: 767px) { ... }
       'xs': {'max': '499px'}, // => @media (max-width: 499px) { ... }
     },
+
+    colors: {
+      'inherit': 'inherit',
+      'transparent': 'transparent',
+      'white': '#FFF',
+      'dark': '#1A0707', // Text colour
+      'light': '#F6F5F5', // Light grey backgrounds
+      'purple': '#5A5488',
+      'purple-dark': '#2E2C40', // Footer and other dark sections
+      'pink': '#FF078B', // Accent colour
+      'pink-light': '#FF7EC3', // Hover colour
+      'teal': '#2CC4CF', // Accent colour
+      'teal-light': '#71D3DF', // Hover colour
+    },
+    fontFamily: {
+      'display': ['Dosis', 'sans-serif'], // Headings, labels, menus etc
+      'body': ['Roboto Condensed', 'sans-serif'], // Main blocks of text
+    },
+    fontSize: {
+      'xs': '0.8181rem', // 18px
+      'sm': '0.9091rem', // 20px
+      'base': '1rem', // 22px
+      'lg': '1.3636rem', // 30px
+      'xl': '1.9091rem', // 42px
+      '2xl': '2.4545rem', // 54px
+      '3xl': '3.0909rem', // 68px
+    },
+
     extend: {
-      colors: {
-        'inherit': 'inherit',
-        'dark': '#1A0707', // Text colour
-        'light': '#F6F5F5', // Light grey backgrounds
-        'purple': '#5A5488',
-        'purple-dark': '#2E2C40', // Footer and other dark sections
-        'pink': '#FF078B', // Accent colour
-        'pink-light': '#FF7EC3', // Hover colour
-        'teal': '#2CC4CF', // Accent colour
-        'teal-light': '#71D3DF', // Hover colour
-      },
-      fontFamily: {
-        'display': ['Dosis', 'sans-serif'], // Headings, labels, menus etc
-        'body': ['Roboto Condensed', 'sans-serif'], // Main blocks of text
-      },
-      fontSize: {
-        'xs': '0.8181rem', // 18px
-        'sm': '0.9091rem', // 20px
-        'lg': '1.3636rem', // 30px
-        'xl': '1.9091rem', // 42px
-        '2xl': '2.4545rem', // 54px
-        '3xl': '3.0909rem', // 68px
-      },
       padding: {
         '0!': '0 !important', // Special overrides
         '100%': '100%', // Used for proportional padding to make a square
@@ -47,11 +53,16 @@ module.exports = {
       }
     },
   },
-  variants: {},
+  variants: {
+
+  },
   plugins: [
     wordpressUtilities,
   ],
   corePlugins: {
     container: false,
+    float: false,
+    objectFit: false,
+    objectPosition: false,
   },
 };