ChandimaPrabath
commited on
Commit
•
2e4a89e
1
Parent(s):
f623744
styles fix
Browse files
frontend/src/components/Sidebar.css
CHANGED
@@ -23,8 +23,7 @@
|
|
23 |
}
|
24 |
|
25 |
.sidebar.closed {
|
26 |
-
width:
|
27 |
-
height: 1px;
|
28 |
}
|
29 |
|
30 |
.sidebar-header {
|
@@ -84,6 +83,14 @@
|
|
84 |
padding: 16px;
|
85 |
margin-bottom: 20px;
|
86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
.sidebar-item {
|
89 |
display: flex;
|
|
|
23 |
}
|
24 |
|
25 |
.sidebar.closed {
|
26 |
+
width: 0;
|
|
|
27 |
}
|
28 |
|
29 |
.sidebar-header {
|
|
|
83 |
padding: 16px;
|
84 |
margin-bottom: 20px;
|
85 |
}
|
86 |
+
|
87 |
+
@media only screen and (orientation: portrait) {
|
88 |
+
.sidebar-footer {
|
89 |
+
padding: 16px;
|
90 |
+
margin-bottom: 100px;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
|
95 |
.sidebar-item {
|
96 |
display: flex;
|
frontend/src/components/Sidebar.js
CHANGED
@@ -4,7 +4,15 @@ import Link from "next/link";
|
|
4 |
import { usePathname } from "next/navigation";
|
5 |
import "./Sidebar.css";
|
6 |
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
7 |
-
import {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
const Sidebar = () => {
|
10 |
const [isOpen, setIsOpen] = useState(false);
|
@@ -43,57 +51,63 @@ const Sidebar = () => {
|
|
43 |
{isOpen && <h1 className="sidebar-title">Streamz</h1>}
|
44 |
</div>
|
45 |
<div className="sidebar-content">
|
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 |
</div>
|
98 |
</div>
|
99 |
);
|
|
|
4 |
import { usePathname } from "next/navigation";
|
5 |
import "./Sidebar.css";
|
6 |
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
7 |
+
import {
|
8 |
+
faBars,
|
9 |
+
faCogs,
|
10 |
+
faHome,
|
11 |
+
faStar,
|
12 |
+
faTv,
|
13 |
+
faFilm,
|
14 |
+
faBookBookmark,
|
15 |
+
} from "@fortawesome/free-solid-svg-icons";
|
16 |
|
17 |
const Sidebar = () => {
|
18 |
const [isOpen, setIsOpen] = useState(false);
|
|
|
51 |
{isOpen && <h1 className="sidebar-title">Streamz</h1>}
|
52 |
</div>
|
53 |
<div className="sidebar-content">
|
54 |
+
{isOpen && (
|
55 |
+
<div className="sidebar-menu">
|
56 |
+
<Link
|
57 |
+
href="/"
|
58 |
+
className={`sidebar-link ${pathname === "/" ? "active" : ""}`}
|
59 |
+
onMouseEnter={handleMouseEnter}
|
60 |
+
onMouseLeave={handleMouseLeave}
|
61 |
+
>
|
62 |
+
<SidebarItem icon={faHome} text="Home" />
|
63 |
+
</Link>
|
64 |
+
<Link
|
65 |
+
href="/films"
|
66 |
+
className={`sidebar-link ${
|
67 |
+
pathname === "/films" ? "active" : ""
|
68 |
+
}`}
|
69 |
+
onMouseEnter={handleMouseEnter}
|
70 |
+
onMouseLeave={handleMouseLeave}
|
71 |
+
>
|
72 |
+
<SidebarItem icon={faFilm} text="Movies" />
|
73 |
+
</Link>
|
74 |
+
<Link
|
75 |
+
href="/tvshows"
|
76 |
+
className={`sidebar-link ${
|
77 |
+
pathname === "/tvshows" ? "active" : ""
|
78 |
+
}`}
|
79 |
+
onMouseEnter={handleMouseEnter}
|
80 |
+
onMouseLeave={handleMouseLeave}
|
81 |
+
>
|
82 |
+
<SidebarItem icon={faTv} text="Series" />
|
83 |
+
</Link>
|
84 |
+
<Link
|
85 |
+
href="/new"
|
86 |
+
className={`sidebar-link ${
|
87 |
+
pathname === "/new" ? "active" : ""
|
88 |
+
}`}
|
89 |
+
onMouseEnter={handleMouseEnter}
|
90 |
+
onMouseLeave={handleMouseLeave}
|
91 |
+
>
|
92 |
+
<SidebarItem icon={faStar} text="New" />
|
93 |
+
</Link>
|
94 |
+
<Link
|
95 |
+
href="/mylist"
|
96 |
+
className={`sidebar-link ${
|
97 |
+
pathname === "/mylist" ? "active" : ""
|
98 |
+
}`}
|
99 |
+
onMouseEnter={handleMouseEnter}
|
100 |
+
onMouseLeave={handleMouseLeave}
|
101 |
+
>
|
102 |
+
<SidebarItem icon={faBookBookmark} text="My List" />
|
103 |
+
</Link>
|
104 |
+
</div>
|
105 |
+
)}
|
106 |
+
{isOpen && (
|
107 |
+
<div className="sidebar-footer">
|
108 |
+
<SidebarItem icon={faCogs} text="Settings" />
|
109 |
+
</div>
|
110 |
+
)}
|
111 |
</div>
|
112 |
</div>
|
113 |
);
|