forked from unitoo/website
52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
//= require jquery
|
|
//= require simple-jekyll-search
|
|
// require bootstrap
|
|
// require bootstrap-sprockets
|
|
// require morphext
|
|
//= require cookie
|
|
|
|
/* Set the width of the side navigation to 250px */
|
|
function openNav() {
|
|
document.getElementById("mySidenav").style.width = "250px";
|
|
}
|
|
|
|
/* Set the width of the side navigation to 0 */
|
|
function closeNav() {
|
|
document.getElementById("mySidenav").style.width = "0";
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
var sjs = SimpleJekyllSearch({
|
|
searchInput: document.getElementById('search-input'),
|
|
resultsContainer: document.getElementById('results-container'),
|
|
json: '/search.json',
|
|
searchResultTemplate: '<a class="dropdown-item" href="{url}">{title}</a>',
|
|
noResultsText: '<a class="dropdown-item" href="#">'+ $("meta[name='no-results']").attr('content') +'</a>',
|
|
exclude: ["https://blog.unitoo.it", "https://blog.unitoo.pw"]
|
|
});
|
|
|
|
$(".btn-open-nav").off()
|
|
$(".btn-open-nav").on('click', function() {
|
|
openNav();
|
|
})
|
|
|
|
$(".closebtn").off()
|
|
$(".closebtn").on('click', function() {
|
|
closeNav();
|
|
})
|
|
|
|
// $(".morphext-bounce-in").Morphext({
|
|
// animation: "bounceIn",
|
|
// speed: 2500
|
|
// });
|
|
|
|
// $(".morphext-bounce-left").Morphext({
|
|
// animation: "zoomInLeft",
|
|
// speed: 4500
|
|
// });
|
|
|
|
// $(".morphext-bounce-up").Morphext({
|
|
// animation: "bounceInUp",
|
|
// speed: 6500
|
|
// });
|
|
});
|