Skip to content

Commit

Permalink
add sidebar to default layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rjawesome committed Jun 28, 2023
1 parent bfe63a2 commit f876464
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<head>
{% include head.html %}
<script>
$(document).ready(function() {

fetch("sidebar-{{page.sidebar}}.html")
.then(resp => resp.text())
.then(html => document.getElementById("tg-sb-sidebar").innerHTML = html)
.then(function () {
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
Expand All @@ -30,8 +34,7 @@
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});

});
})

</script>
<script>
Expand Down Expand Up @@ -83,7 +86,7 @@
{% unless page.hide_sidebar %}
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
{% include sidebar.html %}

</div>
{% assign content_col_size = "col-md-9" %}
{% endunless %}
Expand Down

0 comments on commit f876464

Please sign in to comment.