Skip to content

Commit

Permalink
feat: Dodano numer wersji w stopce (#77)
Browse files Browse the repository at this point in the history
* Public version

* font

* Data
  • Loading branch information
Michał Miszczyszyn committed Dec 29, 2020
1 parent 811d51b commit b3f1c78
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_VERSION=${VERCEL_ENV}_${VERCEL_GIT_COMMIT_REF}_${VERCEL_GIT_COMMIT_SHA}
2 changes: 2 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Always validate the PR title, and ignore the commits
titleOnly: true
9 changes: 7 additions & 2 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -18,7 +20,10 @@ export const Footer = () => {
<a target="_blank" rel="noopener noreferrer">
Type of Web
</a>
</Link>
</Link>{' '}
<span aria-hidden={true} className={styles.version}>
{process.env.NEXT_PUBLIC_VERSION || ''} <time>{footerDate}</time>
</span>
</p>
</footer>
);
Expand Down
7 changes: 7 additions & 0 deletions components/Footer/footer.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit b3f1c78

Please sign in to comment.