Skip to content

Commit 69d437a

Browse files
committed
Init
1 parent d405e33 commit 69d437a

16 files changed

+6918
-104
lines changed

.gitignore

Lines changed: 21 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,21 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
14-
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
27-
28-
# PyInstaller
29-
# Usually these files are written by a python script from a template
30-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31-
*.manifest
32-
*.spec
33-
34-
# Installer logs
35-
pip-log.txt
36-
pip-delete-this-directory.txt
37-
38-
# Unit test / coverage reports
39-
htmlcov/
40-
.tox/
41-
.coverage
42-
.coverage.*
43-
.cache
44-
nosetests.xml
45-
coverage.xml
46-
*.cover
47-
.hypothesis/
48-
49-
# Translations
50-
*.mo
51-
*.pot
52-
53-
# Django stuff:
54-
*.log
55-
local_settings.py
56-
57-
# Flask stuff:
58-
instance/
59-
.webassets-cache
60-
61-
# Scrapy stuff:
62-
.scrapy
63-
64-
# Sphinx documentation
65-
docs/_build/
66-
67-
# PyBuilder
68-
target/
69-
70-
# Jupyter Notebook
71-
.ipynb_checkpoints
72-
73-
# pyenv
74-
.python-version
75-
76-
# celery beat schedule file
77-
celerybeat-schedule
78-
79-
# SageMath parsed files
80-
*.sage.py
81-
82-
# dotenv
83-
.env
84-
85-
# virtualenv
86-
.venv
87-
venv/
88-
ENV/
89-
90-
# Spyder project settings
91-
.spyderproject
92-
.spyproject
93-
94-
# Rope project settings
95-
.ropeproject
96-
97-
# mkdocs documentation
98-
/site
99-
100-
# mypy
101-
.mypy_cache/
1+
# dependencies
2+
/node_modules
3+
4+
# testing
5+
/coverage
6+
7+
# production
8+
/build
9+
10+
# misc
11+
.idea
12+
*.iml
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Design
1+
# website-react
22

3-
## Primary Color
3+
## Design
4+
5+
### Primary Color
46

57
RGB:#3f62ff
68

79
> [What is Ant Color style?](https://github.com/ant-design/ant-design/blob/734beb84ffc3f0469fbae1566aa8450f966cb261/components/style/color/colorPalette.less)
810
9-
## Preview
11+
### Preview
1012

1113
- Home Page:
1214
![img](design/home.png)

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "canton-res-react",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"antd": "^2.13.9",
7+
"react": "^16.0.0",
8+
"react-dom": "^16.0.0",
9+
"react-router-dom": "^4.2.2",
10+
"react-scripts-ts": "2.8.0"
11+
},
12+
"scripts": {
13+
"start": "react-scripts-ts start",
14+
"build": "react-scripts-ts build",
15+
"test": "react-scripts-ts test --env=jsdom",
16+
"eject": "react-scripts-ts eject"
17+
},
18+
"devDependencies": {
19+
"@types/jest": "^21.1.5",
20+
"@types/node": "^8.0.50",
21+
"@types/react": "^16.0.22",
22+
"@types/react-dom": "^16.0.3",
23+
"@types/react-router-dom": "^4.2.1"
24+
}
25+
}

public/assets/img/logo.svg

Lines changed: 36 additions & 0 deletions
Loading

public/favicon.ico

3.78 KB
Binary file not shown.

public/index.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#108ee9">
7+
<!--
8+
manifest.json provides metadata used when your web app is added to the
9+
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
10+
-->
11+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
12+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
13+
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700" rel="stylesheet">
14+
<!--
15+
Notice the use of %PUBLIC_URL% in the tags above.
16+
It will be replaced with the URL of the `public` folder during the build.
17+
Only files inside the `public` folder can be referenced from the HTML.
18+
19+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
20+
work correctly both with client-side routing and a non-root public URL.
21+
Learn how to configure a non-root public URL by running `npm run build`.
22+
-->
23+
<title>Canton Resistance</title>
24+
</head>
25+
<body>
26+
<noscript>
27+
You need to enable JavaScript to run this app.
28+
</noscript>
29+
<div id="root"></div>
30+
<!--
31+
This HTML file is a template.
32+
If you open it directly in the browser, you will see an empty page.
33+
34+
You can add webfonts, meta tags, or analytics to this file.
35+
The build step will place the bundled scripts into the <body> tag.
36+
37+
To begin the development, run `npm start` or `yarn start`.
38+
To create a production bundle, use `npm run build` or `yarn build`.
39+
-->
40+
</body>
41+
</html>

public/manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
}
10+
],
11+
"start_url": "./index.html",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

src/components/Home.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.main-header {
2+
display: flex;
3+
}

src/components/Home.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import * as React from 'react';
2+
import './Home.scss';
3+
import { Layout, Menu } from 'antd';
4+
const { Header, Footer, Content } = Layout;
5+
6+
class App extends React.Component {
7+
render() {
8+
return (
9+
<Layout className="layout" style={{ minHeight: '100vh' }}>
10+
<Header style={{ background: '#fff' }} className="main-header">
11+
<div className="logo">
12+
<img src="/assets/img/logo.svg" height={48} />
13+
</div>
14+
<Menu mode="horizontal" defaultSelectedKeys={['1']} className="main-menu">
15+
<Menu.Item key="1">nav 1</Menu.Item>
16+
<Menu.Item key="2">nav 2</Menu.Item>
17+
<Menu.Item key="3">nav 3</Menu.Item>
18+
</Menu>
19+
</Header>
20+
<Content style={{ padding: '0 50px', flexGrow: 1 }}>
21+
test
22+
</Content>
23+
<Footer>
24+
Ant Design ©2016 Created by Ant UED
25+
</Footer>
26+
</Layout>
27+
);
28+
}
29+
}
30+
31+
export default App;

src/index.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@import '~antd/dist/antd.css';
2+
3+
body {
4+
margin: 0;
5+
padding: 0;
6+
font-size: 14px;
7+
font-family: 'Source Sans Pro', sans-serif;
8+
}

src/index.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as React from 'react';
2+
import { render } from 'react-dom';
3+
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
4+
import serviceWorker from './serviceWorker';
5+
import './index.css';
6+
7+
import Home from './components/Home';
8+
9+
render(
10+
<Router>
11+
<Switch>
12+
<Route exact path="/" component={Home} />
13+
<Route path="/page/:page" component={Home} />
14+
<Route path="/article/:id" component={Home} />
15+
<Route path="/form/:name" component={Home} />
16+
<Route path="/user/:id" component={Home} />
17+
<Route component={Home}/>
18+
</Switch>
19+
</Router>,
20+
document.getElementById('root') as HTMLElement
21+
);
22+
23+
serviceWorker.register();

0 commit comments

Comments
 (0)