From: Stephen Cameron Date: Fri, 10 May 2019 16:32:57 +0000 (+0200) Subject: WIP #2684 @8 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7737bddee2abc8cd7711778ea5c6f6e13c456c43;p=c6-wordpress.git WIP #2684 @8 --- diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/Heading.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/Heading.php index 1f67aa6..4d2249a 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/Heading.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/Heading.php @@ -119,11 +119,6 @@ class Heading extends Widget_Base $subtitle = $this->get_settings('subtitle'); $title = $this->get_settings('title'); - - // Inline Editing settings - $this->add_inline_editing_attributes('subtitle', 'none'); - $this->add_inline_editing_attributes('title', 'none'); - // CSS Classes for elements $this->add_render_attribute('subtitle', 'class', ['heading-subtitle']); $this->add_render_attribute('title', 'class', ['heading-title']); @@ -144,35 +139,4 @@ class Heading extends Widget_Base echo ''; } - /** - * Render text editor widget output in the editor. - * - * Written as a Backbone JavaScript template and used to generate the live preview. - * - * @since 1.0.0 - * @access protected - */ - protected function _content_template() { - ?> - <# - view.addRenderAttribute( 'subtitle', 'class', ['heading-subtitle']); - view.addRenderAttribute( 'title', 'class', ['heading-title']); - - view.addInlineEditingAttributes( 'subtitle', 'none' ); - view.addInlineEditingAttributes( 'title', 'none' ); - - #> -
- - <# if ('' !== settings.subtitle) { #> -

{{{ settings.subtitle }}}

- <# } #> - - <# if ('' !== settings.title) { #> -

{{{ settings.title }}}

- <# } #> -
- -
+
-
+ + +
-

+

diff --git a/wp-content/themes/c6/resources/assets/images/contact-email.svg b/wp-content/themes/c6/resources/assets/images/contact-email.svg new file mode 100644 index 0000000..fab4bc8 --- /dev/null +++ b/wp-content/themes/c6/resources/assets/images/contact-email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/themes/c6/resources/assets/images/contact-map.svg b/wp-content/themes/c6/resources/assets/images/contact-map.svg new file mode 100644 index 0000000..a176fb0 --- /dev/null +++ b/wp-content/themes/c6/resources/assets/images/contact-map.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/themes/c6/resources/assets/images/contact-phone.svg b/wp-content/themes/c6/resources/assets/images/contact-phone.svg new file mode 100644 index 0000000..e7466ff --- /dev/null +++ b/wp-content/themes/c6/resources/assets/images/contact-phone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/themes/c6/resources/assets/styles/common/global.styl b/wp-content/themes/c6/resources/assets/styles/common/global.styl index 55f3249..b06ad73 100644 --- a/wp-content/themes/c6/resources/assets/styles/common/global.styl +++ b/wp-content/themes/c6/resources/assets/styles/common/global.styl @@ -91,7 +91,7 @@ $max-bottom-padding = unit($section-vertical-padding / 100, '') * $content-max-w color: $colors.orange &:hover - opacity: 0.8 + color: #14bfc2 svg height: r(12px) diff --git a/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl b/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl index bba19c0..163fc4c 100644 --- a/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl +++ b/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl @@ -1,7 +1,7 @@ $sidebar-width = 260px #offcanvas-menu - background-color: #222 + background-color: #000 color: #fff display: block position: fixed @@ -39,6 +39,11 @@ $sidebar-width = 260px display: block margin-right: 0 + .sub-menu + // Tighten spacing now that we don't have dividing lines + // Otherwise the gap above the submenu looks a bit too big + margin-top: -0.25em + ul a // Second level links padding-left: 40px color: #bbb @@ -49,7 +54,6 @@ $sidebar-width = 260px font-smoothing() display: block padding: 10px 20px - border-bottom: 1px solid #333 text-transform: uppercase font-weight: 700 color: #fff diff --git a/wp-content/themes/c6/resources/assets/styles/pages/contact.styl b/wp-content/themes/c6/resources/assets/styles/pages/contact.styl index b95e08d..3263147 100644 --- a/wp-content/themes/c6/resources/assets/styles/pages/contact.styl +++ b/wp-content/themes/c6/resources/assets/styles/pages/contact.styl @@ -1,6 +1,6 @@ .contact-form - max-width: 1250px - margin: 0 auto + horizontal-spacing(2.5vw) // So it aligns with text blocks above + center(1346px) input, textarea margin-bottom: 2em @@ -17,3 +17,27 @@ display: flex; flex-direction: column; align-items: flex-end; + + +// Icons +.icon-contact + display: flex + align-items: center + color: currentColor !important + margin: 50px 0 + + &:before + content: '' + width: 62px + height: @width + background-size: contain + background-repeat: no-repeat + background-position: center + margin-right: 2.25em + + &-map:before + background-image: url(../images/contact-map.svg) + &-email:before + background-image: url(../images/contact-email.svg) + &-phone:before + background-image: url(../images/contact-phone.svg) diff --git a/wp-content/themes/c6/resources/assets/styles/widgets/heading.styl b/wp-content/themes/c6/resources/assets/styles/widgets/heading.styl index 16155f3..9b4203f 100644 --- a/wp-content/themes/c6/resources/assets/styles/widgets/heading.styl +++ b/wp-content/themes/c6/resources/assets/styles/widgets/heading.styl @@ -4,6 +4,18 @@ //font-size: $font-size.huge // Size for title + used for positioning subtitle constrain(font-size, 4.2vw) + .overlap-right-text & + // Only apply when we have 2 columns + +above($breakpoint-columns) + float: right + padding-right: 0 + transform: translateX(7.5vw) + z-index: 2 + + +above($content-max-width) + transform: s('translateX(%s)', $content-max-width * 0.075) // 5vw cap for large screens + + +below(1200px) font-size: $font-size.extra-large @@ -41,3 +53,13 @@ font-size: inherit font-weight: 700 margin-bottom: 0 + + .nowrap & + white-space: nowrap + + +below($breakpoint-columns) + white-space: normal + + // Also disable any
tags we added for controlling line breaks + br + display: none diff --git a/wp-content/themes/c6/resources/assets/styles/widgets/hero-block.styl b/wp-content/themes/c6/resources/assets/styles/widgets/hero-block.styl index c9c3a09..c99cbe5 100644 --- a/wp-content/themes/c6/resources/assets/styles/widgets/hero-block.styl +++ b/wp-content/themes/c6/resources/assets/styles/widgets/hero-block.styl @@ -39,13 +39,19 @@ $breakpoint-hero = 1024px &-content font-smoothing() - max-width: r(800px) + max-width: r(880px) constrain(top, 5vw) constrain(padding-bottom, 10vw) // Ensure main section bottom angle doesn't overlap content box position: relative z-index: 2 margin: 0 auto + // We are manually using Elementor's entrance animations on this block so it is hidden by those classes + // For some reason the animation doesn't trigger in the editor so the content remains hidden. Until I + // figure out why that is, make it display in the editor... + .elementor-editor-active & + visibility: visible + &-inner color: #fff @@ -61,9 +67,13 @@ $breakpoint-hero = 1024px line-height: 1 text-align: center - +below(720px) + +below(880px) white-space: normal font-size: 60px + +below(700px) + font-size: 45px + +below(450px) + font-size: 35px &-body font-size: 24px @@ -72,26 +82,5 @@ $breakpoint-hero = 1024px margin-top: 1.5em text-align: center - - // Down arrow - &-arrow - display: inline-block - width: 33px - height: @width - border-right: 2px solid #000 - border-bottom: @border-right - position: absolute - bottom: 0 - left: 50% - transform: translateX(-50%) rotate(45deg) - z-index: 10 - - +below($breakpoint-hero) - width: 25px - height: @width - - // Main angled divider between sections (uses Elementor SVG code) - &-angle - .elementor-shape & - fill: #fff // Todo: maybe make this customisable via Elementor interface - transform: rotateY(180deg) + +below(1100px) + white-space: normal diff --git a/wp-content/themes/c6/resources/views/partials/footer.blade.php b/wp-content/themes/c6/resources/views/partials/footer.blade.php index c90dca9..e5004fc 100644 --- a/wp-content/themes/c6/resources/views/partials/footer.blade.php +++ b/wp-content/themes/c6/resources/views/partials/footer.blade.php @@ -18,7 +18,7 @@
diff --git a/wp-content/themes/c6/resources/views/partials/head.blade.php b/wp-content/themes/c6/resources/views/partials/head.blade.php index 9a0bdd4..d201224 100644 --- a/wp-content/themes/c6/resources/views/partials/head.blade.php +++ b/wp-content/themes/c6/resources/views/partials/head.blade.php @@ -3,5 +3,14 @@ + + {{-- Google Analytics --}} + + + @php wp_head() @endphp