From f963a8993d0610fc45bfa2e21fb38e2040fc38b2 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 6 May 2024 08:02:07 +0000 Subject: [PATCH] feat: add page glow effect (#21) --- assets/css/document.css | 41 ++++++++++++++++++++++++++++++++++++-- assets/css/pages/index.css | 6 ++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/assets/css/document.css b/assets/css/document.css index ff7177c..ebd5489 100755 --- a/assets/css/document.css +++ b/assets/css/document.css @@ -33,6 +33,29 @@ body { font-size: 15px; } +body::before { + transition: 1s opacity; + content: ""; + position: absolute; + top: -5%; + right: 0; + width: 20%; + height: 5%; + border-radius: 100%; + z-index: 1000; + box-shadow: + 0 0 30svh 10svh rgba(var(--primer-color-accent), .2), + 0 0 30svh 60svh rgba(var(--primer-color-accent), .1), + 0 0 30svh 150svh rgba(var(--primer-color-accent), .02) + ; + opacity: 0; +} + +/* "enable" the corner glow effect on initial load when a page has been fully loaded */ +body[vv-page]::before { + opacity: 1; +} + body.search-dialog-open { overflow: hidden; } @@ -309,6 +332,20 @@ dialog.search search search-results > svg { /* # Size queries */ @media (min-width: 700px) { + /* # Cornerstones */ + + body::before { + right: unset; + left: 0; + box-shadow: + 0 0 30svh 10svh rgba(var(--primer-color-accent), .1), + 0 0 30svh 60svh rgba(var(--primer-color-accent), .05), + 0 0 30svh 150svh rgba(var(--primer-color-accent), .02) + ; + } + + /* ## Header */ + header { grid-template-columns: 1fr 250px var(--running-size); } @@ -318,9 +355,9 @@ dialog.search search search-results > svg { margin: 0 calc(var(--padding) / 2); } - /* # Menu */ + /* ### Menu */ - /* < Move the search box to the header */ + /* Move the search box to the header */ header searchbox { display: grid; } diff --git a/assets/css/pages/index.css b/assets/css/pages/index.css index 777db69..9c2c4e3 100755 --- a/assets/css/pages/index.css +++ b/assets/css/pages/index.css @@ -1,3 +1,9 @@ +/* # Overrides */ + +body[vv-page="/"]::before { + opacity: 0; +} + /* # Main styles */ /* ## Picture */