diff --git a/assets/js/script.js b/assets/js/script.js index 9a943627..c6b9ba1e 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -66,22 +66,6 @@ $(document).ready(function () { } }); - // Smooth scrolling - var scrollLink = $(".scroll"); - scrollLink.click(function (e) { - e.preventDefault(); - $("body,html").animate( - { - scrollTop: $(this.hash).offset().top, - }, - 1000 - ); - }); - - $(".navbar-nav>li>a").on("click", function () { - $(".navbar-collapse").collapse("hide"); - }); - // service slider $(".service__slider").slick({ infinite: false, diff --git a/assets/scss/_common.scss b/assets/scss/_common.scss index a1387c55..d3c7e574 100644 --- a/assets/scss/_common.scss +++ b/assets/scss/_common.scss @@ -1,4 +1,4 @@ -.section{ +.section { padding: 100px 0; } @@ -8,3 +8,15 @@ margin-right: 0; } +/** + * Enable smooth scrolling on all pages + */ +html { + scroll-behavior: smooth; +} + +@media screen and (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } +} diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 974fa04a..f9d818e3 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -10,56 +10,56 @@ url = "#home" weight = 1 [[menu.main]] name = "About" -url = "#about" +url = "/#about" weight = 2 [[menu.main]] name = "Service" -url = "#service" +url = "/#service" weight = 3 [[menu.main]] name = "Work" -url = "#portfolio" +url = "/#portfolio" weight = 4 [[menu.main]] name = "Resume" -url = "#resume" +url = "/#resume" weight = 5 [[menu.main]] name = "Blog" -url = "#blog" +url = "/blog" weight = 6 [[menu.main]] name = "Contact" -url = "#contact" +url = "/contact" weight = 7 # Sitemap Menu [[menu.sitemap]] name = "About me" -url = "about" +url = "/#about" weight = 1 [[menu.sitemap]] -name = "Frequently Ask Question" -url = "#" -weight = 2 -[[menu.sitemap]] -name = "Privacy & Policy" -url = "#" -weight = 3 -[[menu.sitemap]] name = "Latest Article" -url = "#" -weight = 4 +url = "/blog" +weight = 2 [params] blogPageURL = "blog" contactLink = "contact" copyright = "All right reserved copyright © Portio 2020" -footerLogo = "images/contact/widget-logo.png" formspreeURL = "YOUR FORMSPREE URL" googleAnalytics = "YOUR GOOGLE ANALYTICS CODE" logo = "images/site-navigation/logo.png" +footerButtonTarget = "/contact" +footerButtonText = "Get in Touch" +footerCallToAction = "Let's Start a Project" +footerLogo = "images/contact/widget-logo.png" +footerTopTitle = "Contact me" + +headerButtonTarget = "/contact" +headerButtonText = "Hire Me Now" + [params.address] address = "23 Khan Niketon, Grand Street, NYK." email = "hello@example.com" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 966ec505..e6b12802 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -23,12 +23,12 @@ @@ -45,7 +45,9 @@

Sitemap

diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index e7d28bf9..eba247ef 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -14,13 +14,13 @@ {{ $menu := .Site.Menus.main }} {{ range $index, $element := $menu }} {{ end }}