From 9eb928c3cf3bc9394edb4351c8b43268dead5c03 Mon Sep 17 00:00:00 2001 From: oyelakin mercy Date: Oct 17 2020 14:26:24 +0000 Subject: [PATCH 1/3] Update preview-site-src/ui-model.yml --- diff --git a/preview-site-src/ui-model.yml b/preview-site-src/ui-model.yml index 66a415f..e4624b2 100644 --- a/preview-site-src/ui-model.yml +++ b/preview-site-src/ui-model.yml @@ -84,8 +84,6 @@ page: url: '#liber-recusabo' urlType: fragment - content: Reference - url: '#' - urlType: fragment items: - content: Keyboard Shortcuts url: '#' From 1dccaa934107dd7d922ead1be9eed69922c6a41e Mon Sep 17 00:00:00 2001 From: oyelakin mercy Date: Oct 17 2020 14:41:53 +0000 Subject: [PATCH 2/3] Update src/js/01-navigation.js --- diff --git a/src/js/01-navigation.js b/src/js/01-navigation.js index 3272cf9..5c3afbe 100644 --- a/src/js/01-navigation.js +++ b/src/js/01-navigation.js @@ -28,8 +28,16 @@ menuState.expandedItems = getExpandedItems() saveNavState() }) + var navItemSpan = findNextElement(btn, '.nav-text') + if (navItemSpan) { + navItemSpan.style.cursor = 'pointer' + navItemSpan.addEventListener('click', function () { + li.classList.toggle('is-active') + menuState.expandedItems = getExpandedItems() + saveNavState() + }) + } }) - find('.nav-item', menuPanel).forEach(function (item, idx) { item.setAttribute('data-id', 'menu-' + item.dataset.depth + '-' + idx) }) @@ -143,4 +151,14 @@ function find (selector, from) { return [].slice.call((from || document).querySelectorAll(selector)) } + function findNextElement (from, selector) { + var el + if ('nextElementSibling' in from) { + el = from.nextElementSibling + } else { + el = from + while ((el = el.nextSibling) && el.nodeType !== 1); + } + return el && selector ? el[el.matches ? 'matches' : 'msMatchesSelector'](selector) && el : el + } })() From 3389460ea54e71ac24b5be1acb1971997eabdff8 Mon Sep 17 00:00:00 2001 From: oyelakin mercy Date: Oct 17 2020 14:51:17 +0000 Subject: [PATCH 3/3] Update src/css/doc.css --- diff --git a/src/css/doc.css b/src/css/doc.css index 343aab8..87d2a1e 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -9,6 +9,7 @@ .doc { margin: 0 2rem; max-width: 54rem; + flex: auto; } }