diff --git a/.env.example b/.env.example index 9093979..353936b 100644 --- a/.env.example +++ b/.env.example @@ -11,5 +11,5 @@ FROM_EMAIL=noreply@atash.dev TO_EMAIL=contact@atash.dev # Site Status -PUBLIC_STATUS_TEXT="Accepting new clients" -PUBLIC_STATUS_COLOR="green" # green, yellow, red +STATUS_TEXT="Accepting new clients" +STATUS_COLOR="green" # green, yellow, red diff --git a/docker-compose.yml b/docker-compose.yml index 3719bdf..0eef8fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,6 @@ services: SMTP_PASSWORD: ${SMTP_PASSWORD:-} FROM_EMAIL: ${FROM_EMAIL:-noreply@atash.dev} TO_EMAIL: ${TO_EMAIL:-} - PUBLIC_STATUS_TEXT: ${PUBLIC_STATUS_TEXT:-"Accepting new clients"} - PUBLIC_STATUS_COLOR: ${PUBLIC_STATUS_COLOR:-green} + STATUS_TEXT: ${STATUS_TEXT:-"Accepting new clients"} + STATUS_COLOR: ${STATUS_COLOR:-green} restart: unless-stopped diff --git a/src/components/sections/HeroSection.astro b/src/components/sections/HeroSection.astro index 9cd50aa..7c0d85b 100644 --- a/src/components/sections/HeroSection.astro +++ b/src/components/sections/HeroSection.astro @@ -2,11 +2,19 @@ import { siteConfig } from "../../config/site"; import { Icon } from "astro-icon/components"; +const statusText = process.env.STATUS_TEXT + ? process.env.STATUS_TEXT + : import.meta.env.STATUS_TEXT || "Accepting new clients"; + +const statusColorConfig = (process.env.STATUS_COLOR + ? process.env.STATUS_COLOR + : import.meta.env.STATUS_COLOR || "green") as "green" | "yellow" | "red"; + const statusColor = { green: "bg-success", yellow: "bg-warning", red: "bg-error", -}[siteConfig.hero.statusColor] || "bg-success"; +}[statusColorConfig] || "bg-success"; ---
@@ -19,7 +27,7 @@ const statusColor = { - {siteConfig.hero.status} + {statusText}

")}> diff --git a/src/config/site.ts b/src/config/site.ts index 64b5190..7b85256 100644 --- a/src/config/site.ts +++ b/src/config/site.ts @@ -40,8 +40,6 @@ export const siteConfig = { hero: { title: "Atash Consulting", - status: import.meta.env.PUBLIC_STATUS_TEXT || "Accepting new clients", - statusColor: (import.meta.env.PUBLIC_STATUS_COLOR || "green") as "green" | "yellow" | "red", mainTitle: "Building Digital Solutions That Drive Growth", description: "Software Consulting based in Edmonton, Alberta", subDescription: "Reliable, scalable solutions tailored to your business needs.",