Skip to content

Commit 05139aa

Browse files
author
Turbo Thinh
committed
feat: open source the code
1 parent 5de606c commit 05139aa

23 files changed

+42
-51
lines changed

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# BRIGHTIZEN isomorphic web app implementation
1+
# SSR React with Express
22

3-
### Get started
4-
1. Prequisites
5-
* Node >=8.9.0
6-
* Use **Yarn** instead of **NPM** for consistency
3+
An isomorphic web app (SSR + CSR) to take note in Markdown.
74

8-
2. Up and running
9-
* Clone repo
10-
* `cd Brightizen-FE`
11-
* `yarn`
12-
* `yarn dev`
5+
## Prequisites
6+
- Node >=8.9.0
7+
- Use **Yarn** instead of **NPM** for consistency
8+
9+
## Getting started
10+
- Clone the repo
11+
- Run `yarn`
12+
- Run `yarn dev`
13+
- Head to `localhost:3000`

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "brightizen-react-ssr",
2+
"name": "note-smart-react-ssr",
33
"version": "1.0.0",
4-
"description": "Brightizen is where you can share and advocate big ideas from books you read.",
4+
"description": "NoteSmart is where you can share and advocate big ideas from books you read.",
55
"repository": "",
6-
"license": "UNLICENSED",
6+
"license": "MIT",
77
"scripts": {
88
"license-check": "license-checker --exclude 'MIT, MIT OR X11, BSD, ISC, Public Domain'",
99
"lint": "eslint .",

src/Components/Footer/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Image, Box } from 'rebass';
44
import { FlexBox } from 'src/Components/Layout';
55
import { Text } from 'src/Components/Typo';
66

7-
const imagePath = require('src/static/images/full-logo.svg');
7+
const imagePath = require('src/static/images/logo.svg');
88

99
const StyledFooter = styled(Box)`
1010
width: 100%;
@@ -19,10 +19,10 @@ const StyledFooter = styled(Box)`
1919
const Footer = () => (
2020
<StyledFooter as="footer" py={[2, 3, 4]} px={[3, 4, 5]}>
2121
<FlexBox>
22-
<Image src={imagePath} alt="Brightizen" width="100px" />
22+
<Image src={imagePath} alt="NoteSmart" width="100px" />
2323

2424
<Text color="black">
25-
Copyright © 2018 Brightizen
25+
Copyright © 2018 NoteSmart
2626
</Text>
2727
</FlexBox>
2828
</StyledFooter>

src/Components/HTML/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const Markup = ({
44
<!DOCTYPE html>
55
<html lang="${lang}">
66
<head>
7-
<title>Brightizen</title>
7+
<title>NoteSmart</title>
88
<meta charSet="utf-8" />
99
<meta name="theme-color" content="#FF6D00">
1010
${styles}

src/Components/Head/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Helmet } from 'react-helmet';
33
import PropTypes from 'prop-types';
4-
import favicon from 'src/static/images/favicon.png';
4+
import logo from 'src/static/images/logo.svg';
55

66
const isProd = process.env.NODE_ENV === 'production';
77

@@ -15,9 +15,9 @@ const Head = ({
1515
<meta property="og:title" content={title} />
1616
<meta property="og:description" content={desc} />
1717
<meta property="og:image" content={image} />
18-
<link rel="shortcut icon" type="image/x-icon" href={favicon} />
19-
<link rel="icon" sizes="192x192" href={favicon} />
20-
<link rel="apple-touch-icon-precomposed" href={favicon} />
18+
<link rel="shortcut icon" type="image/x-icon" href={logo} />
19+
<link rel="icon" sizes="192x192" href={logo} />
20+
<link rel="apple-touch-icon-precomposed" href={logo} />
2121
<link
2222
rel="manifest"
2323
href={`${isProd ? 'https://production/' : 'http://localhost:8080/'}manifest.json`}
@@ -28,8 +28,8 @@ const Head = ({
2828
);
2929

3030
Head.defaultProps = {
31-
title: 'Brightizen',
32-
desc: 'Brightizen is the book community',
31+
title: 'NoteSmart',
32+
desc: 'NoteSmart is the book community',
3333
image: 'https://i.imgur.com/lvzUVyf.jpg',
3434
children: undefined,
3535
};

src/Components/Header/Brand.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const StyledBrand = styled(Image)`
1919

2020
Brand.defaultProps = {
2121
to: '/',
22-
alt: 'Brightizen',
22+
alt: 'NoteSmart',
2323
};
2424

2525
Brand.propTypes = {

src/Components/Header/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2-
import { Anchor, NavLink } from 'src/Components/Navigation';
2+
import { NavLink } from 'src/Components/Navigation';
33
import PropTypes from 'prop-types';
44

5-
import logo from 'src/static/images/full-logo.svg';
5+
import logo from 'src/static/images/logo.svg';
66

77
import Head from 'src/Components/Head';
88
import { FlexBox } from 'src/Components/Layout';
@@ -23,12 +23,11 @@ const Header = ({ lang, ...rest }) => (
2323
alignItems="center"
2424
justifyContent="space-between"
2525
>
26-
<Brand to={`/${lang}`} src={logo} height="30px" />
26+
<Brand to={`/${lang}`} src={logo} height="60px" />
2727
<FlexBox alignItems="center" justifyContent="flex-end">
2828
<NavLink to={`/${lang}/posts`} mr={[1, 2, 3]}>Posts</NavLink>
2929
<NavLink to={`/${lang}/books`} mr={[1, 2, 3]}>Books</NavLink>
3030
<NavLink to={`/${lang}/login`} mr={[1, 2, 3]}>Login</NavLink>
31-
<Anchor href="https://www.facebook.com/brightizen" mr={0} newpage textColor>Fanpage</Anchor>
3231
</FlexBox>
3332
</FlexBox>
3433
</MainNav>

src/Pages/Login/index.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ const Login = () => (
66
<React.Fragment>
77
<Head title="Login" />
88
<Form width={[1, 1/2, 1/3]} mt={[3, 4, 5]}>
9-
<Input
10-
id="login-username"
11-
label="Username"
12-
width="100%"
13-
placeholder="Enter your username"
14-
mb={3}
15-
/>
16-
179
<Input
1810
id="login-email"
1911
label="Email"
@@ -30,8 +22,8 @@ const Login = () => (
3022
placeholder="Enter your password"
3123
type="password"
3224
isShow
33-
message="Wrong Password"
34-
messageType="danger"
25+
// message="Wrong Password"
26+
// messageType="danger"
3527
/>
3628
</Form>
3729
</React.Fragment>

src/Pages/Post/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Post extends React.Component {
4242
>
4343
<CardBox width={1} px={[1, 2, 3]} py={[0, 1, 2]} mx={[1, 2, 3]}>
4444
<Heading as="h3" dangerouslySetInnerHTML={{ __html: post.title }} />
45-
<Text as="span" dangerouslySetInnerHTML={{ __html: post.__content }} />
45+
<Text as="span" dangerouslySetInnerHTML={{ __html: post.__content }} color="black" />
4646
<FlexBox width={1}>
4747
<Badge bg="success" dangerouslySetInnerHTML={{ __html: post.category }} />
4848
<Text as="span" float="right" dangerouslySetInnerHTML={{ __html: post.date }} />

src/Pages/manifest.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Manifest = {
2-
name: 'Brightizen web app',
3-
short_name: 'Brightizen',
2+
name: 'NoteSmart web app',
3+
short_name: 'NoteSmart',
44
icons: [
55
{
66
src: 'https://i.imgur.com/j2UuUt7.png',

src/Pages/robots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Robots = `User-Agent: *
22
Allow: *
3-
Sitemap: https://brightizen.com/sitemap.xml`;
3+
Sitemap: https://noteSmart.com/sitemap.xml`;
44

55
export default Robots;

src/Pages/sitemap.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ const SiteMap = `<?xml version="1.0" encoding="UTF-8"?>
88
xmlns:xhtml="https://www.w3.org/1999/xhtml/"
99
>
1010
<url>
11-
<loc>https://brightizen/en</loc>
11+
<loc>https://noteSmart/en</loc>
1212
<lastmod>2018-09-07T20:22:04+00:00</lastmod>
1313
<priority>1.00</priority>
1414
</url>
1515
<url>
16-
<loc>https://brightizen/en/books</loc>
16+
<loc>https://noteSmart/en/books</loc>
1717
<lastmod>2018-12-30T20:22:04+00:00</lastmod>
1818
<priority>0.80</priority>
1919
</url>
2020
<url>
21-
<loc>https://brightizen/en/posts</loc>
21+
<loc>https://noteSmart/en/posts</loc>
2222
<lastmod>2018-12-30T20:22:04+00:00</lastmod>
2323
<priority>0.80</priority>
2424
</url>

src/i18n/en.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const English = {
22
language: {
3-
title: 'Welcome to Brightizen',
3+
title: 'Welcome to NoteSmart',
44
},
55
};
66

src/i18n/vi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Vietnamese = {
22
language: {
3-
title: 'Chào mừng đến với Brightizen',
3+
title: 'Chào mừng đến với NoteSmart',
44
},
55
};
66

src/server/express.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server.use(cookieParser());
1010

1111
const isProd = process.env.NODE_ENV === 'production';
1212
const isDev = !isProd;
13-
const PORT = process.env.PORT || 3005;
13+
const PORT = process.env.PORT || 3000;
1414
let isBuilt = false;
1515

1616
server.listen(PORT, () => {

src/static/images/favicon-lg.png

-4.08 KB
Binary file not shown.

src/static/images/favicon.png

-423 Bytes
Binary file not shown.

src/static/images/favicon.svg

-1
This file was deleted.

src/static/images/full-logo.png

-2.53 KB
Binary file not shown.

src/static/images/full-logo.svg

-1
This file was deleted.

src/static/images/logo.svg

+2
Loading

src/static/images/square-logo.png

-1.8 KB
Binary file not shown.

src/static/images/square-logo.svg

-1
This file was deleted.

0 commit comments

Comments
 (0)