Skip to content

Commit

Permalink
Merge pull request #50 from carpentries/hard-link-mobile-nav
Browse files Browse the repository at this point in the history
hard-code generated resources in mobile nav
  • Loading branch information
zkamvar authored Jun 24, 2022
2 parents 45d26ed + 277ddbf commit 79b523d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: varnish
Title: Front-end for The Carpentries Lesson Template
Version: 0.2.0
Version: 0.2.1
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# varnish 0.2.1

* The sidebar navigation in mobile and tablet views now includes all the
information that was included in the navigation bar for the desktop mode.
(reported: https://github.com/carpentries/workbench/issues/16#issuecomment-1165307355 by @Athanasiamo and #49, fixed: #50 by @zkamvar)

# varnish 0.2.0

* The sidebar state (expanded or collapsed) will now persist during navigation
Expand Down
23 changes: 23 additions & 0 deletions inst/pkgdown/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,35 @@ <h2 class="accordion-header" id="flush-headingTwelve">
<div id="flush-collapseTwelve" class="accordion-collapse collapse" aria-labelledby="flush-headingTwelve" data-bs-parent="#accordionFlush12">
<div class="accordion-body">
<ul>
{{#instructor}}
<li>
<a href="{{#site}}{{root}}{{/site}}instructor/key-points.html">Key Points</a>
</li>
<li>
<a href="{{#site}}{{root}}{{/site}}instructor/instructor-notes.html">Instructor Notes</a>
</li>
<li>
<a href="{{#site}}{{root}}{{/site}}instructor/images.html">Extract All Images</a>
</li>
{{/instructor}}
{{^instructor}}
<li>
<a href="{{#site}}{{root}}{{/site}}key-points.html">Key Points</a>
</li>
<li>
<a href="{{#site}}{{root}}{{/site}}reference.html#glossary">Glossary</a>
</li>
<li>
<a href="{{#site}}{{root}}{{/site}}profiles.html">Learner Profiles</a>
</li>
{{/instructor}}
{{{resources}}}
</ul>
</div>
</div>
</div>
</div>
<hr class="half-width resources"/>
{{/resources}}

{{#aio}}<a href="{{#site}}{{root}}{{/site}}{{#instructor}}instructor/{{/instructor}}aio.html">See all in one page</a>{{/aio}}
Expand Down

0 comments on commit 79b523d

Please sign in to comment.