Skip to content

Conversation

oldenboom
Copy link

Pull request @robhoes is on older version of theme and required some work. Reviewed those edits, then used master to redo the edits to prepare this pull request.

@seekM
Copy link

seekM commented May 8, 2020

Is there a specific reason why this hasn't been merged yet?

@root360-AndreasUlm
Copy link

@oldenboom the following diff fixes the conflicts in menu.html:

diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 5583eda..c023003 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -99,18 +99,25 @@
  {{with .sect}}
   {{if and .IsSection (or (not .Params.hidden) $.showhidden)}}
     {{safeHTML .Params.head}}
+    {{ $isParent := or (.IsAncestor $currentNode) (.Params.alwaysopen) }}
+    {{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
     <li data-nav-id="{{.RelPermalink}}" title="{{.Title}}" class="dd-item 
-        {{if .IsAncestor $currentNode }}parent{{end}}
+        {{if $isParent }}parent{{end}}
         {{if eq .File.UniqueID $currentFileUniqueID}}active{{end}}
-        {{if .Params.alwaysopen}}parent{{end}}
         ">
       <a href="{{.RelPermalink}}">
           {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
+          {{ if and (ne $numberOfPages 0) (ne .Parent .Site.Home) }}
+            {{if $isParent }}
+              <i class="fas fa-caret-down"></i>
+            {{ else }}
+              <i class="fas fa-caret-right"></i>
+            {{ end }}
+          {{ end }}
           {{ if $showvisitedlinks}}
-            <i class="fas fa-check read-icon"></i>
+            <i class="fas fa-check"></i>
           {{ end }}
       </a>
-      {{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
       {{ if ne $numberOfPages 0 }}
         <ul>
           {{ $currentNode.Scratch.Set "pages" .Pages }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants