Skip to content

Commit 6589dcc

Browse files
committed
feat(web): implement terraform template subset pages
- add services for docker, ec2, argocd, iam, s3
1 parent 8c1f8a0 commit 6589dcc

8 files changed

Lines changed: 94 additions & 4 deletions

File tree

web/src/App.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { Route, Routes, useLocation } from 'react-router';
22
import MainLayout from '@/components/layouts/main-layout/main-layout';
3+
import { TerraformTemplate } from '@/pages/terraform-template/index/terraform-template';
4+
import Docker from '@/pages/terraform-template/Docker/docker';
5+
import EC2 from './pages/terraform-template/EC2/ec2';
6+
import S3 from './pages/terraform-template/S3/s3';
7+
import IAM from './pages/terraform-template/IAM/iam';
8+
import Argocd from './pages/terraform-template/ARGOCD/argocd';
39

410
function App() {
511
const location = useLocation();
@@ -8,7 +14,13 @@ function App() {
814
<div className="container mx-auto border-l border-r border-gray-700 h-dvh max-w-7xl">
915
<Routes location={location}>
1016
<Route element={<MainLayout />}>
11-
<Route path="/" />
17+
<Route path="terraform-template" element={<TerraformTemplate />}>
18+
<Route path="docker" element={<Docker />} />
19+
<Route path="ec2" element={<EC2 />} />
20+
<Route path="s3" element={<S3 />} />
21+
<Route path="iam" element={<IAM />} />
22+
<Route path="argocd" element={<Argocd />} />
23+
</Route>
1224
</Route>
1325
</Routes>
1426
</div>

web/src/components/navbar/navbar.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ const Navbar: FC = () => {
3333
{navbar.map((link) => (
3434
<NavLink
3535
to={link.url}
36-
className={({ isActive }) =>
37-
isActive ? 'text-orange-base]' : ''
38-
}
36+
className={({ isActive }) => (isActive ? 'text-orange-base' : '')}
3937
>
4038
{link.title}
4139
</NavLink>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { FC } from 'react';
2+
3+
const Argocd: FC = () => {
4+
return <>Argocd</>;
5+
};
6+
7+
export default Argocd;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { FC } from 'react';
2+
3+
const Docker: FC = () => {
4+
return <>Docker</>;
5+
};
6+
7+
export default Docker;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const EC2 = () => {
2+
return <>EC</>;
3+
};
4+
5+
export default EC2;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { FC } from 'react';
2+
3+
const IAM: FC = () => {
4+
return <>IAM</>;
5+
};
6+
7+
export default IAM;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { FC } from 'react';
2+
3+
const S3: FC = () => {
4+
return <>S3</>;
5+
};
6+
7+
export default S3;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { FC } from 'react';
2+
import { NavLink, Outlet } from 'react-router';
3+
4+
const menu = [
5+
{
6+
url: 'docker',
7+
title: 'Docker Service',
8+
},
9+
{
10+
url: 'ec2',
11+
title: 'EC2 Service',
12+
},
13+
{
14+
url: 's3',
15+
title: 'S3 Service',
16+
},
17+
{
18+
url: 'iam',
19+
title: 'IAM Service',
20+
},
21+
{
22+
url: 'argocd',
23+
title: 'ARGOCD Service',
24+
},
25+
];
26+
27+
export const TerraformTemplate: FC = () => {
28+
return (
29+
<div className="flex items-center h-dvh">
30+
<div className="flex flex-col items-center justify-center w-full h-full border-r border-gray-500 divide-y divide-gray-500 max-w-96">
31+
{menu.map((link) => (
32+
<NavLink
33+
to={link.url}
34+
className={({ isActive }) =>
35+
`block w-full p-4 text-center outline-none transition-all ${isActive ? 'bg-orange-base' : ''}`
36+
}
37+
>
38+
{link.title}
39+
</NavLink>
40+
))}
41+
</div>
42+
<div className="flex items-center justify-center w-2/3 h-full">
43+
<Outlet />
44+
</div>
45+
</div>
46+
);
47+
};

0 commit comments

Comments
 (0)