Skip to content

Commit c959609

Browse files
feat: 添加水印颜色变量并在主题中应用
Signed-off-by: wangsimiao1 <wangsimiao1@xiaomi.com>
1 parent a59cc06 commit c959609

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

_sass/base/_base.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,25 @@ mjx-container {
462462

463463
#main-wrapper {
464464
position: relative;
465+
overflow: hidden;
466+
467+
&::after {
468+
content: 'MickeyMiao\'s Blog';
469+
position: fixed;
470+
top: 50%;
471+
left: 50%;
472+
transform: translate(-50%, -50%) rotate(-18deg);
473+
font-size: clamp(6rem, 12vw, 14rem);
474+
font-family: 'Lato', 'Source Sans Pro', sans-serif;
475+
font-weight: 900;
476+
font-style: italic;
477+
letter-spacing: 0.04em;
478+
white-space: nowrap;
479+
color: var(--watermark-color, rgba(0, 0, 0, 0.03));
480+
pointer-events: none;
481+
user-select: none;
482+
z-index: 0;
483+
}
465484

466485
@include mx.pl-pr(0);
467486

_sass/themes/_dark.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
--topbar-text-color: var(--text-color);
4949
--search-border-color: #3A3632;
5050
--search-icon-color: #6A6560;
51+
52+
/* Watermark */
53+
--watermark-color: rgba(255, 255, 255, 0.03);
5154
--input-focus-border-color: #C4956E;
5255

5356
/* Home page */

_sass/themes/_light.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
--search-icon-color: #B8B0A8;
4848
--input-focus-border-color: #B07D62;
4949

50+
/* Watermark */
51+
--watermark-color: rgba(0, 0, 0, 0.03);
52+
5053
/* Home page */
5154
--post-list-text-color: #6B6B6B;
5255
--btn-patinator-text-color: #5A5A5A;

0 commit comments

Comments
 (0)