Skip to content

Commit

Permalink
uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
amitabhsoni2004 authored Apr 3, 2024
1 parent aac646e commit 34fac01
Show file tree
Hide file tree
Showing 14 changed files with 252 additions and 0 deletions.
11 changes: 11 additions & 0 deletions css/search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nav .searchHolder{
display: block;
}
#search {
padding: 10px 30px;
border-radius: 20px 0px 0px 20px;
border: 1px solid #9f9f9f;
font-size: 16px;
width: 250px;
outline: none;
}
98 changes: 98 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
* {
margin: 0;
padding: 0;
}

body {
background-color: white;
color: black;
/* margin: 5px; */
}

nav {
height: 60px;
border: 2px solid black;
background-color: white;
justify-content: space-between;
padding: 0px 20px;
position: sticky;
top: 0;
}

.left {
height: 100vh;
width: 20vw;
border: 2px solid black;
}

.right {
height: 100vh;
width: 80vw;
border: 2px solid black;
}

#hero {
border: 2px solid red;
}

.logo {
width: 90px;
}

.hamburger {
width: 30px;
}

#search {
padding: 10px 30px;
border-radius: 20px 0px 0px 20px;
border: 1px solid #9f9f9f;
font-size: 16px;
width: 500px;
outline: none;
}
#search:focus{
border-color: blue;
}
.micsvg {
border-radius: 50%;
background-color: #f2f2f2;
border: 1px solid #9f9f9f;
padding: 7px;
}

.searchsvg{
border: 0.5px solid #9f9f9f;
background-color: #f2f2f2;
border-radius: 0px 20px 20px 0px;
padding: 7.2px 25px;
}
/*
.searchContainer::after {
content: url('search.svg');
content-visibility: visible;
border: 0.5px solid #9f9f9f;
background-color: #f2f2f2;
border-radius: 0px 20px 20px 0px;
padding: 7px 30px;
position: absolute;
right: 0px;
} */
.searchsvg1{
display: none;
}
@media screen and (max-width:767px) {
nav .searchHolder,.createsvg,.micsvg{
display: none;
}
.left{
display: none;;
}
.right{
width: 100%;
}
.searchsvg1{
display: block;
}

}
24 changes: 24 additions & 0 deletions css/utility.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.flex{
display: flex;
}
.gap1{
gap: 7px;
}
.justifyContent{
justify-content: center;
}
.alignItems{
align-items: center;
}
.p1{
padding: 7px;
}
.gap2{
gap: 15px;
}
.gap3{
gap: 25px;
}
.div1,.div3{
display: none;
}
1 change: 1 addition & 0 deletions img/account.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions img/bell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/create.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions img/hamburger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/mic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions img/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>YouTube</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/utility.css">
<link rel="shortcut icon" href="https://www.youtube.com/s/desktop/5bb413e3/img/favicon_48x48.png" type="image/x-icon">
</head>
<body>
<nav class="flex gap3 alignItems">
<div class="flex gap2 alignItems">
<img src="img/hamburger.svg" alt="" class="hamburger">
<img src="img/logo.svg" alt="" class="logo">
</div>
<div class="flex alignItems gap3 searchHolder">
<span class="flex alignItems searchContainer">
<input type="search" name="search" id="search" placeholder="Search">
<img src="img/search.svg" alt="" title="Search" class="searchsvg">
</span>
<img src="img/mic.svg" alt="" class="micsvg">
</div>
<div class="icons flex alignItems gap3">
<img src="img/create.svg" alt="" class="createsvg">
<img src="img/bell.svg" alt="">
<img src="img/account.svg" alt="">
<img src="img/search.svg" alt="" class="searchsvg1">
</div>
</nav>
<main id="hero" class="flex p1 gap1">
<section class="left">

</section>
<section class="right">

</section>
</main>

<script src="js/script.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let searchsvg1 = document.querySelector(".searchsvg1");

searchsvg1.addEventListener("click", (event) => {
event.preventDefault();
window.location.href = "search.html";
});
1 change: 1 addition & 0 deletions js/search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Search window is opened ');
35 changes: 35 additions & 0 deletions search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>YouTube</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/utility.css">
<link rel="stylesheet" href="css/search.css">
<link rel="shortcut icon" href="https://www.youtube.com/s/desktop/5bb413e3/img/favicon_48x48.png" type="image/x-icon">
</head>
<body>
<nav class="flex gap3 alignItems">
<div class="flex gap2 alignItems div1">
<img src="img/hamburger.svg" alt="" class="hamburger">
<img src="img/logo.svg" alt="" class="logo">
</div>
<div class="flex alignItems gap3 searchHolder">
<span class="flex alignItems searchContainer">
<input type="search" name="search" id="search" placeholder="Search">
<img src="img/search.svg" alt="" title="Search" class="searchsvg">
</span>
<img src="img/mic.svg" alt="" class="micsvg">
</div>
<div class="icons flex alignItems gap3 div3">
<img src="img/create.svg" alt="" class="createsvg">
<img src="img/bell.svg" alt="">
<img src="img/account.svg" alt="">
<img src="img/search.svg" alt="" class="searchsvg1">
</div>
</nav>

<script src="js/search.js"></script>
</body>
</html>

0 comments on commit 34fac01

Please sign in to comment.