-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathAppComponent.js
118 lines (115 loc) · 5.21 KB
/
AppComponent.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import ReactMarkdown from 'react-markdown'
import rehypeRaw from "rehype-raw"
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faLaptopCode, faAdjust, faArrowDown } from '@fortawesome/free-solid-svg-icons'
import { HashRouter as Router, Switch, Route, NavLink } from "react-router-dom";
import halfmoon from 'halfmoon/js/halfmoon-module'
import Home from './Home'
import Categories from './Categories'
import Issues from './Issues'
import Contributers from './Contributors'
export default function AppComponent(props) {
return (
<Router>
<div className="modal" id="source-code" tabIndex="-1" role="dialog">
<div className="modal-dialog" role="document">
<div className="modal-content w-three-quarter h-600 overflow-auto">
<button className="close" aria-label="Close" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
<pre>{props.modalContent}</pre>
</div>
</div>
</div>
<div className="modal" id="readme" tabIndex="-1" role="dialog">
<div className="modal-dialog" role="document">
<div className="modal-content w-three-quarter h-600 overflow-auto">
<button className="close" aria-label="Close" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
<ReactMarkdown rehypePlugins={[ rehypeRaw ]}>{props.modalContent}</ReactMarkdown>
</div>
</div>
</div>
<div className="page-wrapper with-navbar with-navbar-fixed-bottom" data-sidebar-type="full-height">
{/* Navbar start */}
<nav className="navbar">
{/* Navbar brand */}
<NavLink to="/" className="navbar-brand" exact>
<FontAwesomeIcon icon={faLaptopCode} />
CP
</NavLink>
<div className="navbar-nav d-none d-md-flex font-size-18">
<NavLink activeClassName="active" className="nav-item" to="/categories/">
<span className="nav-link">Categories</span>
</NavLink>
<NavLink activeClassName="active" className="nav-item" to="/issues/">
<span className="nav-link">Issues</span>
</NavLink>
<NavLink activeClassName="active" className="nav-item" to="/contributors/">
<span className="nav-link">Contributers</span>
</NavLink>
</div>
<div className="navbar-content d-md-none">
<div className="dropdown with-arrow">
<button className="btn" data-toggle="dropdown" type="button" id="navbar-dropdown">
Menu <FontAwesomeIcon icon={faArrowDown} />
</button>
<div className="dropdown-menu dropdown-menu-left" aria-labelledby="navbar-dropdown">
<NavLink activeClassName="active" className="nav-item" to="/categories/">
<span className="nav-link">Categories</span>
</NavLink>
<NavLink activeClassName="active" className="nav-item" to="/issues/">
<span className="nav-link">Issues</span>
</NavLink>
<NavLink activeClassName="active" className="nav-item" to="/contributors/">
<span className="nav-link">Contributers</span>
</NavLink>
</div>
</div>
</div>
<div className="navbar-content ml-auto">
<button className="btn btn-action" type="button" onClick={halfmoon.toggleDarkMode.bind(halfmoon)}>
<FontAwesomeIcon icon={faAdjust} />
</button>
</div>
</nav>
{/* Navbar end */}
{/* Content wrapper start */}
<div className="content-wrapper">
<Switch>
<Route path="/categories/">
<Categories showCode={props.showCode} setError={props.setError} />
</Route>
<Route path="/issues/">
<Issues setError={props.setError} />
</Route>
<Route path="/contributors/">
<Contributers setError={props.setError} />
</Route>
<Route path="/">
<Home />
</Route>
</Switch>
</div>
{/* Content wrapper end */}
{/* Navbar fixed bottom start */}
<nav className="navbar navbar-fixed-bottom">
<div className="d-flex d-md-none justify-content-around w-full">
<img className="" src="https://img.shields.io/github/contributors/skully-coder/competitiveprogramming.svg?style=flat-square" alt="Contributers" />
<img className="" src="https://img.shields.io/github/forks/skully-coder/competitiveprogramming.svg?style=flat-square" alt="Forks" />
<img className="" src="https://img.shields.io/github/issues/skully-coder/competitiveprogramming.svg?style=flat-square" alt="Issues" />
<img className="" src="https://img.shields.io/github/stars/skully-coder/competitiveprogramming.svg?style=flat-square" alt="Stargazers" />
</div>
<div className="d-none d-md-block">
<img className="mx-5" src="https://img.shields.io/github/contributors/skully-coder/competitiveprogramming.svg?style=for-the-badge" alt="Contributers" />
<img className="mx-5" src="https://img.shields.io/github/forks/skully-coder/competitiveprogramming.svg?style=for-the-badge" alt="Forks" />
<img className="mx-5" src="https://img.shields.io/github/issues/skully-coder/competitiveprogramming.svg?style=for-the-badge" alt="Issues" />
<img className="mx-5" src="https://img.shields.io/github/stars/skully-coder/competitiveprogramming.svg?style=for-the-badge" alt="Stargazers" />
</div>
</nav>
{/* Navbar fixed bottom end */}
</div>
</Router>
)
}