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: 100px;
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 { faBars, faCogs, faHome, faStar, faTv, faFilm, faBookBookmark } from "@fortawesome/free-solid-svg-icons";
 
 
 
 
 
 
 
 
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
- {isOpen && (
47
- <div className="sidebar-menu">
48
- <Link
49
- href="/"
50
- className={`sidebar-link ${pathname === "/" ? "active" : ""}`}
51
- onMouseEnter={handleMouseEnter}
52
- onMouseLeave={handleMouseLeave}
53
- >
54
- <SidebarItem icon={faHome} text="Home" />
55
- </Link>
56
- <Link
57
- href="/films"
58
- className={`sidebar-link ${pathname === "/films" ? "active" : ""}`}
59
- onMouseEnter={handleMouseEnter}
60
- onMouseLeave={handleMouseLeave}
61
- >
62
- <SidebarItem icon={faFilm} text="Movies" />
63
- </Link>
64
- <Link
65
- href="/tvshows"
66
- className={`sidebar-link ${
67
- pathname === "/tvshows" ? "active" : ""
68
- }`}
69
- onMouseEnter={handleMouseEnter}
70
- onMouseLeave={handleMouseLeave}
71
- >
72
- <SidebarItem icon={faTv} text="Series" />
73
- </Link>
74
- <Link
75
- href="/new"
76
- className={`sidebar-link ${pathname === "/new" ? "active" : ""}`}
77
- onMouseEnter={handleMouseEnter}
78
- onMouseLeave={handleMouseLeave}
79
- >
80
- <SidebarItem icon={faStar} text="New" />
81
- </Link>
82
- <Link
83
- href="/mylist"
84
- className={`sidebar-link ${pathname === "/mylist" ? "active" : ""}`}
85
- onMouseEnter={handleMouseEnter}
86
- onMouseLeave={handleMouseLeave}
87
- >
88
- <SidebarItem icon={faBookBookmark} text="My List" />
89
- </Link>
90
- </div>
91
- )}
92
- {isOpen && (
93
- <div className="sidebar-footer">
94
- <SidebarItem icon={faCogs} text="Settings" />
95
- </div>
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
  );