diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-06-10 03:39:40 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-06-10 03:39:40 +0300 |
commit | 9a7441889c82bc56eed0a3721580900b7d9d980c (patch) | |
tree | 75f7f309e0230e9b5a4d7bbbf8b48da48bae33c1 /static | |
parent | d88d35a36bfafec5e4202bafdb7acf6606e4918b (diff) |
Converted menu to hover type
Diffstat (limited to 'static')
-rw-r--r-- | static/css/kitab.css | 32 | ||||
-rw-r--r-- | static/js/myFunctions.js | 32 |
2 files changed, 31 insertions, 33 deletions
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) {
|