From 84e941d50a0983558bc8b5ff43a2a4719726eca8 Mon Sep 17 00:00:00 2001 From: Grzegorz Korba Date: Tue, 12 Jul 2022 11:43:26 +0200 Subject: [PATCH] Ability to stick header to the top of the page If enabled, header with top menu will be always visible regardless of scrolling. --- assets/css/common/header.css | 8 ++++++++ layouts/partials/header.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 64894da4..9b9e523d 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -1,3 +1,11 @@ +header.header-sticky { + position: sticky; + top: 0; + width: 100%; + background: var(--theme); + z-index: 1000; +} + .nav { display: flex; flex-wrap: wrap; diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 4a7291e2..500c3b47 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -39,7 +39,7 @@ {{- end }} -
+