Update CSS imports and Dockerfile for consistent styles handling
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- Enforced `!important` for `--color-background` in `variables.css`.
- Centralized CSS imports in `Layout.astro` for cleaner markup.
- Adjusted Dockerfile to ensure CSS variables are copied to `public/styles`.
- Refined fallback handling in `index.css` for `background-color`.
This commit is contained in:
2025-07-23 21:57:33 +02:00
parent 535c82bd81
commit 3a3a36e2ea
5 changed files with 8 additions and 5 deletions

1
.idea/Gallus_Pub.iml generated
View File

@ -8,6 +8,5 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="font-awesome" level="application" />
</component>
</module>

View File

@ -4,6 +4,9 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
# Ensure CSS variables are present
RUN mkdir -p public/styles
RUN cp -r styles/* public/styles/ || true
RUN npm run build
FROM node:20-alpine AS production

View File

@ -3,6 +3,8 @@
import Header from "./Header.astro";
import Footer from "./Footer.astro";
import "../../styles/components/Layout.css"
import "../../styles/variables.css"
import "../../styles/index.css"
---
<!doctype html>
@ -14,8 +16,6 @@ import "../../styles/components/Layout.css"
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Gallus Pub</title>
<link rel="stylesheet" href="/styles/variables.css" />
<link rel="stylesheet" href="/styles/index.css" />
</head>
<body>

View File

@ -12,7 +12,8 @@ html {
body {
font-family: var(--font-family-primary), serif;
background-color: var(--color-background);
background-color: var(--color-background, #000000);
background: #000000;
color: var(--color-text);
line-height: var(--line-height);
}

View File

@ -1,6 +1,6 @@
:root {
/* Colors */
--color-background: #000;
--color-background: #000000 !important;
--color-text: #f5f5f5;
--color-accent-green: #213b28;
--color-accent-beige: #ceb39b;