mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
09e08d0772
**Breaking changes**: 1. Legacy custom style/script files are no longer loaded automatically. 2. Users must migrate custom files to: - `custom.scss` - `override.scss` - `_variables.scss` - `assets/js/custom.js` **Migration guide**: 1. Move `assets/css/_custom.scss` to `assets/scss/custom.scss`. 2. Move `assets/css/_override.scss` to `assets/scss/override.scss`. 3. Keep variables in `assets/scss/_variables.scss`. 4. Move `assets/js/_custom.js` to `assets/js/custom.js`. 5. Rebuild site and verify no deprecation warnings remain.
73 lines
1.5 KiB
SCSS
73 lines
1.5 KiB
SCSS
.fixed-buttons {
|
|
position: fixed;
|
|
right: 1.5rem;
|
|
bottom: 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
@include z-index(fixed, -10);
|
|
}
|
|
|
|
.fixed-button {
|
|
font-size: 1rem;
|
|
line-height: 1.5rem;
|
|
padding: 0.5rem 0.625rem;
|
|
color: fi-var(global-font-secondary-color);
|
|
transition: color 0.4s ease;
|
|
background-color: light-dark(#f1f1f1, #1e1e1f);
|
|
@include border-radius(full);
|
|
|
|
&:hover,
|
|
&:active,
|
|
&:focus {
|
|
outline: none;
|
|
color: fi-var(global-font-color);
|
|
}
|
|
|
|
@include media('print') {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
.back-to-top {
|
|
overflow: hidden;
|
|
position: relative;
|
|
@include set-fi-vars((
|
|
// Ring stroke width
|
|
b2t-stroke: 0.5rem,
|
|
// Progress color
|
|
b2t-prog: light-dark(fi-var(success), fi-var(global-font-color)),
|
|
// dasharray = circumference = 2πr
|
|
// dashoffset = circumference * (1 - scrollPercent / 100)
|
|
b2t-dasharray: 314.15
|
|
));
|
|
|
|
// SVG circular progress ring
|
|
svg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
// Rotate to start from top
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.bg {
|
|
fill: none;
|
|
stroke: fi-var(global-border-color-light);
|
|
stroke-width: fi-var(b2t-stroke);
|
|
}
|
|
|
|
// Progress ring
|
|
.progress {
|
|
fill: none;
|
|
stroke: fi-var(b2t-prog);
|
|
stroke-width: fi-var(b2t-stroke);
|
|
stroke-linecap: round;
|
|
stroke-dasharray: fi-var(b2t-dasharray);
|
|
stroke-dashoffset: calc(#{fi-var(b2t-dasharray)} * (1 - #{fi-var(b2t-progress, 0)} / 100));
|
|
transition: stroke-dashoffset .1s linear;
|
|
}
|
|
}
|