1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
import { getLayout } from '@components/Layouts/Layout';
import ToC from '@components/ToC/ToC';
import { seo } from '@config/seo';
import { NextPageWithLayout } from '@ts/types/app';
import { loadTranslation } from '@utils/helpers/i18n';
import { GetStaticProps, GetStaticPropsContext } from 'next';
import Head from 'next/head';
import CVContent, { intro, meta, pdf, image } from '@content/pages/cv.mdx';
import PostHeader from '@components/PostHeader/PostHeader';
import { ArticleMeta } from '@ts/types/articles';
import styles from '@styles/pages/Page.module.scss';
import { CVPreview, SocialMedia } from '@components/Widget';
import { t } from '@lingui/macro';
import Sidebar from '@components/Sidebar/Sidebar';
const CV: NextPageWithLayout = () => {
const dates = {
publication: meta.publishedOn,
update: meta.updatedOn,
};
const pageMeta: ArticleMeta = {
dates,
};
return (
<>
<Head>
<title>{seo.cv.title}</title>
<meta name="description" content={seo.cv.description} />
</Head>
<article
className={`${styles.article} ${styles['article--no-comments']}`}
>
<PostHeader intro={intro} meta={pageMeta} title={meta.title} />
<aside className={styles.toc}>
<ToC />
</aside>
<div className={styles.body}>
<CVContent />
</div>
<Sidebar>
<CVPreview title={t`Other formats`} imgSrc={image} pdf={pdf} />
<SocialMedia
title={t`Open-source projects`}
github={true}
gitlab={true}
/>
</Sidebar>
</article>
</>
);
};
CV.getLayout = getLayout;
export const getStaticProps: GetStaticProps = async (
context: GetStaticPropsContext
) => {
const translation = await loadTranslation(
context.locale!,
process.env.NODE_ENV === 'production'
);
const breadcrumbTitle = meta.title;
return {
props: {
breadcrumbTitle,
translation,
},
};
};
export default CV;
|