Files
FixIt/assets/css/_page/_home.scss
T
Cell 3926cc0220 refactor: reorganize CSS structure and standardize CSS variable usage for improved maintainability (#690)
* refactor: CSS variables to use fixit-var for consistency across styles

* refactor: reorganize CSS structure and consolidate imports for improved maintainability

* refactor: unify CSS variable usage and improve structure across stylesheets

* refactor: standardize CSS variable usage for layout

* refactor: standardize CSS variable usage for archive and special pages

* refactor: standardize CSS variable usage for single page

* refactor: standardize CSS variable usage for widgets

* refactor(css): refactors the border-radius mixin and adds the .rounded-full utility class

* refactor: standardize z-index usage across components

* refactor(css): removes deprecated compatibility mixins and replaces them with native CSS properties

* feat: unify color variable naming and update theme color values

- Rename `global-font-secondary-color` to `global-placeholder-color` for more accurate description of its purpose
- Update multiple style references to use the new `secondary` theme color variable
- Update theme color mapping to the new color values ​​for improved visual consistency
- Fixed the use of search box placeholder colors and removed hard-coded transparency values
- Added color preview test documentation for easier verification of color rendering
- Cleaned up some duplicate dark mode styles and replaced them with unified CSS variables

* refactor: remove the `hr-background-color` variable and uses `global-border-color` uniformly

* feat(CSE): add dark theme style to Google CSE search box and results container

* fix(task-lists): fixed styling and rendering issues with nested task lists
2026-02-28 17:24:10 +08:00

163 lines
2.9 KiB
SCSS

.home {
.home-profile {
text-align: center;
.home-avatar {
padding: 0.5rem;
img {
display: inline-block;
width: 8rem;
height: auto;
margin: 0 auto;
box-shadow: 0 0 0 0.3618em rgba(0, 0, 0, 0.05);
transition: all 0.4s ease;
@include border-radius(full);
[data-theme=dark] & {
box-shadow: 0 0 0 0.3618em rgba(255, 255, 255, 0.05);
}
&:hover {
position: relative;
transform: translateY(-0.75rem);
}
}
}
.home-title {
font-size: 1.25rem;
font-weight: bold;
margin: 0;
&:not(:empty) {
padding: 0.5rem;
}
}
.home-subtitle {
font-size: 1rem;
font-weight: normal;
margin: 0;
padding: 0.5rem;
}
.links {
padding: 0.5rem;
font-size: 1.5rem;
a * {
vertical-align: text-bottom;
}
img {
height: 1.5rem;
padding: 0 0.25rem;
}
}
.home-disclaimer {
font-size: 1rem;
line-height: 1.5rem;
font-weight: normal;
margin: 0;
padding: 0.5rem;
color: fixit-var(secondary);
}
}
}
.home.posts {
.home-profile {
padding: 2rem 0;
}
.home-avatar img {
width: 6rem;
}
.summary {
padding-block: 1rem;
color: fixit-var(global-font-color);
&:not(:last-of-type)::after {
content: '';
position: absolute;
width: 100%;
padding: 1.5px;
transform: translateY(18px);
background: repeating-linear-gradient(
135deg,
fixit-var(global-border-color) 0px,
fixit-var(global-border-color) 4px,
transparent 4px,
transparent 8px
);
}
&:first-of-type {
padding-top: 0;
}
.featured-image-preview {
width: 100%;
// use the same proportions as the cover image of https://dev.to/
aspect-ratio: auto 1000 / 420;
position: relative;
margin: 0.6rem auto;
transition: transform 0.4s ease;
img {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
object-fit: cover;
}
&:hover {
transform: scale(1.01);
}
}
.single-title {
font-size: 1.25rem;
line-height: 140%;
margin: 0.4rem 0;
}
.content {
margin-top: 0.3rem;
color: fixit-var(global-placeholder-color);
@include link(false, true);
b,
strong {
color: fixit-var(global-placeholder-color);
}
}
.post-footer {
margin-block: 0.4rem 0;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
@include link(false, false);
.post-tags {
padding: 0;
@include link(true, true);
.post-tag:not(:last-child)::after {
content: ',';
margin-right: 0.25rem;
}
}
}
}
}