diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-05 15:43:08 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-05 15:43:33 +0200 |
| commit | 1cb220ef54ddaf635b322d8c24f38613f371285e (patch) | |
| tree | 8fa0445d9642b8774b7ecfeea5d45a244403d82d /apps/web-shared/src/styles | |
| parent | dccb6a5cf79699ed78bc3101f76c97b21f5a842e (diff) | |
| download | greatoffice-1cb220ef54ddaf635b322d8c24f38613f371285e.tar.xz greatoffice-1cb220ef54ddaf635b322d8c24f38613f371285e.zip | |
feat: New frontpage
Diffstat (limited to 'apps/web-shared/src/styles')
| -rw-r--r-- | apps/web-shared/src/styles/base/_breakpoints.scss | 20 | ||||
| -rw-r--r-- | apps/web-shared/src/styles/base/_util.scss | 2 | ||||
| -rw-r--r-- | apps/web-shared/src/styles/components/404.scss | 43 | ||||
| -rw-r--r-- | apps/web-shared/src/styles/components/responsive-sidebar.scss | 110 |
4 files changed, 166 insertions, 9 deletions
diff --git a/apps/web-shared/src/styles/base/_breakpoints.scss b/apps/web-shared/src/styles/base/_breakpoints.scss index a7f1eda..9b61af3 100644 --- a/apps/web-shared/src/styles/base/_breakpoints.scss +++ b/apps/web-shared/src/styles/base/_breakpoints.scss @@ -1,15 +1,19 @@ $breakpoints: ( - xs: 32rem, // ~512px - sm: 48rem, // ~768px - md: 64rem, // ~1024px - lg: 80rem, // ~1280px - xl: 90rem // ~1440px + xs: "768px", + sm: "768px", + md: "1200px", + lg: "1200px", + xl: "1600px" ) !default; @mixin breakpoint($breakpoint, $logic: false) { - @if( $logic ) { - @media #{$logic} and (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { @content; } + @if ($logic) { + @media #{$logic} and (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { + @content; + } } @else { - @media (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { @content; } + @media (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { + @content; + } } } diff --git a/apps/web-shared/src/styles/base/_util.scss b/apps/web-shared/src/styles/base/_util.scss index d688e1c..c384c2c 100644 --- a/apps/web-shared/src/styles/base/_util.scss +++ b/apps/web-shared/src/styles/base/_util.scss @@ -1250,7 +1250,7 @@ $breakpointsNr: length($breakpoints); [class^="translate"], [class*=" translate"], [class^="-scale"], [class*=" -scale"], [class^="scale"], [class*=" scale"], -[class^="-skew"], [class*=" -skew"] +[class^="-skew"], [class*=" -skew"], [class^="skew"], [class*=" skew"] { --translate: 0; --rotate: 0; diff --git a/apps/web-shared/src/styles/components/404.scss b/apps/web-shared/src/styles/components/404.scss new file mode 100644 index 0000000..1a0267a --- /dev/null +++ b/apps/web-shared/src/styles/components/404.scss @@ -0,0 +1,43 @@ +@use '../base' as *; + +.fof { +} + +.fof__animation { + svg { + display: block; + max-width: 520px; + margin-left: auto; + margin-right: auto; + } +} + +#i-fof-browser { + transform-origin: 260px 304px; + animation: i-fof-browser 4s infinite; +} + +#i-fof-shadow { + transform-origin: 282px 410px; + animation: i-fof-shadow 4s infinite; +} + +@keyframes i-fof-browser { + 0%, 100% { + transform: translateY(0) scale(1); + } + + 50% { + transform: translateY(-10%) scale(0.9); + } +} + +@keyframes i-fof-shadow { + 0%, 100% { + transform: scale(1); + } + + 50% { + transform: scale(0.8); + } +} diff --git a/apps/web-shared/src/styles/components/responsive-sidebar.scss b/apps/web-shared/src/styles/components/responsive-sidebar.scss new file mode 100644 index 0000000..29a45f4 --- /dev/null +++ b/apps/web-shared/src/styles/components/responsive-sidebar.scss @@ -0,0 +1,110 @@ +@use '../base' as *; + +/* -------------------------------- +File#: _1_responsive-sidebar +Title: Responsive Sidebar +Descr: Responsive sidebar container +Usage: codyhouse.co/license +-------------------------------- */ + +$maxwidth: 250px; + +.sidebar { + position: fixed; + top: 0; + left: 0; + z-index: var(--z-index-fixed-element, 10); + width: 100%; + height: 100%; + visibility: hidden; + + &::after { /* overlay layer */ + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: alpha(var(--color-black), 0); + z-index: 1; + } + + @include breakpoint(sm) { + visibility: visible; + position: relative; + z-index: 1; + width: 100%; + max-width: $maxwidth; + border-right: var(--border-width, 1px) var(--border-style, solid) hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), var(--border-o, 1)); + + .sidebar__header { + display: none; + } + + .sidebar__panel { + position: relative !important; + } + } + + .sidebar__panel { + position: absolute; + top: 0; + left: 0; + z-index: 2; + width: 100%; + height: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; + background-color: var(--color-bg); + } + + &.sidebar--right-on-mobile { + .sidebar__panel { + left: auto; + right: 0; + transform: translateX(100%); + } + } + + &.sidebar--is-visible { + visibility: visible; + + &::after { + background-color: alpha(var(--color-black), 0.55); + } + + .sidebar__panel { + transform: translateX(0); + box-shadow: var(--shadow-md); + } + } +} + +.sidebar__header { + display: flex; + align-items: center; + justify-content: space-between; + position: sticky; + top: 0; +} + +.sidebar__close-btn { + --size: 32px; + width: var(--size); + height: var(--size); + display: flex; + border-radius: 50%; + background-color: var(--color-bg-light); + box-shadow: var(--inner-glow), var(--shadow-sm); + flex-shrink: 0; + + .icon { + display: block; + margin: auto; + } + + &:hover { + background-color: var(--color-bg-lighter); + box-shadow: var(--inner-glow), var(--shadow-md); + } +} |
