-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add child dir traversal for md files
- Loading branch information
1 parent
4abc304
commit f4019d1
Showing
4 changed files
with
112 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
<div class="list_title"><i class="fas fa-list"></i> Table of contents</div> | ||
<ul class="sidebar_list"> | ||
<% pages.forEach(page => { %> | ||
<% if (page.name == name) { %> | ||
<li class="list_item"><a class="active" href="<%= page.name %>.html"><%= page.name %></a></li> | ||
<% } else { %> | ||
<li class="list_item"><a href="<%= page.name %>.html"><%= page.name %></a></li> | ||
<% } %> | ||
<div class="sidebar_list_item"> | ||
<button class="btn btn-sm list_heading <%= page.dirClass %> sub-<%= page.dirLevel %>" | ||
type="button" | ||
data-bs-toggle="collapse" | ||
data-bs-target="#<%= page.dirClass %>" | ||
aria-expanded="true" | ||
aria-controls="<%= page.dirClass %>"> | ||
<%= page.dirName %> | ||
</button> | ||
<ul id="<%= page.dirClass %>" class="list_files collapse show"> | ||
<% page.files.forEach(file => { %> | ||
<% if (file == name) { %> | ||
<li class="list_item"><a class="nav-link active" href="<%= file %>.html"><%= file %></a></li> | ||
<% } else { %> | ||
<li class="list_item"><a class="nav-link" href="<%= file %>.html"><%= file %></a></li> | ||
<% } %> | ||
<% }) %> | ||
</ul> | ||
</div> | ||
<% }) %> | ||
</ul> | ||
<%- include('./footer'); %> |