From c2952f1761324713b96853f7c05ecd157f9b5154 Mon Sep 17 00:00:00 2001 From: Roshan J Date: Thu, 28 Jul 2022 02:24:08 +0530 Subject: [PATCH 1/7] [feat]:mobile sticky navigation provided to all the documentation pages --- components/doc-sidebar.css | 25 ++++++++++++++++++++++++- documentation/alerts.html | 8 +++++++- documentation/avatars.html | 8 +++++++- documentation/badges.html | 8 +++++++- documentation/buttons.html | 8 +++++++- documentation/cards.html | 8 +++++++- documentation/grids.html | 8 +++++++- documentation/images.html | 8 +++++++- documentation/inputs.html | 8 +++++++- documentation/lists.html | 8 +++++++- documentation/modals.html | 8 +++++++- documentation/navigation.html | 8 +++++++- documentation/ratings.html | 8 +++++++- documentation/scripts/docSidebar.js | 6 ++++++ documentation/sliders.html | 8 +++++++- documentation/text-utilities.html | 8 +++++++- documentation/toasts.html | 11 ++++++++--- 17 files changed, 136 insertions(+), 18 deletions(-) create mode 100644 documentation/scripts/docSidebar.js diff --git a/components/doc-sidebar.css b/components/doc-sidebar.css index acb50bc..b93ac8a 100644 --- a/components/doc-sidebar.css +++ b/components/doc-sidebar.css @@ -15,8 +15,31 @@ border-bottom-color: var(--primary-color); } +.sidebar-hidden, +.toggle-list { + display: none; +} + @media screen and (max-width: 768px) { + .sidebar { + position: sticky; + top: 0; + z-index: 5; + } + .sidebar h4 { + padding-top: 1rem; + } .sidebar-components { - flex-flow: row wrap; + flex-flow: column; + height: 90vh; + width: 100%; + overflow-y: auto; + } + .rotation { + transform: rotate(180deg); + } + .toggle-list { + display: block; + transition: 0.4s; } } diff --git a/documentation/alerts.html b/documentation/alerts.html index 1b7e203..ed77296 100644 --- a/documentation/alerts.html +++ b/documentation/alerts.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/avatars.html b/documentation/avatars.html index 769ce02..74fb61f 100644 --- a/documentation/avatars.html +++ b/documentation/avatars.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/badges.html b/documentation/badges.html index 02cbd08..d0e27fd 100644 --- a/documentation/badges.html +++ b/documentation/badges.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/buttons.html b/documentation/buttons.html index 9b6ee8f..631859b 100644 --- a/documentation/buttons.html +++ b/documentation/buttons.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/cards.html b/documentation/cards.html index 8257ed6..2fd9f21 100644 --- a/documentation/cards.html +++ b/documentation/cards.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/grids.html b/documentation/grids.html index 44caf4a..3680026 100644 --- a/documentation/grids.html +++ b/documentation/grids.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/images.html b/documentation/images.html index 0adaa39..39e7dff 100644 --- a/documentation/images.html +++ b/documentation/images.html @@ -35,7 +35,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/inputs.html b/documentation/inputs.html index f67f4de..d49a9c3 100644 --- a/documentation/inputs.html +++ b/documentation/inputs.html @@ -35,7 +35,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/lists.html b/documentation/lists.html index cadfdc3..6deeff4 100644 --- a/documentation/lists.html +++ b/documentation/lists.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/modals.html b/documentation/modals.html index 8270c5a..953b266 100644 --- a/documentation/modals.html +++ b/documentation/modals.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/navigation.html b/documentation/navigation.html index 8b03774..8b84475 100644 --- a/documentation/navigation.html +++ b/documentation/navigation.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/ratings.html b/documentation/ratings.html index 3c35f2c..d7d4377 100644 --- a/documentation/ratings.html +++ b/documentation/ratings.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/scripts/docSidebar.js b/documentation/scripts/docSidebar.js new file mode 100644 index 0000000..73f1112 --- /dev/null +++ b/documentation/scripts/docSidebar.js @@ -0,0 +1,6 @@ +const toggleHeading = document.querySelector(".toggle-list"); +const sidebarList = document.querySelector(".sidebar-components"); +toggleHeading.addEventListener("click", () => { + sidebarList.classList.toggle("sidebar-hidden"); + toggleHeading.classList.toggle("rotation"); +}); diff --git a/documentation/sliders.html b/documentation/sliders.html index c0b272e..e42432e 100644 --- a/documentation/sliders.html +++ b/documentation/sliders.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/text-utilities.html b/documentation/text-utilities.html index c4b4938..9717127 100644 --- a/documentation/text-utilities.html +++ b/documentation/text-utilities.html @@ -36,7 +36,12 @@
Gentle UI
+ \ No newline at end of file diff --git a/documentation/toasts.html b/documentation/toasts.html index 0b7805b..a7c5cbb 100644 --- a/documentation/toasts.html +++ b/documentation/toasts.html @@ -36,7 +36,12 @@
Gentle UI
- + + \ No newline at end of file From 037e246b696cbd092d28e8ab94ea328237b94cf7 Mon Sep 17 00:00:00 2001 From: Roshan J Date: Thu, 28 Jul 2022 03:05:55 +0530 Subject: [PATCH 2/7] mobile responsiveness adjustments --- components/doc-sidebar.css | 8 +++----- documentation/alerts.html | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/doc-sidebar.css b/components/doc-sidebar.css index b93ac8a..c77b793 100644 --- a/components/doc-sidebar.css +++ b/components/doc-sidebar.css @@ -26,14 +26,12 @@ top: 0; z-index: 5; } - .sidebar h4 { + .sidebar-heading { padding-top: 1rem; } .sidebar-components { - flex-flow: column; - height: 90vh; - width: 100%; - overflow-y: auto; + flex-direction: column; + justify-content: start; } .rotation { transform: rotate(180deg); diff --git a/documentation/alerts.html b/documentation/alerts.html index ed77296..8b7326a 100644 --- a/documentation/alerts.html +++ b/documentation/alerts.html @@ -37,7 +37,7 @@
Gentle UI