Merge pull request 'Footer with environment, build, and hash' (#5) from website-content-updates into main
All checks were successful
Build and Test - Production / determine_version (push) Successful in 5s
Build and Test - Production / build_and_push (push) Successful in 47s
Build and Test - Production / test (push) Successful in 2s
Build and Test - Production / deploy_production (push) Successful in 2s

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2025-07-09 11:03:25 +00:00
5 changed files with 29 additions and 7 deletions

View File

@@ -16,10 +16,12 @@ FROM build-deps AS build
COPY . .
ARG REPO_VERSION_HASH
ARG BUILD_ENVIRONMENT
ARG PROJECT_VERSION
RUN echo $"PUBLIC_REPO_VERSION_HASH=${REPO_VERSION_HASH} \n\
PUBLIC_PROJECT_VERSION=${PROJECT_VERSION}" >> .env
RUN echo "PUBLIC_REPO_VERSION_HASH=\"${REPO_VERSION_HASH}\" \n\
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\" \n\
PUBLIC_PROJECT_VERSION=\"${PROJECT_VERSION}\"" >> .env
RUN npm run build
FROM httpd:latest AS runtime

View File

@@ -0,0 +1,5 @@
---
---
<footer class="flex justify-center items-center text-center">
{import.meta.env.PUBLIC_BUILD_ENVIRONMENT || "development"} | {import.meta.env.PUBLIC_REPO_VERSION_HASH || "invalid"}@{import.meta.env.PUBLIC_PROJECT_VERSION || "0.0.0"}
</footer>

9
src/env.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
interface ImportMetaEnv {
readonly PUBLIC_REPO_VERSION_HASH: string;
readonly PUBLIC_PROJECT_VERSION: string;
readonly PUBLIC_BUILD_ENVIRONMENT: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}

View File

@@ -1,20 +1,22 @@
---
import '../styles/global.css'
import Navbar from '../components/Navbar.astro';
import Footer from '../components/Footer.astro';
const pageTitle = Astro.props.title ? `${Astro.props.title} - Corwin Perren`: "Corwin Perren";
const pageTitle = Astro.props.title ? `${Astro.props.title} - Corwin Perren` : "Corwin Perren";
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{pageTitle}</title>
</head>
<body>
<Navbar />
<Navbar/>
<main style="padding: 2rem;">
<slot />
<slot/>
</main>
<Footer/>
</body>
</html>

View File

@@ -24,6 +24,10 @@ a {
white-space: nowrap;
}
footer {
border-top: 2px solid var(--color-caperren-green);
}
/*.astronav-dropdown .group {*/
/* background-color: black;*/
/*}*/