Hugo Bilberry First commit to gitea@cowbay.org
This commit is contained in:
2
themes/bilberry-hugo-theme/assets/js/README.md
Normal file
2
themes/bilberry-hugo-theme/assets/js/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Get external JS-dependencies
|
||||
`wget -O externalDependencies.js -i imports`
|
||||
17
themes/bilberry-hugo-theme/assets/js/externalDependencies.js
Normal file
17
themes/bilberry-hugo-theme/assets/js/externalDependencies.js
Normal file
File diff suppressed because one or more lines are too long
7
themes/bilberry-hugo-theme/assets/js/imports
Normal file
7
themes/bilberry-hugo-theme/assets/js/imports
Normal file
@@ -0,0 +1,7 @@
|
||||
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.31.0/autocomplete.jquery.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.7.1/jquery.flexslider.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/instantsearch.js/2.10.1/instantsearch.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment-with-locales.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/3.30.0/algoliasearch.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
|
||||
28
themes/bilberry-hugo-theme/assets/js/theme.js
Normal file
28
themes/bilberry-hugo-theme/assets/js/theme.js
Normal file
@@ -0,0 +1,28 @@
|
||||
$(document).ready(function() {
|
||||
$(".toggler").click(function () {
|
||||
$("nav").slideToggle();
|
||||
$("#search").autocomplete("val", "");
|
||||
});
|
||||
|
||||
$(document).keyup(function (e) {
|
||||
if (e.keyCode === 27) {
|
||||
if ( ! $("nav").hasClass('permanentTopNav') )
|
||||
$("nav").slideUp();
|
||||
$("#search").autocomplete("val", "");
|
||||
}
|
||||
else if (e.keyCode === 83){
|
||||
if ( ! $("nav").hasClass('permanentTopNav') )
|
||||
$("nav").slideDown();
|
||||
$("#search").focus();
|
||||
}
|
||||
})
|
||||
|
||||
$('.flexslider').flexslider({
|
||||
animation: "slide",
|
||||
prevText: "",
|
||||
nextText: "",
|
||||
pauseOnHover: true,
|
||||
});
|
||||
});
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
Reference in New Issue
Block a user