Skip to content

Commit e4eace6

Browse files
committed
better background
1 parent 8f37bd7 commit e4eace6

3 files changed

Lines changed: 5 additions & 27 deletions

File tree

src/layouts/main-layout/Header.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import HeaderItem from "@/layouts/main-layout/HeaderItem.astro";
44
import { Image } from "astro:assets";
55
---
66

7-
<nav class="flex justify-between items-center h-32 container mx-auto">
7+
<nav class="flex justify-between items-center h-32 container mx-auto px-2">
88
<div class="h-full">
99
<a class="cursor-pointer" href="/">
1010
<Image

src/layouts/main-layout/MainLayout.astro

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import bgImage from "@/layouts/main-layout/black_twill.webp"; // Import here
23
import Header from "@/layouts/main-layout/Header.astro";
34
import "@/styles/global.css";
45
@@ -19,7 +20,7 @@ const baseTitle = "KyButler";
1920
<meta name="generator" content={Astro.generator} />
2021
<title>{title ? `${baseTitle} - ${title}` : baseTitle}</title>
2122

22-
<style is:global>
23+
<style is:global define:vars={{ bgUrl: `url(${bgImage.src})` }}>
2324
:root {
2425
--brand-red: #901f22;
2526
--brand-pink: #f3b9b9;
@@ -53,41 +54,18 @@ const baseTitle = "KyButler";
5354
body {
5455
min-height: 100vh;
5556
background-color: var(--brand-black);
57+
background-image: var(--bgUrl);
58+
background-repeat: repeat;
5659
color: var(--brand-white);
57-
font-family: sans-serif;
5860
}
5961

6062
.text-fugaz {
6163
font-family: "FugazOne", sans-serif;
6264
}
63-
64-
.texture-layer {
65-
position: fixed;
66-
inset: 0;
67-
z-index: -1;
68-
69-
width: 100vw;
70-
height: 100vh;
71-
72-
opacity: 0.15;
73-
pointer-events: none;
74-
filter: contrast(120%) brightness(100%);
75-
}
7665
</style>
7766
</head>
7867

7968
<body>
80-
<svg class="texture-layer" xmlns="http://www.w3.org/2000/svg">
81-
<filter id="noiseFilter">
82-
<feTurbulence
83-
type="fractalNoise"
84-
baseFrequency="0.6"
85-
numOctaves="3"
86-
stitchTiles="stitch"></feTurbulence>
87-
</filter>
88-
<rect width="100%" height="100%" filter="url(#noiseFilter)"></rect>
89-
</svg>
90-
9169
<Header />
9270

9371
<main class="relative z-10">
106 Bytes
Loading

0 commit comments

Comments
 (0)