diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 7a2aa81..92f7d6f 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,5 +1,5 @@ - {{ title .Site.Title }} + {{ title .Site.Title }} {{ $home := .Site.GetPage "home" }} diff --git a/static/src/js/index.js b/static/src/js/index.js index 5116adb..3fe4a83 100644 --- a/static/src/js/index.js +++ b/static/src/js/index.js @@ -31,3 +31,13 @@ $(document).ready(function () { }); }); +$('.navbar-brand').bind('click', function (event) { + if ($('html').scrollTop() > 100) { + $('html, body').stop().animate({ + scrollTop: 0 + }, 500); + } else { + window.location = '/'; + } + event.preventDefault(); +});