Files
FixIt/assets/scss/pages/posts/_reward.scss
T
Cell 47247e01c5 refactor(assets): split SCSS into per-layout CSS bundles (#789)
- Restructure pages/ directory: shared/, posts/, specials/ modules
- Add per-layout entry points (home, posts, archives, search, friends, link)
- Include 404 and offline styles in main bundle
- Consolidate scss-vars.html with Internal and Appearance categories
- Simplify _variables.scss with @forward "hugo:vars"
- Extract CSS loading logic to base/head/css.html
- Update [params.appearance] with all configurable values
2026-06-23 17:19:51 +08:00

89 lines
2.0 KiB
SCSS

@use "sass:color";
@use "core/functions" as *;
@use "core/mixins" as *;
@use "variables" as *;
.single .post-reward {
padding: 1rem;
text-align: center;
&:has(.reward-ways:empty) {
display: none;
}
.comment {
margin: 0.5rem 0;
font-weight: 500;
}
.reward-ways {
display: none;
}
.reward-input:checked~.reward-ways {
display: block;
padding-top: 20px;
div {
display: inline-block;
user-select: none;
span {
display: block;
}
&:hover span[data-animation] {
animation: fi-var(animation-reward, jackInTheBox) 0.8s infinite linear;
// The animation may affect :hover of img in dark mode
pointer-events: none;
}
img {
display: inline-block;
margin: 0.8em 2em 0;
max-width: 100%;
width: fi-var(reward-img-width);
}
}
// `fixed` mode only supports desktop
&[data-mode='fixed'] {
position: fixed;
top: 50%;
left: 50%;
translate: -50% -50%;
padding: 1rem;
background-color: fi-var(global-background-color);
@include z-index(fixed);
@include border-radius;
box-shadow: 0 0 1.5rem 0 light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2));
}
}
.reward-button {
display: inline-block;
box-sizing: border-box;
cursor: pointer;
outline: none;
color: fi-var(reward-color, color.adjust($reward-color, $lightness: 5%));
border: 2px solid light-dark(color.adjust($reward-color, $lightness: 10%), color.adjust($reward-color, $lightness: 5%));
padding: 0.6rem 1rem;
background-color: fi-var(global-background-color);
vertical-align: text-top;
line-height: 1rem;
transition: all 0.3s ease-out;
@include border-radius;
&:active,
&:hover {
color: #ffffff;
border-color: fi-var(reward-color);
background-color: fi-var(reward-color);
}
}
@include media('print') {
display: none !important;
}
}