Skip to content

Commit ce23126

Browse files
author
Turbo
committed
Add header + Footer, show posts from markdown
1 parent 184b3bc commit ce23126

File tree

27 files changed

+346
-102
lines changed

27 files changed

+346
-102
lines changed

data/post.md renamed to content/20181101-the-thirsty-crow.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Kaalu – the Thirsty Crow
33
author: Unknown
4+
cover: "1.jpg"
5+
date: "2018-11-01"
6+
category: "Moral story"
47
---
58

69
It was a hot summer day, and Kaalu the crow was very thirsty. He flew here and there looking for water. He saw a pot with water. He went close to the pot Kaalu saw that there was very little water in it. Kaalu could not reach the water.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Be the way you are
3+
author: P!nk
4+
cover: "1.jpg"
5+
date: "2017-03-01"
6+
category: "Moral story"
7+
---
8+
9+
A mom was driving her daughter home. The daughter said out of the blue, "Mama?"
10+
The mom said: "Yes"
11+
She said, "I'm the ugliest girl I know."
12+
The mom could not believe in what she hears. But she didn't say anything. Instead she went home made a Powerpoint presentation for her daughter. And, in that presentation, were androgynous rockstars and artists that live their truth, are probably made fun of every day of their life, and carry on, wave their flag, and inspire others.
13+
There are Michael Jackson and David Bowie and Freddie Mercury and Annie Lennox and Prince and Janis Joplin and George Michael, Elton John and many more artists, and the daughter's eyes glazed over.
14+
The mom then said, 'You know, I really wanna know why you feel this way about yourself.'
15+
The daughter said, 'Well I look like a boy,'
16+
and the mom said, 'Well what do you think I look like?'
17+
'Well you're beautiful.'
18+
'Well, thanks. But when people make fun of me, that's what they use. They say I look like a boy or I'm too masculine or I have too many opinions, my body is too strong.'
19+
The mom said again to the daughter, 'Do you see me growing my hair?' She said, 'No, Mama.' I said, 'Do you see me changing my body?' 'No, Mama.' 'Do you see me changing the way I present myself to the world?' 'No, Mama.' 'Do you see me selling out arenas all over the world?' 'Yes, Mama.' **'OK! So, baby girl. We don't change. We take the gravel and the shell and we make a pearl. And we help other people to change so they can see more kinds of beauty.'**
20+
21+
The story is told by P!nk in the MTV Video Music Award ceremony about how she teach her daughter. That maybe something for us to learn as well.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: If you want to go far
3+
author: Turbo
4+
cover: "cover.jpg"
5+
date: "2018-11-08"
6+
category: "Quotes"
7+
---
8+
9+
I heard Afrian proverb says this: “If you want to go quickly, go alone. If you want to go far, go together.” 
10+
11+
Imagine you are building a business, and you wonder if you should have a partner or solely take care of everything. With partner or partners, there may come questions:
12+
* What if he argue with my decisions?
13+
* What if he does not devote to this business?
14+
* What if I have to work much more than him?
15+
Now, what if all questions are true down the road? Then you better go alone initially, establishing the foundation, hire people with skills you need and ask for partner when the company is stable. That will make your journey starts much faster. But achieving a certain business success is not everything.
16+
17+
We as human, according to Simon Sinek, are social animal. We are not the strongest, the fastest, yet we are the longest species that survive, that is because we know how to help and build for each others. 
18+
19+
There are too much things to bear in the world, even with our strongest man. That is where we need more people, to hold hand together, to continue generation after generation, term after term, sprint after sprint. A business which last long is an organization who knows how to connect people, inspire employees so they feel protected and do their best for the business.
20+
21+
So you want to thrive, you have to inspire the people around you to believe in you, believe in your vision and work towards that vision. 
22+
 If you want to go quickly, go alone. If you want to go far, go together.
23+
24+
And that is the lesson for today.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"react-dom": "^16.7.0",
4848
"react-helmet": "^5.2.0",
4949
"react-hot-loader": "^4.6.3",
50+
"react-redux-loading-bar": "^4.1.0",
5051
"react-router": "^4.3.1",
5152
"react-router-dom": "^4.3.1",
5253
"react-universal-component": "^3.0.3",

src/App/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import universal from 'react-universal-component';
33
import { Route, Switch } from 'react-router';
44
import Header from 'src/Components/Header';
5-
import Head from 'src/Components/Head';
5+
import Footer from 'src/Components/Footer';
66
import Loading from 'src/Components/Loading';
77
import { RedirectWithStatus } from 'src/Components/SSR';
88

@@ -13,7 +13,6 @@ const UniversalComponent = universal(props => import(`../Pages/${props.page}`),
1313

1414
export default ({ lang }) => (
1515
<React.Fragment>
16-
<Head />
1716
<Header lang={lang} />
1817

1918
<Switch>
@@ -25,14 +24,14 @@ export default ({ lang }) => (
2524

2625
<Route
2726
exact
28-
path="/:lang/about"
29-
render={routeProps => <UniversalComponent page="About" {...routeProps} />}
27+
path="/:lang/login"
28+
render={routeProps => <UniversalComponent page="Login" {...routeProps} />}
3029
/>
3130

3231
<Route
3332
exact
34-
path="/:lang/login"
35-
render={routeProps => <UniversalComponent page="Login" {...routeProps} />}
33+
path="/:lang/books"
34+
render={routeProps => <UniversalComponent page="Books" {...routeProps} />}
3635
/>
3736

3837
<Route
@@ -50,6 +49,7 @@ export default ({ lang }) => (
5049
<Route render={routeProps => <UniversalComponent page="404" {...routeProps} />} />
5150
</Switch>
5251

52+
<Footer />
5353
{/* Footer here */}
5454
</React.Fragment>
5555
);

src/Components/CardBox/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import styled from 'styled-components';
2+
import { Card } from 'rebass';
3+
4+
const CardBox = styled(Card)`
5+
color: ${props => props.theme.colors.black};
6+
box-shadow: ${props => props.theme.boxShadows[1]};
7+
`;
8+
9+
export default CardBox;

src/Components/Footer/index.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
import { Image, Box } from 'rebass';
4+
import FlexBox from 'src/Components/FlexBox';
5+
import { TextBlock } from 'src/Components/Typo';
6+
7+
const imagePath = require('src/assets/images/full-logo.svg');
8+
9+
const BoxWithFooter = Box.withComponent('footer');
10+
11+
const StyledFooter = styled(BoxWithFooter)`
12+
width: 100%;
13+
min-height: max-content;
14+
position: absolute;
15+
bottom: 0;
16+
color: ${props => props.theme.colors.black};
17+
background: ${props => props.theme.colors.oldPaperDarker};
18+
box-shadow: ${props => props.theme.boxShadows[0]};
19+
`;
20+
21+
const Footer = () => (
22+
<StyledFooter py={[2, 3, 4]} px={[3, 4, 5]}>
23+
<FlexBox>
24+
<Image src={imagePath} alt="Brightizen" width="100px" />
25+
26+
<TextBlock color="black">
27+
Copyright © 2018 Brightizen
28+
</TextBlock>
29+
</FlexBox>
30+
</StyledFooter>
31+
);
32+
33+
export default Footer;

src/Components/FormElements/Input/InputField/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import PropTypes from 'prop-types';
4-
import Container from 'src/Components/Container';
4+
// import Container from 'src/Components/Container';
55

66
const arrowDown = 'static/icons/arrow_solid_black.svg';
77

8-
const StyledInputField = styled(Container)`
8+
const StyledInputField = styled.input`
99
appearance: none;
1010
outline: 0;
1111
flex-grow: 1;
1212
box-shadow: none;
13-
border-radius: ${props => props.theme.radius[1]};
13+
border-radius: ${props => props.theme.radius[1]}px;
1414
padding: ${props => props.theme.space[2]}px;
15-
border: 1px solid ${props => props.theme.colors.secondary};
15+
border: 1.2px solid ${props => (props.isShow ? props.theme.colors.danger : props.theme.colors.primary)};
1616
1717
&::placeholder {
1818
color: ${props => props.theme.colors.grey};
1919
}
2020
2121
&:focus {
22-
border: 1.2px solid ${props => props.theme.colors.primary};
22+
border: 1.2px solid ${props => props.theme.colors.info};
2323
transition: all .3s ease-out;
2424
}
2525
@@ -52,12 +52,12 @@ const StyledInputField = styled(Container)`
5252
}
5353
`;
5454

55-
const StyledContainerInput = StyledInputField.withComponent('input');
55+
// const StyledContainerInput = StyledInputField.withComponent('input');
5656

5757
const InputField = ({
5858
id, placeholder, type, ...rest
5959
}) => (
60-
<StyledContainerInput id={id} placeholder={placeholder} type={type} {...rest} />
60+
<StyledInputField id={id} placeholder={placeholder} type={type} {...rest} />
6161
);
6262

6363
InputField.defaultProps = {

src/Components/FormElements/Input/Label/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import PropTypes from 'prop-types';
4-
import { TextBlock } from 'src/Components/Typo';
4+
import { Text } from 'rebass';
55

66
const Label = ({
77
id, label, children, ...rest
@@ -12,9 +12,10 @@ const Label = ({
1212
</StyledLabel>
1313
);
1414

15-
const TextBlockLabel = TextBlock.withComponent('label');
15+
const TextWithLabel = Text.withComponent('label');
1616

17-
const StyledLabel = styled(TextBlockLabel)`
17+
const StyledLabel = styled(TextWithLabel)`
18+
font-family: ${props => props.theme.fonts.body};
1819
display: flex;
1920
flex-direction: column;
2021
width: 100%;

src/Components/FormElements/Input/Validation/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import PropTypes from 'prop-types';
4+
import { Span } from 'src/Components/Typo';
45

56
const FormValidation = ({
67
isShow, messageType, message, ...rest
@@ -10,14 +11,14 @@ const FormValidation = ({
1011
</StyledFormValidation>
1112
);
1213

13-
const StyledFormValidation = styled.span`
14+
const StyledFormValidation = styled(Span)`
1415
width: 100%;
1516
display: ${props => (props.isShow ? 'block' : 'none')};
1617
color: ${props => (props.messageType ? props.theme.colors[props.messageType] : props.theme.colors.black)};
1718
font-weight: normal;
18-
font-size: ${props => props.theme.halfBaseline * 3}px;
19+
font-size: ${props => props.theme.fontSizes[1]}px;
1920
line-height: 1;
20-
margin-top: ${props => props.theme.halfBaseline * 3}px;
21+
margin-top: 7px;
2122
`;
2223

2324
FormValidation.defaultProps = {

0 commit comments

Comments
 (0)