From b3f1c78d2e337b5188ce71ce3eb5986acee0ed7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miszczyszyn?= Date: Tue, 29 Dec 2020 17:45:27 +0100 Subject: [PATCH] feat: Dodano numer wersji w stopce (#77) * Public version * font * Data --- .env.production | 1 + .github/semantic.yml | 2 ++ components/Footer/Footer.tsx | 9 +++++++-- components/Footer/footer.module.scss | 7 +++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .env.production create mode 100644 .github/semantic.yml diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..b5d2fc70 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +NEXT_PUBLIC_VERSION=${VERCEL_ENV}_${VERCEL_GIT_COMMIT_REF}_${VERCEL_GIT_COMMIT_SHA} diff --git a/.github/semantic.yml b/.github/semantic.yml new file mode 100644 index 00000000..4168a3cd --- /dev/null +++ b/.github/semantic.yml @@ -0,0 +1,2 @@ +# Always validate the PR title, and ignore the commits +titleOnly: true diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index 6ac87dd1..d415ecac 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -2,7 +2,9 @@ import Link from 'next/link'; import styles from './footer.module.scss'; -const copyrightYear = new Date().getFullYear(); +const date = new Date(); +const footerDate = date.toISOString(); +const copyrightYear = date.getFullYear(); export const Footer = () => { return ( @@ -18,7 +20,10 @@ export const Footer = () => { Type of Web - + {' '} + + {process.env.NEXT_PUBLIC_VERSION || ''} +

); diff --git a/components/Footer/footer.module.scss b/components/Footer/footer.module.scss index 20c2e9b4..195b7fa8 100644 --- a/components/Footer/footer.module.scss +++ b/components/Footer/footer.module.scss @@ -8,3 +8,10 @@ padding-bottom: calc(0.75rem + constant(safe-area-inset-bottom)); padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); } + +.version { + font-size: 0.5em; + overflow-wrap: break-word; + display: block; + margin-top: 1em; +}