]> _ Git - c6-wordpress.git/commitdiff
WIP #2685 @7
authornael <nael@cubedesigners.com>
Wed, 15 May 2019 15:25:15 +0000 (17:25 +0200)
committernael <nael@cubedesigners.com>
Wed, 15 May 2019 15:25:15 +0000 (17:25 +0200)
wp-content/mu-plugins/cube/src/Elementor/Widgets/Timeline.php
wp-content/themes/c6/resources/assets/scripts/timeline.js
wp-content/themes/c6/resources/assets/styles/widgets/timeline.styl
wp-content/themes/c6/resources/views/partials/footer.blade.php

index 0c61a958c0891d0d53727e9e7a20de8ae0c02957..98dc449eaab3de676a78cc096649d7c43412fc87 100644 (file)
@@ -131,12 +131,12 @@ class Timeline extends Widget_Base
 
         // Rendered content
         $res = '<div class="timeline-wrapper">';
-        $res .= '<nav class="timeline-nav" id="timeline-nav">';
+        $res .= '<ul class="timeline-nav" id="timeline-nav">';
         foreach ($items as $index => $item) {
             $arr = explode(' ', trim($item['year'])); // select the first word
-            $res .= '<a class="timeline-nav-item" href="#year-' . $index . '">' . $arr[0] . '</a>';
+            $res .= '<li class="timeline-nav-item"><a href="#year-' . $index . '">' . $arr[0] . '</a></li>';
         }
-        $res .= '</nav>';
+        $res .= '</ul>';
         $res .= '<div class="timeline-content">';
 
         foreach ($items as $index => $item) {
index 6b2d2d5b872ce32c801c636017d0534ceced3042..ac76e8be1df3f56e550f9bf746955a9c548f37a4 100644 (file)
@@ -1,7 +1,6 @@
-import scrollSpy from 'simple-scrollspy';
+/* eslint-disable */
+import Gumshoe from './gumshoe'; // Custom version for C6
 
-scrollSpy('#timeline-nav', {
-    offset: -200,
-    sectionClass: '.timeline-item',
-    menuActiveTarget: '.timeline-nav-item',
-});
+new Gumshoe('#timeline-nav a', {
+    offset: 50,
+});
\ No newline at end of file
index 90183e4605f3b4ea03a36b7c074301616d8534de..1aa08122ddb5087056549c01b6c49d7173e1fe61 100644 (file)
     &-item
       display: block
       margin-bottom: 1.5em
-      &:hover
+      @media (hover) // this stops the hover state getting stuck on touch devices
+        &:hover
+          color: $colors.orange
+      &.active
+        font-size: $font-size.medium
         color: $colors.orange
-      //&.active
-      //  font-size: $font-size.medium
-      //  color: $colors.orange
 
   &-content
     padding-right: 144px
index e5004fcad52dddeda777ad4afe5ddff028cc1bba..bbf2f8c1d2e9ae5be90b28c8b503224dbc33d39f 100644 (file)
@@ -2,7 +2,9 @@
   <div class="footer-inner content-inner">
 
     <div class="footer-col footer-logo">
-      @svg('logo', ['class' => 'footer-logo-svg'])
+      <a href="{{ home_url('/') }}" aria-label="<?= _("Go to the home page") ?>">
+        @svg('logo', ['class' => 'footer-logo-svg'])
+      </a>
     </div>
 
     <div class="footer-col footer-info">