From 9a7441889c82bc56eed0a3721580900b7d9d980c Mon Sep 17 00:00:00 2001 From: Darshan Baral Date: Sun, 9 Jun 2019 17:39:40 -0700 Subject: Converted menu to hover type --- layouts/partials/bookMenu.html | 27 +++++++++++++-------------- layouts/partials/chapterMenu.html | 34 ++++++++++++++++------------------ layouts/partials/header.html | 32 +++++++++++++++++++++++++++++--- layouts/partials/navbar.html | 16 ---------------- static/css/kitab.css | 32 +++++++++++++++++++++++++++++++- static/js/myFunctions.js | 32 -------------------------------- 6 files changed, 89 insertions(+), 84 deletions(-) delete mode 100644 layouts/partials/navbar.html diff --git a/layouts/partials/bookMenu.html b/layouts/partials/bookMenu.html index 8d13d87..4c30cab 100644 --- a/layouts/partials/bookMenu.html +++ b/layouts/partials/bookMenu.html @@ -1,14 +1,13 @@ - + + Books + + diff --git a/layouts/partials/chapterMenu.html b/layouts/partials/chapterMenu.html index a7c53f3..48a5db7 100644 --- a/layouts/partials/chapterMenu.html +++ b/layouts/partials/chapterMenu.html @@ -1,18 +1,16 @@ -
-

- {{ $thisSection := .Site.GetPage "section" .Section }} - {{ with $thisSection }} - {{ .Title | markdownify }} - {{ end }} -

- -
+ + {{ $thisSection := .Site.GetPage "section" .Section }} + {{ with $thisSection }} + {{ .Title | markdownify }} + {{ end }} + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 984aa4a..4045ad4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,5 +1,31 @@ diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html deleted file mode 100644 index 6d3cc4e..0000000 --- a/layouts/partials/navbar.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - - {{ if eq .Kind "page" }} - - {{ end }} -
- {{ partial "footer" . }} -
-
diff --git a/static/css/kitab.css b/static/css/kitab.css index 9288f1a..4b6065d 100644 --- a/static/css/kitab.css +++ b/static/css/kitab.css @@ -35,4 +35,34 @@ a:hover { .toTop { position: fixed; bottom: 10px; -} \ No newline at end of file +} + +.dropbtn { + color: #007bff; +} +.dropbtn:hover { + color: #0056b3; +} +.dropdown-content { + display: none; + position: absolute; + min-width: 280px; + max-width: 75%; + z-index: 1; +} +.dropdown { + cursor: pointer; + position: relative !important; + display: inline-block !important; +} +.dropdown:hover { + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + background-color: white; +} +.dropdown:hover .dropdown-content { + display: block; +} +.hanging { + padding-left: 15px; + text-indent: -15px; +} diff --git a/static/js/myFunctions.js b/static/js/myFunctions.js index 79c9ec5..2bcca8e 100644 --- a/static/js/myFunctions.js +++ b/static/js/myFunctions.js @@ -1,35 +1,3 @@ -let showBooks = function() { - let options = document.querySelector(".chapters"); - let menuItems = document.querySelector(".menuItems"); - let mainItem = document.querySelector("main"); - if (!options.classList.contains("d-none")) { - options.classList.add("d-none"); - } - if (menuItems.classList.contains("d-none")) { - menuItems.classList.remove("d-none"); - mainItem.classList.add("d-none"); - } else { - menuItems.classList.add("d-none"); - mainItem.classList.remove("d-none"); - } -}; - -let showChapters = function() { - let menuItems = document.querySelector(".menuItems"); - let options = document.querySelector(".chapters"); - let mainItem = document.querySelector("main"); - if (!menuItems.classList.contains("d-none")) { - menuItems.classList.add("d-none"); - } - if (options.classList.contains("d-none")) { - options.classList.remove("d-none"); - mainItem.classList.add("d-none"); - } else { - options.classList.add("d-none"); - mainItem.classList.remove("d-none"); - } -}; - let scrollToTop = () => { const c = document.documentElement.scrollTop || document.body.scrollTop; if (c > 0) { -- cgit v1.2.3