Skip to content

Commit 6af9c92

Browse files
authored
Merge pull request #1 from alxsmora1/release/1.0.0
Release/1.0.0
2 parents 41e747f + 469444b commit 6af9c92

22 files changed

+11793
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf

.gitignore

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

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# React Simple Sidebar
2+
3+
![version](https://img.shields.io/badge/version-1.0.0-blue.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg) ![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)
4+
5+
## Decription
6+
A simple sidebar template to start your projects.
7+
8+
## Instalación
9+
Navigate to the root of the directory and run the following commands:
10+
11+
$ yarn install
12+
$ yarn start
13+
14+
## Simple Sidebar
15+
This project use the styles of [Simple Sidebar Startbootstrap](https://startbootstrap.com/templates/simple-sidebar/).
16+
17+
## Tests and Code Coverage
18+
Coming Soon
19+
20+
## Autor
21+
Alexis Mora <alexis.mora1v@gmail.com>
22+
23+
## Licencia
24+
Licencia MIT Copyright 2020 Alexis Mora

package.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "react-simple-sidebar",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@fortawesome/fontawesome-svg-core": "^1.2.30",
7+
"@fortawesome/free-solid-svg-icons": "^5.14.0",
8+
"@fortawesome/react-fontawesome": "^0.1.11",
9+
"@testing-library/jest-dom": "^4.2.4",
10+
"@testing-library/react": "^9.3.2",
11+
"@testing-library/user-event": "^7.1.2",
12+
"bootstrap": "^4.5.0",
13+
"react": "^16.13.1",
14+
"react-dom": "^16.13.1",
15+
"react-router-dom": "^5.2.0",
16+
"react-scripts": "3.4.1",
17+
"reactstrap": "^8.5.1"
18+
},
19+
"scripts": {
20+
"start": "react-scripts start",
21+
"build": "react-scripts build",
22+
"test": "react-scripts test",
23+
"eject": "react-scripts eject"
24+
},
25+
"eslintConfig": {
26+
"extends": "react-app"
27+
},
28+
"browserslist": {
29+
"production": [
30+
">0.2%",
31+
"not dead",
32+
"not op_mini all"
33+
],
34+
"development": [
35+
"last 1 chrome version",
36+
"last 1 firefox version",
37+
"last 1 safari version"
38+
]
39+
}
40+
}

public/favicon.ico

3.08 KB
Binary file not shown.

public/index.html

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>React App</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

public/logo192.png

5.22 KB
Loading

public/logo512.png

9.44 KB
Loading

public/manifest.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

public/robots.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

src/App.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React, { Component } from "react";
2+
3+
import "./css/simple-sidebar.css";
4+
import "bootstrap/dist/css/bootstrap.css";
5+
import Layout from "./layouts/Layout.js";
6+
7+
class App extends Component {
8+
render() {
9+
return (
10+
<div>
11+
<Layout />
12+
</div>
13+
);
14+
}
15+
}
16+
17+
export default App;

src/components/Navbar.js

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import React, { useState } from "react";
2+
import { Link } from "react-router-dom";
3+
4+
import {
5+
Nav,
6+
Navbar,
7+
Collapse,
8+
NavItem,
9+
NavLink,
10+
UncontrolledDropdown,
11+
DropdownToggle,
12+
NavbarToggler,
13+
DropdownMenu,
14+
DropdownItem,
15+
Button,
16+
} from "reactstrap";
17+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
18+
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
19+
20+
const SimpleNavbar = (props) => {
21+
const [isOpen, setIsOpen] = useState(false);
22+
const toggle = () => setIsOpen(!isOpen);
23+
24+
const sidebar = () => {
25+
props.openSidebar();
26+
};
27+
28+
let Icon;
29+
if (props.sidebarOpen) {
30+
Icon = <FontAwesomeIcon icon={faArrowLeft} />;
31+
} else {
32+
Icon = <FontAwesomeIcon icon={faArrowRight} />;
33+
}
34+
35+
return (
36+
<Navbar color="dark" dark expand="md">
37+
<Button className="btn btn-primary" onClick={sidebar} id="menu-toggle">
38+
{Icon}
39+
</Button>
40+
<NavbarToggler onClick={toggle} />
41+
<Collapse isOpen={isOpen} navbar>
42+
<Nav className="ml-auto" navbar>
43+
<NavItem>
44+
<NavLink to="/users" tag={Link}>
45+
Users
46+
</NavLink>
47+
</NavItem>
48+
<NavItem>
49+
<NavLink to="/task" tag={Link}>
50+
Task
51+
</NavLink>
52+
</NavItem>
53+
<UncontrolledDropdown nav inNavbar>
54+
<DropdownToggle nav caret>
55+
Menu
56+
</DropdownToggle>
57+
<DropdownMenu right>
58+
<DropdownItem to="/contact" tag={Link}>
59+
Contact
60+
</DropdownItem>
61+
<DropdownItem to="/about" tag={Link}>
62+
About
63+
</DropdownItem>
64+
<DropdownItem to="/map" tag={Link}>
65+
Map
66+
</DropdownItem>
67+
<DropdownItem to="/tools" tag={Link}>
68+
Tools
69+
</DropdownItem>
70+
</DropdownMenu>
71+
</UncontrolledDropdown>
72+
<NavItem>
73+
<NavLink to="Logout" tag={Link}>
74+
Logout
75+
</NavLink>
76+
</NavItem>
77+
</Nav>
78+
</Collapse>
79+
</Navbar>
80+
);
81+
};
82+
83+
export default SimpleNavbar;

src/components/NoMatch.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react";
2+
3+
export default class NoMatch extends React.Component {
4+
render() {
5+
return (
6+
<div>
7+
<h1> Error 404 </h1>
8+
<h4>Page not Found</h4>
9+
</div>
10+
);
11+
}
12+
}

src/components/Sidebar.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import React from "react";
2+
import { Link } from "react-router-dom";
3+
4+
import { Nav, NavItem, NavLink } from "reactstrap";
5+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6+
import { faHome } from "@fortawesome/free-solid-svg-icons";
7+
8+
class SimpleSidebar extends React.Component {
9+
render() {
10+
return (
11+
<div className="bg-light border-right" id="sidebar-wrapper">
12+
<NavLink className="sidebar-heading text-dark" to="/" tag={Link}>
13+
<FontAwesomeIcon icon={faHome} /> Simple Sidebar
14+
</NavLink>
15+
<Nav className="list-group list-group-flush">
16+
<NavItem>
17+
<NavLink
18+
to="/table"
19+
tag={Link}
20+
className="list-group-item list-group-item-action bg-light"
21+
>
22+
{" "}
23+
Table
24+
</NavLink>
25+
</NavItem>
26+
<NavItem>
27+
<NavLink
28+
to="/hello"
29+
tag={Link}
30+
className="list-group-item list-group-item-action bg-light"
31+
>
32+
{" "}
33+
Hello World!
34+
</NavLink>
35+
</NavItem>
36+
<NavItem>
37+
<NavLink
38+
to="/error"
39+
tag={Link}
40+
className="list-group-item list-group-item-action bg-light"
41+
>
42+
{" "}
43+
Error 404
44+
</NavLink>
45+
</NavItem>
46+
</Nav>
47+
</div>
48+
);
49+
}
50+
}
51+
52+
export default SimpleSidebar;

0 commit comments

Comments
 (0)