reformate divider to pixel

This commit is contained in:
ClovertaTheTrilobita 2026-07-18 16:32:27 +08:00
parent 2ac6091ab6
commit e7ba5f86b1
2 changed files with 29 additions and 17 deletions

View file

@ -2,28 +2,39 @@
<style> <style>
.divider { .divider {
display: block; --divider-red: var(--deep-red);
width: 100%; --divider-blue: var(--deep-blue);
height: 12px;
margin-bottom: 1rem; --px: 4px; /* 单个像素点大小 */
background: repeating-linear-gradient( --stripe: 16px; /* 每段斜纹横向长度 */
-45deg, --period: 64px; /* 一个完整重复周期 */
var(--deep-red) 0 14px, --row-pattern: linear-gradient(
transparent 14px 28px, 90deg,
var(--deep-blue) 28px 42px, var(--divider-red) 0 var(--stripe),
transparent 42px 56px transparent var(--stripe) calc(var(--stripe) * 2),
var(--divider-blue) calc(var(--stripe) * 2) calc(var(--stripe) * 3),
transparent calc(var(--stripe) * 3) calc(var(--stripe) * 4)
); );
width: 100%;
height: calc(var(--px) * 3);
margin-bottom: 1rem;
background:
var(--row-pattern) 0 0 / var(--period) var(--px) repeat-x,
var(--row-pattern) calc(-1 * var(--px)) calc(1 * var(--px)) /
var(--period) var(--px) repeat-x,
var(--row-pattern) calc(-2 * var(--px)) calc(2 * var(--px)) /
var(--period) var(--px) repeat-x,
var(--row-pattern) calc(-3 * var(--px)) calc(3 * var(--px)) /
var(--period) var(--px) repeat-x;
pointer-events: none; pointer-events: none;
} }
:global(html.dark) .divider, :global(html.dark) .divider,
:global(.dark) .divider { :global(.dark) .divider {
background: repeating-linear-gradient( --divider-red: #ff8a8a;
-45deg, --divider-blue: #9ecbff;
#ff8a8a 0 14px,
transparent 14px 28px,
#9ecbff 28px 42px,
transparent 42px 56px
);
} }
</style> </style>

View file

@ -148,6 +148,7 @@ const tags = data.tags;
.post-title { .post-title {
margin: 0; margin: 0;
font-family: font-family:
"Noto Sans SC",
system-ui, system-ui,
-apple-system, -apple-system,
BlinkMacSystemFont, BlinkMacSystemFont,