Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leonardofaria/bento.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Faria <leonardofaria@gmail.com>2020-05-15 04:53:05 +0300
committerLeonardo Faria <leonardofaria@gmail.com>2020-05-15 04:53:05 +0300
commitab6bdbc05cbc0a264d8eb258b1d1af59aa8df936 (patch)
treedf29da50e9746d4f1acce0de3216d61e3907c96a /layouts
parent1281c4698b469021d396256b0365b77220d119b4 (diff)
Add header padding transition
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/header.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index e2b5a8c..3793490 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -43,10 +43,12 @@ let scrollPercent = 0;
const addClassOnScroll = () => {
header.classList.add("shadow");
header.classList.add("bg-white");
+ header.classList.remove("py-4");
}
const removeClassOnScroll = () => {
header.classList.remove("shadow");
header.classList.remove("bg-white");
+ header.classList.add("py-4");
}
window.onscroll = function() {
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 1f261fb..5a820bc 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -34,7 +34,7 @@
</div>
</header>
{{else}}
- <header id="header" class="w-full m-0 fixed z-10 transition duration-300 ease-in-out border-t-4 border-gray-300">
+ <header id="header" class="w-full m-0 fixed z-10 transition-all duration-300 ease-in-out border-t-4 border-gray-300 py-4">
<div id="header-container" class="max-w-7xl mx-auto p-6 flex items-center flex-wrap lg:flex-no-wrap relative">
<a href="{{ .Site.Home.Permalink }}" class="leading-10 text-3xl font-normal text-gray-600 flex flex-shrink-0 flex-grow">
{{ .Site.Title }}