Browse Source

customJS

main
Hendrik Langer 5 years ago
parent
commit
295fdd809f
  1. 1
      config.toml
  2. 4
      layouts/partials/scripts.html
  3. 8
      static/js/custom.js

1
config.toml

@ -50,6 +50,7 @@ preserveTaxonomyNames = true
enableRobotsTXT = true
customCSS = ["css/custom.css"]
customJS = ["css/custom.js"]
[params.copyright]
name = "hendrik"

4
layouts/partials/scripts.html

@ -31,3 +31,7 @@
document.getElementById('thisyear').innerHTML = new Date().getFullYear();
};
</script>
{{- range .Site.Params.customJS }}
<script src="{{ . | relURL }}"></script>
{{- end }}

8
static/js/custom.js

@ -0,0 +1,8 @@
<script>
$(document).ready(function() {
if ( $(location).attr("pathname") == "/") {
$('.collapse').collapse('show');
}
});
//$('.collapse').show();
</script>
Loading…
Cancel
Save