Skip to content

Commit aad478d

Browse files
committed
enable bootstrap js
1 parent e9c970a commit aad478d

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"react-router-dom": "^6.22.0"
3131
},
3232
"devDependencies": {
33+
"@types/bootstrap": "^5.2.10",
3334
"@types/react": "^18.2.43",
3435
"@types/react-dom": "^18.2.17",
3536
"@typescript-eslint/eslint-plugin": "^6.14.0",

client/src/components/navbar.component.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export const NavbarComponent = () => {
2828
return (
2929
<>
3030
<nav
31-
className={`navbar navbar-dark navbar-expand-lg fixed-top shadow-sm ${
32-
scrolled ? "scrolled" : ""
33-
}`}
31+
className={`navbar navbar-dark navbar-expand-lg fixed-top shadow-sm ${scrolled ? "scrolled" : ""}`}
3432
style={{
3533
backgroundColor: "#FFAE1F",
3634
transition: "all 0.5s ease-in-out",
@@ -70,21 +68,18 @@ export const NavbarComponent = () => {
7068
aria-expanded="false"
7169
aria-label="Toggle navigation"
7270
>
73-
<span
74-
className="navbar-toggler-icon"
75-
></span>
71+
<span className="navbar-toggler-icon"></span>
7672
</button>
7773

7874
<div className="collapse navbar-collapse" id="navbarNav">
7975
<div className="d-flex ms-auto align-items-center">
80-
<a className="btn btn-light me-2" href="/account" style={{border: "1px solid black"}}>
76+
<a className="btn btn-light me-2" href="/account" style={{ border: "1px solid black" }}>
8177
Cont
8278
</a>
83-
<a className="btn btn-light me-2" href="/myappointments" style={{border: "1px solid black"}}>
79+
<a className="btn btn-light me-2" href="/myappointments" style={{ border: "1px solid black" }}>
8480
Programări
8581
</a>
86-
<a className="btn btn-light me-2" href="mailto:rezervaricaminleu@gmail.com"
87-
style={{border: "1px solid black"}}>
82+
<a className="btn btn-light me-2" href="mailto:rezervaricaminleu@gmail.com" style={{ border: "1px solid black" }}>
8883
Contact
8984
</a>
9085
<a
@@ -93,7 +88,7 @@ export const NavbarComponent = () => {
9388
await AuthService.getInstance().logout();
9489
window.location.reload();
9590
}}
96-
style={{border: "1px solid black"}}
91+
style={{ border: "1px solid black" }}
9792
>
9893
Logout
9994
</a>
@@ -102,7 +97,7 @@ export const NavbarComponent = () => {
10297
</div>
10398
</nav>
10499

105-
<div style={{height: navbarHeight}}></div>
100+
<div style={{ height: navbarHeight }}></div>
106101
</>
107102
);
108103
};

client/src/index.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,17 @@ button{
210210
opacity: 0;
211211
transform: translateY(-20%);
212212
}
213-
}
213+
}
214+
215+
@media (max-width: 768px) {
216+
.navbar-brand img {
217+
width: 3rem;
218+
height: 3rem;
219+
}
220+
221+
.btn {
222+
padding: 0.5rem 1rem;
223+
margin-right: 0.5rem;
224+
font-size: 0.875rem;
225+
}
226+
}

client/src/main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {GoogleOAuthProvider} from "@react-oauth/google";
88
import {AuthService} from "@genezio/auth";
99

1010
import "bootstrap/dist/css/bootstrap.min.css";
11+
import('bootstrap/dist/js/bootstrap.bundle.min.js');
12+
1113
import Account from "./routes/account.tsx";
1214
import Admin from "./routes/admin.tsx";
1315
import MyAppointments from "./routes/myAppointments.tsx";

0 commit comments

Comments
 (0)