Files
halo-theme-WarmIsland/src/styles/main.scss
T
nxxy335 a08782a959 fix: 修复记得页 500 与留言板裁切,统一页头,完善友链/瞬间/暗色/排版 (v1.1.12)
记得(/important-dates)
- 修复 500:th:classappend 里 BEM 类名 wi-id__car 的两个 __ 触发 Thymeleaf
  __...__ 预处理,提取片段含引号导致 Could not parse as expression;
  皮肤修饰类改为 wi-id-skin-cool/cute/neutral(表达式内不再出现 __)
- 牵挂的人卡片:倒计时改到右上角与日期卡片一致,生日一行显示不再折行;
  网格改为桌面三列 / 平板两列 / 手机一列
- 页头与订阅/记得统一(标题-副标题-强调线间距)

友链(/links)
- 再次消除两处 __ 预处理隐患:回执修饰类改 wi-links-check-ok/error,
  验证码 onerror 由 th:onerror="|...|" 改为普通静态属性(不参与表达式解析)
- 新增反链/可达性检测徽章:读取 link.status.verification,头像右下角
  绿点=访问正常(反链有效),红点=访问异常或未检测到反链,未检测不显示

留言板
- 移除 -124px 负 margin 补偿(头部卡片顶部被导航盖住的根因),
  装饰引号 top 改为正值不再被 overflow 裁掉

瞬间
- 修复九宫格失效根因:lightgallery 处理时把每张图包进 <a>,导致
  :has(:only-child) 恒真、全部图片退化为单列大图;改为直接把 img
  作为图库项(data-src),瀑布流样式同样补上 4 图 2x2 规则

全局
- 暗色模式配色调为偏中性暖灰(bg #1e1c1a / raised #292623),降低黄褐闷感,
  同步 theme-color 与依赖旧色值的变量
- 正文排版:p 字号 1.05~1.15rem、行高 1.85,H1~H6 逐级放大、层级更清晰

新增「文章组件」插件适配
- 新增 src/styles/_widgets.scss,将插件 --xhhao-com-* 变量映射到主题变量,
  明暗模式自动跟随
2026-09-27 10:09:28 +08:00

276 lines
4.3 KiB
SCSS

@use 'variables' as *;
@use 'mixins';
@use 'colors';
@use 'typography';
@use 'content';
@use 'spacing';
@use 'animations';
@use 'comment';
@use 'search';
@use 'lightgallery';
@use 'widgets';
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
min-width: 0;
}
html {
scroll-behavior: smooth;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
hanging-punctuation: first last;
}
body {
margin: 0;
padding: 0;
font-family: var(--font-body);
font-size: var(--text-base);
line-height: var(--leading-normal);
color: var(--ink);
background-color: var(--bg);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
word-wrap: break-word;
overflow-wrap: break-word;
overflow-x: hidden;
tab-size: 4;
}
::selection {
background-color: var(--accent);
color: var(--bg);
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--caramel);
border-radius: $border-radius-full;
}
::-webkit-scrollbar-thumb:hover {
background: var(--accent);
}
a {
color: var(--accent);
text-decoration: none;
transition: color var(--duration-fast) var(--ease-out-quart);
&:hover {
color: var(--accent-hover);
}
@include mixins.focus-visible;
}
img,
video,
svg {
max-width: 100%;
height: auto;
}
.wi-main img,
.wi-main video {
display: block;
}
img {
border-radius: $border-radius-md;
}
p {
margin-block-end: var(--space-md);
}
blockquote {
margin-block: var(--space-lg);
padding: var(--space-md) var(--space-lg);
border-left: 3px solid var(--accent);
color: var(--ink-2);
font-size: var(--text-md);
line-height: var(--leading-relaxed);
background: var(--bg-raised);
border-radius: 0 $border-radius-sm $border-radius-sm 0;
}
pre {
padding: var(--space-lg);
border-radius: $border-radius-md;
overflow-x: auto;
background: var(--ink);
color: #f8f8f2;
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
tab-size: 2;
@include mixins.hide-scrollbar;
}
code {
font-family: var(--font-mono);
font-size: 0.88em;
padding: 0.15em 0.4em;
background: var(--bg-raised);
border: 1px solid var(--rule);
border-radius: $border-radius-sm;
}
pre > code {
all: unset;
font-size: 0.9em;
color: inherit;
}
hr {
margin-block: var(--space-2xl);
border: none;
border-top: 1px solid var(--rule);
}
table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-sm);
overflow-x: auto;
display: block;
th,
td {
padding: var(--space-sm) var(--space-md);
border: 1px solid var(--rule);
text-align: left;
}
th {
background: var(--bg-raised);
font-weight: 600;
color: var(--ink);
}
td {
color: var(--ink-2);
}
}
.wi-container {
@include mixins.responsive-container;
}
.wi-section {
@include mixins.section-spacing;
}
.wi-sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
.wi-main {
padding-top: 100px;
padding-bottom: 0;
position: relative;
z-index: 1;
background-color: var(--bg);
width: 100%;
overflow-x: hidden;
}
.wi-main--wide.wi-main--home {
padding-top: 0;
padding-bottom: 0;
padding-inline: 0;
background-color: transparent;
max-width: 100%;
margin: 0;
overflow-x: hidden;
}
.wi-content-wrap {
max-width: 800px;
margin: 0 auto;
padding-inline: clamp(1rem, 3vw, 2rem);
overflow-x: hidden;
}
.wi-content-wrap--wide {
max-width: 1200px;
}
.wi-main--wide {
max-width: 1400px;
width: 100%;
margin: 0 auto;
}
/* 移动端优化 */
@media (max-width: 768px) {
body {
font-size: var(--text-base);
}
p {
margin-block-end: 1.2em;
}
.wi-content-wrap {
padding-inline: 1.25rem;
}
blockquote {
padding: var(--space-sm) var(--space-md);
font-size: var(--text-base);
}
pre {
padding: var(--space-md);
font-size: var(--text-sm);
}
}
@media (max-width: 480px) {
body {
font-size: var(--text-base);
}
.wi-content-wrap {
padding-inline: 1rem;
}
blockquote {
padding: var(--space-sm) var(--space-sm);
font-size: var(--text-base);
}
table {
font-size: var(--text-sm);
}
th,
td {
padding: var(--space-sm) var(--space-sm);
}
}