-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add badge page, add badge, fixed padding for landing page
Co-authored-by: My Hoa Tien <[email protected]>Relates #10
- Loading branch information
Showing
10 changed files
with
123 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
import styled from 'styled-components'; | ||
import React from 'react'; | ||
|
||
export const Img = styled.img` | ||
width: 80vw; | ||
height: 60vh; | ||
border: solid red 3px; | ||
`; | ||
|
||
const BadgeImage = styled.div``; | ||
|
||
const BadgeContainer = styled.div` | ||
border: 5px solid; | ||
padding: 2rem; | ||
border-radius: 50px; | ||
border-color: ${props => props.theme.borderColor}; | ||
`; | ||
|
||
const BadgeTitle = styled.h2` | ||
color: ${props => props.theme.badgeTextColor}; | ||
font-family: var(--title-font); | ||
margin-top: 0; | ||
`; | ||
|
||
export const Badge = ({ badgeType }) => { | ||
return ( | ||
<BadgeContainer> | ||
<BadgeTitle>{badgeType}</BadgeTitle> | ||
<BadgeImage className="badge" /> | ||
</BadgeContainer> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
:root { | ||
/* root colours and fonts go there */ | ||
/* light grey */ | ||
--color-1: hsl(225.8, 23.5%, 68.2%); | ||
|
||
/* mustard yellow */ | ||
--color-2: hsl(52.5, 65.4%, 47.6%); | ||
|
||
/* cyan */ | ||
--color-3: hsl(167.4, 67.3%, 55.7%); | ||
|
||
/* dark grey */ | ||
--color-4: hsl(224.2, 17.1%, 21.8%); | ||
|
||
/* white */ | ||
--color-5: hsl(0, 0%, 100%); | ||
|
||
--title-font: 'Orbitron', sans-serif; | ||
--info-font: 'Aldrich', sans-serif; | ||
} | ||
|
||
body { | ||
text-align: center; | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | ||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | ||
sans-serif; | ||
background-color: var(--color-4); | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
code { | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
monospace; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { ThemeProvider } from 'styled-components'; | ||
import { badgePageTheme } from './../components/themes'; | ||
import { H1, Text } from './../components/Text'; | ||
import { Badge } from './../components/Image'; | ||
import { Button } from './../components/Buttons'; | ||
|
||
const BadgePage = ({ alias, badgeType }) => { | ||
return ( | ||
<ThemeProvider theme={badgePageTheme}> | ||
<H1>You earned the badge!</H1> | ||
<Text>Well done {alias}!</Text> | ||
<Badge badgeType={badgeType} /> | ||
<Button>Accept</Button> | ||
</ThemeProvider> | ||
); | ||
}; | ||
|
||
export default BadgePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters