-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dependabot/pip/gitpython-3.1.37
- Loading branch information
Showing
99 changed files
with
1,412 additions
and
581 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// This code is for creating a collapsable sidebar for the mobile view | ||
let mediaQuery = window.matchMedia('(max-width: 47.9875rem)') | ||
|
||
function mobileSidenav(e) { | ||
if (e.matches) { | ||
$('#sidebar-collapse').collapse('hide') | ||
} | ||
else{ | ||
$('#sidebar-collapse').collapse('show') | ||
} | ||
} | ||
$(document).ready(function() { | ||
mobileSidenav(mediaQuery) | ||
}); | ||
|
||
mediaQuery.addEventListener('change', mobileSidenav) |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
let mod_name = window.location.pathname.split("/") | ||
let mod_entry = "/" + mod_name[1] + "/sidebar-" + mod_name[1] | ||
if (mod_name.includes('contact')){ | ||
mod_entry = "/" + "resources/sidebar-resources" | ||
} | ||
$("#sidebars").load(mod_entry, function() { | ||
let navElements = document.querySelectorAll('.sidenav-head > a'); | ||
let winlocation; | ||
navElements.forEach(function(element){ | ||
if(!element.href.includes('changelog.html')){ | ||
if(!window.location.href.endsWith("/")){ | ||
winlocation = window.location.href + "/"; | ||
} | ||
else{ | ||
winlocation = window.location.href | ||
} | ||
if(!element.href.endsWith("/")){ | ||
element.href = element.href + "/"; | ||
} | ||
} | ||
else{ | ||
winlocation = window.location.href | ||
} | ||
if(element.href == winlocation){ | ||
$(element.parentNode).addClass("active") | ||
}}); | ||
|
||
//This code is for creating a collapsable sidebar for the mobile view | ||
let mediaQuery = window.matchMedia('(max-width: 47.9875rem)') | ||
function mobileSidenav(e) { | ||
if (e.matches) { | ||
$('#sidebar-collapse').collapse('hide') | ||
} | ||
else{ | ||
$('#sidebar-collapse').collapse('show') | ||
} | ||
} | ||
$(document).ready(function() { | ||
mobileSidenav(mediaQuery) | ||
let sidenav = $(".sidenav-list"); | ||
let sidenav_active_elements = $(".sidenav .active"); | ||
if (sidenav_active_elements.length > 0) setTimeout(() => { //setTimeout gives bootstrap time to execute first | ||
let offsetValue = sidenav_active_elements[0].offsetTop; | ||
if (offsetValue <= 0){ | ||
offsetValue = sidenav_active_elements[sidenav_active_elements.length - 1].offsetTop; | ||
} | ||
sidenav[0].scrollTop = offsetValue - 60; | ||
}); | ||
}); | ||
|
||
mediaQuery.addEventListener('change', mobileSidenav) | ||
}); |
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
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
9 changes: 9 additions & 0 deletions
9
attack-theme/templates/general/sidebar-resources-template.html
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% set RESOURCE_NAV = ${RESOURCE_NAV} -%} | ||
{% import 'macros/navigation.html' as navigation %} | ||
<div id="v-tab" role="tablist" aria-orientation="vertical" class="h-100"> | ||
{{navigation.sidenav(RESOURCE_NAV, output_file)}} | ||
</div> | ||
{% block scripts %} | ||
<!--SCRIPTS--> | ||
<script src="/theme/scripts/navigation.js"></script> | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% import 'macros/navigation.html' as navigation %} | ||
{% set parsed = page.data | from_json %} | ||
<div id="v-tab" role="tablist" aria-orientation="vertical" class="h-100"> | ||
{{ navigation.sidenav(parsed.menu, output_file) }} | ||
</div> | ||
{% block scripts %} | ||
<!--SCRIPTS--> | ||
<script src="/theme/scripts/navigation.js"></script> | ||
{% endblock %} |
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
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
Oops, something went wrong.