-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainNav.tsx
100 lines (89 loc) · 3.67 KB
/
MainNav.tsx
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
import './styles.css';
import { nanoid } from 'nanoid';
import { Link } from 'react-router-dom';
import { IMainNav } from 'spock-react/components/main-nav-types';
import { faBook, faHouseChimney } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import * as config from '../../../environment.json';
import GithubLogo from '../../assets/img/github-mark-white.png';
import { useActiveLink } from '../../Hooks';
import { Search } from '../Search';
import { NavLink } from '../shared';
export const MainNav = (props: IMainNav) => {
const { summary } = props;
const { setActiveLink } = useActiveLink();
return (
<div className="main">
<Link
to="/"
className="main__logo"
onClick={() => {
setActiveLink('home');
}}
>
{config.appName}
</Link>
<div className="main__search">
<Search summary={summary} />
</div>
<nav className="main__nav">
<h4>Menu</h4>
<ul className="main__list">
<NavLink href="/">
Home
<FontAwesomeIcon
icon={faHouseChimney}
size="lg"
className="main__menu__icon"
/>
</NavLink>
<NavLink href="https://github.com/Gleethos/neureka">
Github
<img
src={GithubLogo}
alt="Github Logo"
className="main__github main__menu__icon"
/>
</NavLink>
<NavLink href="https://gleethos.github.io/neureka/jdocs/index.html">
JDocs
<FontAwesomeIcon
icon={faBook}
size="lg"
className="main__menu__icon"
/>
</NavLink>
</ul>
<h4>Getting Started</h4>
<ul className="main__list">
<NavLink href="/getting-started/neural-networks-quickstart">
Neural Networks Quickstart
</NavLink>
<NavLink href="/getting-started/getting-started-with-apache-maven">
Getting Started With Apache Maven
</NavLink>
<NavLink href="/getting-started/getting-started-with-gradle">
Getting Started With Gradle
</NavLink>
<NavLink href="/getting-started/getting-started-with-jitpack">
Getting Started With Jitpack
</NavLink>
<NavLink href="/getting-started/getting-started-with-groovy-grape">
Getting Started With Groovy Grape
</NavLink>
<NavLink href="/getting-started/building-from-source">
Building From Source
</NavLink>
</ul>
<h4>Guides & Concepts</h4>
<ul className="main__list">
{summary.specifications.map((spec) => (
<NavLink href={`/${spec.className}`} key={nanoid()}>
{spec.title !== '' ? spec.title : spec.className}
</NavLink>
))}
</ul>
</nav>
</div>
);
};