-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Expand file tree
/
Copy pathindex.js
More file actions
76 lines (67 loc) · 2.22 KB
/
index.js
File metadata and controls
76 lines (67 loc) · 2.22 KB
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
75
76
import React from 'react';
import { useTranslation } from 'react-i18next';
import i18n from 'i18next';
import { Banner } from '../Banner/Banner';
import { BodyText } from '../BodyText/BodyText';
import Element from '../Element/Element';
import { Image } from './../Image/Image';
import Layout from '../layout';
import { PartBanner } from '../PartBanner/PartBanner';
import SEO from '../seo';
import content from '../../content/pages/about.json';
import landingImage from '../../images/landing.svg';
import mainSEOdescription from '../../content/seo/mainSEOdescription';
import mainSEOtags from '../../content/seo/mainSEOtags';
const AboutPage = ({ title, lang }) => {
const { t } = useTranslation();
const { intro } = content[lang] || content.en;
const seoDescription = mainSEOdescription[lang] || mainSEOdescription.en;
const isRtl = i18n.dir() === 'rtl'
return (
<Layout>
<SEO
lang={lang}
title={title}
description={seoDescription}
keywords={[
...mainSEOtags,
'Avoin yliopisto',
'Full stack harjoitustyö',
]}
/>
<Banner style={{ paddingBottom: 0, overflow: 'hidden' }}>
<div
style={{
display: 'flex',
justifyContent: 'center',
marginBottom: '-70px',
}}
className="container"
>
<Image
className={`col-4 ${isRtl ? 'push-left-2' : 'push-right-2'}`}
contain
style={{ margin: 0 }}
alt="Stacked cubes with React logo and JavaScript text"
src={landingImage}
/>
</div>
</Banner>
<Element className="container spacing spacing--mobile--large">
<Element className={`col-8 ${isRtl ? 'push-left-1' : 'push-right-1'}`}>
<BodyText
heading={{ level: 'h1', title: t('aboutPage:generalTitle') }}
headingFontSize="2.3rem"
/>
<Element flex spaceBetween>
<div className="col-10 spacing--after">
<BodyText text={intro} className="link" headingFont />
</div>
</Element>
</Element>
</Element>
<PartBanner lang={lang} />
</Layout>
);
};
export default AboutPage;