From 3ff24c7926f06e10bf33eba7d1c86f18087e793a Mon Sep 17 00:00:00 2001 From: Sviatoslav Date: Sun, 10 Jun 2018 04:48:18 +0300 Subject: [PATCH] Show onPageNav on mobile devices (#730) * Draft implementation of ToC (onPageNav) support for mobile devices * Support onPageNav on tablets * Improve tablet layout, when no onPageNav * Add close state for toc icon * Close onPageNav, when after navigation on mobile devices --- lib/core/nav/SideNav.js | 30 +++++- lib/static/css/main.css | 221 ++++++++++++++++++++++++++-------------- 2 files changed, 171 insertions(+), 80 deletions(-) diff --git a/lib/core/nav/SideNav.js b/lib/core/nav/SideNav.js index 35448cf5de96..ebae3de063fd 100644 --- a/lib/core/nav/SideNav.js +++ b/lib/core/nav/SideNav.js @@ -28,6 +28,9 @@ class SideNav extends React.Component { {this.getLocalizedCategoryString(this.props.current.category)} +
+ +
{this.props.contents.map(this.renderCategory, this)} @@ -37,11 +40,28 @@ class SideNav extends React.Component {