Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dodano numer wersji w stopce #77

Merged
merged 3 commits into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}