Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/kitab.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-06-10 03:39:40 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-06-10 03:39:40 +0300
commit9a7441889c82bc56eed0a3721580900b7d9d980c (patch)
tree75f7f309e0230e9b5a4d7bbbf8b48da48bae33c1 /layouts
parentd88d35a36bfafec5e4202bafdb7acf6606e4918b (diff)
Converted menu to hover type
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/bookMenu.html27
-rw-r--r--layouts/partials/chapterMenu.html34
-rw-r--r--layouts/partials/header.html32
-rw-r--r--layouts/partials/navbar.html16
4 files changed, 58 insertions, 51 deletions
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 @@
-<div class="menuItems d-none">
- <ul class="list-unstyled">
- {{ range .Site.Sections }}
- <li>
- <a href="{{ .Permalink }}">
- <h2 class="mb-0 mt-3">
- {{ .Title |markdownify }}
- </h2>
- </a>
- <p>by {{ .Params.author }}</p>
- </li>
- {{ end }}
- </ul>
-</div>
+<b>
+ Books
+</b>
+<ul class="list-unstyled ml-1">
+ {{ range .Site.Sections }}
+ <li class="hanging">
+ <a href="{{ .Permalink }}">
+ {{ .Title |markdownify }}
+ </a>
+ by {{ .Params.author }}
+ </li>
+ {{ end }}
+</ul>
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 @@
-<div class="chapters d-none">
- <h2 class='mt-3'>
- {{ $thisSection := .Site.GetPage "section" .Section }}
- {{ with $thisSection }}
- {{ .Title | markdownify }}
- {{ end }}
- </h2>
- <ul class="list-unstyled ml-3 mb-0 mt-0">
- {{ $mypages := intersect (where .Site.Pages "Section" .Section) (where .Site.Pages "Kind" "page") }}
- {{ range $mypages }}
- <li>
- <a href="{{ .Permalink }}"
- ><h4>{{ .Title | markdownify}}</h4></a
- >
- </li>
- {{ end }}
- </ul>
-</div>
+<b class="mt-3">
+ {{ $thisSection := .Site.GetPage "section" .Section }}
+ {{ with $thisSection }}
+ {{ .Title | markdownify }}
+ {{ end }}
+</b>
+<ul class="list-unstyled ml-1">
+ {{ $mypages := intersect (where .Site.Pages "Section" .Section) (where .Site.Pages "Kind" "page") }}
+ {{ range $mypages }}
+ <li class="hanging">
+ <a href="{{ .Permalink }}"
+ >{{ .Title | markdownify}}</a
+ >
+ </li>
+ {{ end }}
+</ul>
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 @@
<nav>
- {{ partial "navbar" . }}
- {{ partial "bookMenu" . }}
- {{ partial "chapterMenu" . }}
+ <div class="d-flex flex-row mt-2 border-bottom">
+ <div class="menuItem navMenu mr-2">
+ <a href="{{ `/` | relURL }}"><i class="fas fa-home"></i></a>
+ </div>
+
+ <div class="dropdown">
+ <p class="menuItem navMenu ml-2 mr-2 dropbtn">
+ <i class="fas fa-book"></i>
+ </p>
+ <div class="dropdown-content p-2 bg-light shadow">
+ {{ partial "bookMenu" . }}
+ </div>
+ </div>
+
+ {{ if eq .Kind "page" }}
+ <div class="dropdown">
+ <p class="menuItem navMenu ml-2 mr-2 dropbtn text-center">
+ <i class="fas fa-bars"></i>
+ </p>
+ <div class="dropdown-content p-2 bg-light shadow">
+ {{ partial "chapterMenu" . }}
+ </div>
+ </div>
+ {{ end }}
+
+ <div class="w-100 text-right">
+ {{ partial "footer" . }}
+ </div>
+ </div>
</nav>
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 @@
-<div class="d-flex flex-row mt-2 border-bottom">
- <div class="menuItem navMenu mr-4">
- <a href="{{ `/` | relURL }}"><i class="fas fa-home"></i></a>
- </div>
- <div class="menuItem navMenu mr-4" onclick="showBooks()">
- <i class="fas fa-book"></i>
- </div>
- {{ if eq .Kind "page" }}
- <div class="menuItem navMenu" onclick="showChapters()">
- <i class="fas fa-bars"></i>
- </div>
- {{ end }}
- <div class="w-100 text-right">
- {{ partial "footer" . }}
- </div>
-</div>