diff --git a/css/animation.css b/css/animation.css new file mode 100644 index 00000000..347faca7 --- /dev/null +++ b/css/animation.css @@ -0,0 +1,9 @@ +@keyframes appear { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} diff --git a/css/background.css b/css/background.css index 41fba018..45cb6e87 100644 --- a/css/background.css +++ b/css/background.css @@ -35,13 +35,3 @@ pointer-events: none; display: block; } - -@keyframes appear { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } -} diff --git a/css/base.css b/css/base.css index cd7a0104..dd3fc73f 100644 --- a/css/base.css +++ b/css/base.css @@ -41,6 +41,10 @@ --z-index-shade: 5000; --z-index-modal: 6000; --z-index-menu: 7000; + --header-shade-color: transparent; + --header-shade-opacity: none; + --header-height: 0; + --header-shade-padding: 4; --background-image: none; --background-opacity: 1; --background-accent-opacity: 0; diff --git a/css/header.css b/css/header.css index 389729da..d162d232 100644 --- a/css/header.css +++ b/css/header.css @@ -1,5 +1,7 @@ .header { + padding: calc(var(--gutter) * var(--header-shade-padding)) 0; width: 100%; + position: relative; z-index: var(--z-index-header); } @@ -7,22 +9,44 @@ position: fixed; top: 0; left: 0; - transition: background-color var(--animation-speed-slow) ease-in-out; } -.header-background { - background-color: rgba(var(--gray-01), 0.95); +.header .header-shade, +.header .header-border { + content: ""; + display: block; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + pointer-events: none; +} + +.is-header-shade-style-scroll .header .header-shade { + transition: background-color var(--animation-speed-fast) ease-in-out; + animation: none; +} + +.is-header-shade-show .header .header-shade { + background-color: rgb(var(--header-shade-color)); + opacity: var(--header-shade-opacity); +} + +.is-header-shade-border-top .header .header-border { + border-top: var(--line-width) solid rgb(var(--accent)); +} + +.is-header-shade-border-bottom .header .header-border { + border-bottom: var(--line-width) solid rgb(var(--accent)); } .header-area { - margin: calc(var(--gutter) * 4) calc(var(--gutter) * -1); + margin: 0 calc(var(--gutter) * -1); display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; - /* display: grid; */ - /* grid-template-columns: auto 1fr auto auto auto; */ - /* grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); */ } .header-item { diff --git a/css/link.css b/css/link.css index 0d34bbf7..07fce62a 100644 --- a/css/link.css +++ b/css/link.css @@ -1,9 +1,11 @@ .link { margin-bottom: 2em; + margin-top: var(--header-height); width: 100vw; position: relative; z-index: var(--z-index-link); display: none; + /* transition: margin-top var(--animation-speed-fast) ease-in-out; */ } .is-bookmarks-show-link .link { diff --git a/index.html b/index.html index cfd5880e..0e4b25f3 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@
Available when Bookmarks are not shown.