From 858a13f37b991c8a9f56575c6dd750aeb4a8f0f5 Mon Sep 17 00:00:00 2001 From: Niklas Widmann Date: Sun, 20 Aug 2023 19:34:02 +0200 Subject: [PATCH] more reponsive styling & git version in build --- .github/workflows/release-web.yml | 5 ++- web/apps/next/Dockerfile | 9 +++++ web/apps/next/analyze/nodejs.html | 39 ++++++++++++++++++++ web/apps/next/layout/Background.tsx | 4 +- web/apps/next/layout/Page.tsx | 1 + web/apps/next/pages/_app.tsx | 23 +++++++++++- web/apps/next/pages/index.tsx | 10 ++++- web/packages/ui/components/Footer.tsx | 12 ++++-- web/packages/ui/components/LinkBar.tsx | 7 +++- web/packages/ui/components/ResourceLinks.tsx | 10 ++--- web/packages/ui/components/SourceDisplay.tsx | 28 ++++++++++++++ web/packages/ui/styles/media.ts | 17 +++++++++ web/turbo.json | 24 +++++++++--- 13 files changed, 168 insertions(+), 21 deletions(-) create mode 100644 web/apps/next/analyze/nodejs.html create mode 100644 web/packages/ui/components/SourceDisplay.tsx create mode 100644 web/packages/ui/styles/media.ts diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index e89791e..9b4ca96 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -120,4 +120,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + REPOSITORY=${{ env.GITHUB_REPO }} + SHA=${{ github.sha }} + VERSION=${{ github.ref_name }} \ No newline at end of file diff --git a/web/apps/next/Dockerfile b/web/apps/next/Dockerfile index 0b9107a..f338695 100644 --- a/web/apps/next/Dockerfile +++ b/web/apps/next/Dockerfile @@ -31,6 +31,15 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install -r --workspace-ro # Build the project COPY --from=builder /app/out/full/ . + +ARG REPOSITORY +ARG SHA +ARG VERSION + +ENV NEXT_PUBLIC_GIT_REPOSITORY=$REPOSITORY +ENV NEXT_PUBLIC_GIT_SHA=$SHA +ENV NEXT_PUBLIC_GIT_VERSION=$VERSION + RUN pnpm turbo run build --filter=next... FROM base AS runner diff --git a/web/apps/next/analyze/nodejs.html b/web/apps/next/analyze/nodejs.html new file mode 100644 index 0000000..b951d15 --- /dev/null +++ b/web/apps/next/analyze/nodejs.html @@ -0,0 +1,39 @@ + + + + + + next [20 Aug 2023 at 18:10] + + + + + + + + +
+ + + \ No newline at end of file diff --git a/web/apps/next/layout/Background.tsx b/web/apps/next/layout/Background.tsx index c41cde5..22888ef 100644 --- a/web/apps/next/layout/Background.tsx +++ b/web/apps/next/layout/Background.tsx @@ -17,8 +17,8 @@ const Style = styled.section` top: 0; left: 0; position: fixed; - width: 100vw; - height: 100vh; + width: 100%; + height: 100%; filter: blur(0.5rem) brightness(0.75); `; diff --git a/web/apps/next/layout/Page.tsx b/web/apps/next/layout/Page.tsx index 89d04da..76fc10d 100644 --- a/web/apps/next/layout/Page.tsx +++ b/web/apps/next/layout/Page.tsx @@ -18,6 +18,7 @@ const Style = styled.section` position: relative; padding: 2rem; min-height: calc(100vh - ${FOOTER_HEIGHT}); + min-height: calc(100dvh - ${FOOTER_HEIGHT}); `; export default Page; diff --git a/web/apps/next/pages/_app.tsx b/web/apps/next/pages/_app.tsx index 98ae33f..f86e7fd 100644 --- a/web/apps/next/pages/_app.tsx +++ b/web/apps/next/pages/_app.tsx @@ -1,5 +1,6 @@ import type { AppProps } from "next/app"; import getConfig from "next/config"; +import Head from "next/head"; import NextImage from "next/image"; import NextLink from "next/link"; import { useRouter } from "next/router"; @@ -10,6 +11,8 @@ import Global from "ui/styles/global"; import "ui/styles/reset.css"; import ThemeProvider from "ui/styles/theme"; import dark from "ui/styles/theme/dark"; +import { Centered } from "ui/components/basic/Text"; +import SourceDisplay, { CIProps } from "ui/components/SourceDisplay"; const { publicRuntimeConfig } = getConfig(); @@ -34,15 +37,33 @@ const elementsContext: ElementsContext = { createImg, }; +/* eslint-disable turbo/no-undeclared-env-vars */ +const ciProps: CIProps = { + repository: process.env.NEXT_PUBLIC_GIT_REPOSITORY ?? "local", + sha: process.env.NEXT_PUBLIC_GIT_SHA, + version: process.env.NEXT_PUBLIC_GIT_VERSION ?? "dev", +}; +/* eslint-enable turbo/no-undeclared-env-vars */ + function MyApp({ Component, pageProps }: AppProps) { const router = useRouter(); return ( + + + -