@@ -55,7 +55,33 @@ pageLayout: page
5555 </div>
5656</div >
5757
58- <div class =" pixel-blast " aria-hidden =" true " ></div >
58+ <div class =" pixelblast-layer " aria-hidden =" true " >
59+ <ClientOnly >
60+ <PixelBlast
61+ class="pixelblast-canvas"
62+ variant="square"
63+ color="#5086a1"
64+ :speed="0.5"
65+ :pixel-size="4"
66+ :pattern-scale="2"
67+ :pattern-density="0.8"
68+ :edge-fade="0.5"
69+ :pixel-size-jitter="0"
70+ :antialias="true"
71+ :enable-ripples="true"
72+ :ripple-intensity-scale="1"
73+ :ripple-thickness="0.1"
74+ :ripple-speed="0.3"
75+ :liquid="false"
76+ :liquid-strength="0.1"
77+ :liquid-radius="1"
78+ :liquid-wobble-speed="4.5"
79+ :auto-pause-offscreen="true"
80+ :transparent="true"
81+ :noise-amount="0"
82+ />
83+ </ClientOnly >
84+ </div >
5985
6086<link rel =" preconnect " href =" https://fonts.googleapis.com " >
6187<link rel =" preconnect " href =" https://fonts.gstatic.com " crossorigin >
@@ -87,70 +113,18 @@ pageLayout: page
87113 z-index : 1 ;
88114}
89115
90- .pixel-blast {
116+ .pixelblast-layer {
91117 position : fixed ;
92118 inset : 0 ;
93- pointer-events : none ;
94119 z-index : 0 ;
95- background : radial-gradient (circle at 12% 22% , rgba (0 , 217 , 255 , 0.32 ), transparent 38% ),
96- radial-gradient (circle at 80% 12% , rgba (167 , 139 , 250 , 0.3 ), transparent 36% ),
97- radial-gradient (circle at 65% 78% , rgba (255 , 125 , 72 , 0.28 ), transparent 42% ),
98- radial-gradient (circle at 28% 70% , rgba (63 , 185 , 80 , 0.26 ), transparent 44% ),
99- radial-gradient (circle at 90% 65% , rgba (255 , 225 , 128 , 0.24 ), transparent 48% );
100- mix-blend-mode : normal ;
101- opacity : 1 ;
102- filter : saturate (115% ) brightness (105% );
120+ pointer-events : auto ;
121+ overflow : hidden ;
103122}
104123
105- .pixel-blast ::before ,
106- .pixel-blast ::after {
107- content : ' ' ;
124+ .pixelblast-layer :deep(.home-hero-effect-pixel-blast ) {
108125 position : absolute ;
109- top : 50% ;
110- left : 50% ;
111- width : 6px ;
112- height : 6px ;
113- background : var (--vp-c-brand-1 );
114- box-shadow : 12px -18px 0 rgba (0 , 217 , 255 , 0.65 ),
115- -24px 14px 0 rgba (167 , 139 , 250 , 0.65 ),
116- 30px 6px 0 rgba (255 , 125 , 72 , 0.6 ),
117- -32px -24px 0 rgba (63 , 185 , 80 , 0.6 ),
118- 8px 28px 0 rgba (255 , 225 , 128 , 0.6 ),
119- 48px -10px 0 rgba (0 , 217 , 255 , 0.4 ),
120- -14px -40px 0 rgba (167 , 139 , 250 , 0.5 ),
121- 60px 22px 0 rgba (63 , 185 , 80 , 0.45 ),
122- -54px 18px 0 rgba (255 , 125 , 72 , 0.5 ),
123- 20px -52px 0 rgba (255 , 225 , 128 , 0.55 ),
124- -64px -8px 0 rgba (0 , 217 , 255 , 0.45 ),
125- 72px -36px 0 rgba (167 , 139 , 250 , 0.35 ),
126- -78px 34px 0 rgba (63 , 185 , 80 , 0.35 ),
127- 34px 60px 0 rgba (255 , 125 , 72 , 0.35 ),
128- -20px 72px 0 rgba (0 , 217 , 255 , 0.35 );
129- opacity : 0.8 ;
130- transform : translate (-50% , -50% ) scale (0.55 );
131- animation : pixelBlast 6s linear infinite ;
132- filter : drop-shadow (0 0 10px rgba (0 , 217 , 255 , 0.3 ));
133- }
134-
135- .pixel-blast ::after {
136- animation-duration : 9s ;
137- animation-delay : -2s ;
138- opacity : 0.55 ;
139- filter : hue-rotate (28deg ) drop-shadow (0 0 12px rgba (167 , 139 , 250 , 0.28 ));
140- }
141-
142- @keyframes pixelBlast {
143- 0% {
144- transform : translate (-50% , -50% ) scale (0.45 ) rotate (0deg );
145- opacity : 0.9 ;
146- }
147- 60% {
148- opacity : 0.65 ;
149- }
150- 100% {
151- transform : translate (-50% , -50% ) scale (1.6 ) rotate (12deg );
152- opacity : 0.08 ;
153- }
126+ inset : 0 ;
127+ pointer-events : auto ;
154128}
155129
156130.avatar img {
@@ -208,7 +182,7 @@ pageLayout: page
208182
209183.tag {
210184 padding : 7px 10px ;
211- background : var (--vp-c-default -soft );
185+ background : var (--vp-c-bg -soft );
212186 border-radius : 8px ;
213187 font-size : 16px ;
214188 display : inline-flex ;
@@ -225,12 +199,18 @@ pageLayout: page
225199 font-size : 22px ;
226200 color : var (--vp-c-text-2 );
227201}
202+
228203.desc {
229204 font-size : 20px ;
230205 color : var (--vp-c-text-1 );
231206 padding-left : 16px ;
232207 border-left : 3px solid var (--vp-c-brand-1 );
233208}
209+
210+ .info > blockquote {
211+ background-color : var (--vp-c-bg-soft );
212+ }
213+
234214.hitokoto {
235215 margin : 0 ;
236216 font-size : 20px !important ;
@@ -247,7 +227,7 @@ pageLayout: page
247227 width : 50px ;
248228 height : 50px ;
249229 border-radius : 50% ;
250- background : var (--vp-c-default -soft );
230+ background : var (--vp-c-bg -soft );
251231 display : flex ;
252232 align-items : center ;
253233 justify-content : center ;
@@ -292,18 +272,20 @@ pageLayout: page
292272}
293273</style >
294274
295- <script >
296- (async function loadHitokoto () {
297- try {
298- const res = await fetch (' https://v1.hitokoto.cn/?encode=json&c=d&c=h&c=i' );
299- const data = await res .json ();
300- const el = document .getElementById (' hitokoto_text' );
301- if (el && data && data .hitokoto ) {
302- const from = data .from || data .from_who || ' 一言' ;
303- el .textContent = ` ${ data .hitokoto } — ${ from} ` ;
304- }
305- } catch (err) {
306- // 静默失败,保留占位文本
307- }
308- })();
275+ <script setup >
276+ import PixelBlast from ' @theme/background/PixelBlast.vue'
277+
278+ (async function loadHitokoto () {
279+ try {
280+ const res = await fetch (' https://v1.hitokoto.cn/?encode=json&c=d&c=h&c=i' );
281+ const data = await res .json ();
282+ const el = document .getElementById (' hitokoto_text' );
283+ if (el && data && data .hitokoto ) {
284+ const from = data .from || data .from_who || ' 一言' ;
285+ el .textContent = ` ${ data .hitokoto } — ${ from} ` ;
286+ }
287+ } catch (err) {
288+ // 静默失败,保留占位文本
289+ }
290+ })();
309291</script >
0 commit comments