File tree Expand file tree Collapse file tree 3 files changed +26
-11
lines changed
Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 88 rel ="stylesheet "
99 href ="
https://cdn.jsdelivr.net/npm/[email protected] /font/bootstrap-icons.min.css "
1010 />
11-
1211 < title > Youtube</ title >
1312 </ head >
1413 < body >
1514 < div class ="main ">
1615 < h1 > Youtube</ h1 >
1716 </ div >
1817
19- < aside >
20- < h1 > hi</ h1 >
21- </ aside >
22-
2318 < div class ="navbar ">
2419 < div class ="logo "> Youtube</ div >
2520 < div class ="search-bar ">
@@ -28,11 +23,16 @@ <h1>hi</h1>
2823 < i id ="icon " class ="bi bi-search "> </ i >
2924 </ button >
3025 </ div >
31- < div class ="links ">
32- < a href ="# "> Home</ a >
33- < a href ="# "> Trending</ a >
34- < a href ="# "> Subscriptions</ a >
26+ < div class ="sidebar ">
27+ < button id ="toggleButton "> ☰</ button >
28+ < div class ="links ">
29+ < h2 > Home</ h2 >
30+ < h2 > Trending</ h2 >
31+ < h2 > Subscriptions</ h2 >
32+ </ div >
3533 </ div >
3634 </ div >
35+
36+ < script src ="script.js "> </ script >
3737 </ body >
3838</ html >
Original file line number Diff line number Diff line change 1+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
2+ const toggleButton = document . getElementById ( "toggleButton" ) ;
3+ const linksContainer = document . querySelector ( ".links" ) ;
4+
5+ toggleButton . addEventListener ( "click" , function ( ) {
6+ linksContainer . style . maxHeight =
7+ linksContainer . style . maxHeight === "0px" ? "200px" : "0px" ;
8+ } ) ;
9+ } ) ;
Original file line number Diff line number Diff line change @@ -65,21 +65,27 @@ body {
6565}
6666
6767.search-bar button {
68- padding : 11 px 14px ;
68+ padding : 8 px 14px ;
6969 background-color : hsl (0 , 0% , 18.82% );
7070 color : # fff ;
7171 border : none;
72- border-radius : 0 8 px 8 px 0 ;
72+ border-radius : 4 px 10 px 10 px 4 px ;
7373 cursor : pointer;
7474 outline : white;
7575 font-size : 14px ;
7676}
7777
7878input {
7979 background-color : # 0f0f0f ;
80+ opacity : 80% ;
8081}
8182
8283# icon {
8384 width : 7px ;
8485 height : 7px ;
86+ }
87+
88+
89+ input [type = "text" ] {
90+ color : # ffffff ;
8591}
You can’t perform that action at this time.
0 commit comments