mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 07:18:57 +00:00
dd6d320654
* BREAKING CHANGE: refactor with Dart Sass (supplement to #741) * chore: update .gitignore to include .vercel and .env*.local * CI: add build script for Hugo site deployment on Vercel * CI: update build script for Hugo site deployment on Vercel * refactor: update SCSS layout styles and introduce page-style mixin * refactor: reorganize SCSS files and improve layout structure * refactor: rename copy button classes and update related styles
89 lines
2.0 KiB
SCSS
89 lines
2.0 KiB
SCSS
@use "sass:color";
|
|
@use "core/functions" as *;
|
|
@use "core/mixins" as *;
|
|
@use "override" 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%;
|
|
transform: 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;
|
|
}
|
|
}
|