diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-21 19:01:18 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-22 12:52:35 +0100 |
| commit | d4045fbcbfa8208ec31539744417f315f1f6fad8 (patch) | |
| tree | 54746d3e28cc6e4a2d7d1e54a4b2e3e1e74a6896 /src/components/templates/layout/site-footer/site-footer.module.scss | |
| parent | c6212f927daf3c928f479afa052e4772216a2d8a (diff) | |
refactor(components): split Layout component in smaller components
The previous component was too long and hardly readable. So I splitted
it in different part and added tests.
Diffstat (limited to 'src/components/templates/layout/site-footer/site-footer.module.scss')
| -rw-r--r-- | src/components/templates/layout/site-footer/site-footer.module.scss | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/components/templates/layout/site-footer/site-footer.module.scss b/src/components/templates/layout/site-footer/site-footer.module.scss new file mode 100644 index 0000000..935c163 --- /dev/null +++ b/src/components/templates/layout/site-footer/site-footer.module.scss @@ -0,0 +1,42 @@ +@use "../../../../styles/abstracts/functions" as fun; +@use "../../../../styles/abstracts/mixins" as mix; + +.footer { + --navbar-size: #{fun.convert-px(80)}; + + display: flex; + flex-flow: column wrap; + gap: var(--spacing-xs); + place-items: center; + place-content: center; + padding: var(--spacing-md) 0 calc(var(--navbar-size) + var(--spacing-md)); + border-top: fun.convert-px(3) solid var(--color-border-light); + + @include mix.media("screen") { + @include mix.dimensions("sm") { + --navbar-size: 0px; + + flex-flow: row wrap; + font-size: var(--font-size-sm); + } + } +} + +.back-to-top { + position: fixed; + bottom: calc(var(--navbar-size, 0px) + var(--spacing-md)); + right: var(--spacing-md); + transition: all 0.4s ease-in 0s; + + &--hidden { + opacity: 0; + transform: translateY(calc(var(--button-height) + var(--spacing-md))); + visibility: hidden; + } + + &--visible { + opacity: 1; + transform: translateY(0); + visibility: visible; + } +} |
