diff --git a/assets/css/theme.scss b/assets/css/theme.scss index 9c448ca..7604944 100644 --- a/assets/css/theme.scss +++ b/assets/css/theme.scss @@ -108,6 +108,7 @@ body { -moz-transition: all ease 0.3s; &:hover { + color: inherit; opacity: 0.9; } } diff --git a/assets/js/index.js b/assets/js/index.js index 40901c0..110abcd 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -30,15 +30,23 @@ var $sitehead = $("#site-head"); } } $(document).ready(function () { - $("a.btn.site-menu").click(function (e) { - e.preventDefault(); - srcToAnchorWithTitle($(e.target).data("title-anchor")); - }); - $("#header-arrow").click(function () { - srcTo($first); - }); + // fallback to jQuery animate if smooth scrolling is not supported + if (!"scrollBehavior" in document.documentElement.style) { + // Cover buttons + $("a.btn.site-menu").click(function (e) { + e.preventDefault(); + srcToAnchorWithTitle($(e.target).data("title-anchor")); + }); + + // cover arrow button + $("#header-arrow").click(function (e) { + e.preventDefault() + srcTo($first); + }); + } $(".post.last").next(".post-after").hide(); + if ($sitehead.length) { $(window).scroll(function () { var w = $(window).scrollTop(); diff --git a/layouts/index.html b/layouts/index.html index 747c932..ef173ce 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,6 +2,7 @@ {{ $headless := .Site.GetPage "/homepage" }} {{ $sections := $headless.Resources.ByType "page" }} {{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }} +{{ $content := where $sections "Params.external" "==" nil }} {{ if not .Params.header_use_video }} @@ -38,14 +39,15 @@ {{ $button_title }} {{ end }} {{ end }} - + {{ with (index $content 0) }} + {{ $first_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $first_title = . }}{{ end }} + + {{ end }} - {{ $content := where $sections "Params.external" "==" nil }} - {{ range $index_val, $elem_val := $content }}