forked from rage/java-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Banner.js
60 lines (54 loc) · 1.57 KB
/
Banner.js
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
import React from "react"
import styled from "styled-components"
import CourseSettings from "../../course-settings"
import BannerImage from "../../banner.svg"
import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary"
const BannerWrapper = styled.header`
height: 30rem;
max-height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 2rem;
background-color: #c0392b;
background-image: url(${BannerImage});
text-align: center;
h1 {
}
h2 {
}
`
const Heading = styled.div`
font-family: "Roboto Slab", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, "Helvetica Neue", Arial, Noto Sans, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 500;
font-size: 2rem;
color: #c0392b;
background: white;
padding: 0.5rem;
margin: 1rem;
text-align: center;
@media only screen and (min-width: 720px) {
font-size: 3rem;
}
`
const SubHeading = styled.div`
font-family: 'Roboto Slab', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Helvetica Neue', Arial, Noto Sans, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-weight: 500;
color: #c0392b;
background: white;
padding .5rem;
font-size: 1.4rem;
margin: 0 1rem;
`
const Banner = () => (
<BannerWrapper>
<Heading>{CourseSettings.default.name}</Heading>
<SubHeading>{CourseSettings.default.subtitle}</SubHeading>
</BannerWrapper>
)
export default withSimpleErrorBoundary(Banner)