Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26c54ef

Browse files
committed
feat(home): add grid pattern
1 parent e633de9 commit 26c54ef

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

src/pages/index.astro

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ const paddedStamps = Array(copies).fill(stamps).flat();
380380
}
381381

382382
.panel-left { flex: 0 0 17%; }
383-
383+
384384
/* Same bar as the subheaders, sitting at the top of the left panel.
385385
Empty for now, it will carry the nav label. */
386386
.panel-nav {
@@ -414,11 +414,27 @@ const paddedStamps = Array(copies).fill(stamps).flat();
414414

415415
/* Gradient*/
416416
.panel {
417-
background: linear-gradient(
417+
--panel-gradient: linear-gradient(
418418
to bottom,
419419
rgba(101, 146, 190, 0.95) 0%,
420420
rgba(84, 130, 174, 0.95) 100%
421421
);
422+
background: var(--panel-gradient);
423+
}
424+
425+
.panel.panel-center {
426+
--grid-cell: 15px;
427+
--dot-pitch: 2.5px;
428+
--dot-r: 0.9px;
429+
--dot-color: rgba(32, 46, 70, 0.15);
430+
background-image:
431+
radial-gradient(circle, var(--dot-color) var(--dot-r), transparent var(--dot-r)),
432+
radial-gradient(circle, var(--dot-color) var(--dot-r), transparent var(--dot-r)),
433+
var(--panel-gradient);
434+
background-size:
435+
var(--grid-cell) var(--dot-pitch),
436+
var(--dot-pitch) var(--grid-cell),
437+
auto;
422438
}
423439

424440
/* ── Mobile overrides ─────────────────────────────────────────────────────
@@ -479,6 +495,12 @@ const paddedStamps = Array(copies).fill(stamps).flat();
479495
font-size: 28px;
480496
}
481497

498+
.panel.panel-center {
499+
--grid-cell: calc(7px / var(--scale));
500+
--dot-pitch: calc(2px / var(--scale));
501+
--dot-r: calc(0.7px / var(--scale));
502+
}
503+
482504
/* Counter the global scale so the about text renders at a constant
483505
real size on phones, same trick as the 404 card */
484506
.panel-content {

0 commit comments

Comments
 (0)