Skip to content

Commit d868afc

Browse files
committed
first commit
0 parents  commit d868afc

16 files changed

+15510
-0
lines changed

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 70
6+
}

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# React Semantic UI Example
2+
3+
[![Build Status](https://travis-ci.org/the-road-to-learn-react/react-semantic-ui-example.svg?branch=master)](https://travis-ci.org/the-road-to-learn-react/react-semantic-ui-example) [![Slack](https://slack-the-road-to-learn-react.wieruch.com/badge.svg)](https://slack-the-road-to-learn-react.wieruch.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/the-road-to-learn-react/react-semantic-ui-example.svg)](https://greenkeeper.io/)
4+
5+
* Found in [The Road to learn React](https://roadtoreact.com/)
6+
7+
## Features
8+
9+
* uses:
10+
* React (create-react-app)
11+
* Semantic UI React
12+
13+
## Installation
14+
15+
* `git clone git@github.com:the-road-to-learn-react/react-semantic-ui-example.git`
16+
* `cd react-semantic-ui-example`
17+
* `npm install`
18+
* `npm start`
19+
* visit http://localhost:3000/

package-lock.json

Lines changed: 15116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "react-semantic-ui-example",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"react": "^16.7.0",
7+
"react-dom": "^16.7.0",
8+
"react-scripts": "2.1.2",
9+
"semantic-ui-css": "^2.4.1",
10+
"semantic-ui-react": "^0.84.0"
11+
},
12+
"scripts": {
13+
"start": "react-scripts start",
14+
"build": "react-scripts build",
15+
"test": "react-scripts test --env=jsdom --passWithNoTests",
16+
"eject": "react-scripts eject"
17+
},
18+
"eslintConfig": {
19+
"extends": "react-app"
20+
},
21+
"browserslist": [
22+
">0.2%",
23+
"not dead",
24+
"not ie <= 11",
25+
"not op_mini all"
26+
]
27+
}

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+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
9+
/>
10+
<meta name="theme-color" content="#000000" />
11+
<!--
12+
manifest.json provides metadata used when your web app is added to the
13+
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
14+
-->
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<!--
17+
Notice the use of %PUBLIC_URL% in the tags above.
18+
It will be replaced with the URL of the `public` folder during the build.
19+
Only files inside the `public` folder can be referenced from the HTML.
20+
21+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22+
work correctly both with client-side routing and a non-root public URL.
23+
Learn how to configure a non-root public URL by running `npm run build`.
24+
-->
25+
<title>React App</title>
26+
</head>
27+
<body>
28+
<noscript>You need to enable JavaScript to run this app.</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": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

src/App.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React, { Fragment } from 'react';
2+
import { Container } from 'semantic-ui-react';
3+
4+
import Menu from './Menu';
5+
import Login from './Login';
6+
7+
const App = () => (
8+
<Fragment>
9+
<Menu />
10+
<Container>
11+
<Login />
12+
</Container>
13+
</Fragment>
14+
);
15+
16+
export default App;

src/App.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './App';
4+
5+
it('renders without crashing', () => {
6+
const div = document.createElement('div');
7+
ReactDOM.render(<App />, div);
8+
ReactDOM.unmountComponentAtNode(div);
9+
});

src/Login.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import React from 'react';
2+
import {
3+
Button,
4+
Form,
5+
Grid,
6+
Header,
7+
Message,
8+
Segment,
9+
} from 'semantic-ui-react';
10+
11+
export default () => (
12+
<Grid centered columns={2}>
13+
<Grid.Column>
14+
<Header as="h2" textAlign="center">
15+
Login
16+
</Header>
17+
<Segment>
18+
<Form size="large">
19+
<Form.Input
20+
fluid
21+
icon="user"
22+
iconPosition="left"
23+
placeholder="Email address"
24+
/>
25+
<Form.Input
26+
fluid
27+
icon="lock"
28+
iconPosition="left"
29+
placeholder="Password"
30+
type="password"
31+
/>
32+
33+
<Button color="blue" fluid size="large">
34+
Login
35+
</Button>
36+
</Form>
37+
</Segment>
38+
<Message>
39+
Not registered yet? <a href="#">Sign Up</a>
40+
</Message>
41+
</Grid.Column>
42+
</Grid>
43+
);

src/Menu.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react';
2+
import { Container, Image, Menu } from 'semantic-ui-react';
3+
4+
export default () => (
5+
<Menu>
6+
<Container>
7+
<Menu.Item as="a" header>
8+
<Image
9+
size="small"
10+
src="https://www.robinwieruch.de/img/page/logo.svg"
11+
/>
12+
</Menu.Item>
13+
14+
<Menu.Menu position="right">
15+
<Menu.Item as="a" name="login">
16+
Login
17+
</Menu.Item>
18+
19+
<Menu.Item as="a" name="register">
20+
Register
21+
</Menu.Item>
22+
</Menu.Menu>
23+
</Container>
24+
</Menu>
25+
);

src/index.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
5+
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
6+
sans-serif;
7+
-webkit-font-smoothing: antialiased;
8+
-moz-osx-font-smoothing: grayscale;
9+
}
10+
11+
code {
12+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
13+
monospace;
14+
}

src/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import 'semantic-ui-css/semantic.min.css';
4+
5+
import './index.css';
6+
import App from './App';
7+
import * as serviceWorker from './serviceWorker';
8+
9+
ReactDOM.render(<App />, document.getElementById('root'));
10+
11+
// If you want your app to work offline and load faster, you can change
12+
// unregister() to register() below. Note this comes with some pitfalls.
13+
// Learn more about service workers: http://bit.ly/CRA-PWA
14+
serviceWorker.unregister();

src/logo.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)