mirror of
https://gitlab.com/fabinfra/fabinfra-theme.git
synced 2025-03-12 14:41:51 +01:00
43 lines
1.4 KiB
HTML
43 lines
1.4 KiB
HTML
<!-- custom -->
|
|
{{ range .Site.Params.js }}
|
|
<script src="{{ . | absURL }}"></script>
|
|
{{ end }}
|
|
|
|
<!-- jquery -->
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
|
|
|
<!-- bootstrap -->
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
|
|
<!-- boostrap toggle tool -->
|
|
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
|
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
|
|
|
|
<!-- dismiss expanded navigation bar with click -->
|
|
<script>$(document).on('click', function() { $('.collapse').collapse('hide'); })</script>
|
|
|
|
<!-- nightmode-toggle -->
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
var input = $('#night-mode-toggle');
|
|
var container = $('#bigbody');
|
|
var stat = $('#button-status');
|
|
|
|
container.toggleClass(localStorage.toggled);
|
|
stat.bootstrapToggle(localStorage.button).change();
|
|
|
|
input.on('click', function() {
|
|
if (localStorage.toggled != "-nightmode" ) {
|
|
container.toggleClass("-nightmode", true );
|
|
localStorage.toggled = "-nightmode";
|
|
localStorage.button = "on";
|
|
} else {
|
|
container.toggleClass("-nightmode", false );
|
|
localStorage.toggled = "";
|
|
localStorage.button = "off"
|
|
}
|
|
})
|
|
});
|
|
</script>
|