Skip to content

Responsive website for mobile ,tablet ,laptop and desktop. #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 73 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,40 @@
></script>
</head>
<body>

<!--header section-->

<header>
<div id="header">
<div class="header-logo">
<a href="indext.html"><img src="images/logo.png" alt="" /></a>
</div>
<div class='div-side' id='sideDiv' >

<div class="header-logo">

<a href="indext.html"><img src="images/logo.png" alt="" /></a> </div>
<ul>

<li><a class="active" href="index.html">Home</a></li>
<li><a href="shop.html">Shop</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</nav>
<div class="header-list-icon">
<a href=""><i class="fa fa-bag-shopping"></i></a>

</div></div>
<ul class="ul-header">
<li><button class="btn-span" onclick="sideOpen()">
<span></span>
<span></span>
<span></span>
</button></li>
<li><div class="header-logo">

<a href="indext.html"><img src="images/logo.png" alt="" /></a> </div></li>
</ul>

<div class="header-list">
<nav class="header-list-nav">
<ul>
Expand All @@ -39,15 +66,15 @@
<!--main section-->

<main>
<section id="hero">
<section id="hero" onclick="closeDiv()">
<h4>Trade-in-offer</h4>
<h2>Super value deals</h2>
<h1>On all products</h1>
<p>save more coupons & up to 70% off!</p>
<button>Shop now</button>
</section>

<section id="features" class="section-p1">
<section id="features" class="section-p1" onclick="closeDiv()">
<div class="f-box">
<img src="images/features/f1.png" alt="free shipping" />
<h6>Free shipping</h6>
Expand All @@ -74,7 +101,7 @@ <h6>24/7 support</h6>
</div>
</section>

<section class="product-section" class="section-p1">
<section class="product-section" class="section-p1" onclick="closeDiv()">
<h1>Featured Products</h1>
<p>Summer Collection New Morden Design</p>
<div class="pro-collection">
Expand Down Expand Up @@ -106,7 +133,7 @@ <h4>Cartoon Astronaut T-Shirts</h4>
<h4 class="price">$78</h4>
<a href="#"><i class="fa-solid fa-cart-shopping buy-icon"></i></a>
</div>
<div class="product-cart">
<div class="product-cart" onclick="closeDiv()">
<img src="images/products/f3.jpg" alt="product image" />
<span>adidas</span>
<h4>Cartoon Astronaut T-Shirts</h4>
Expand Down Expand Up @@ -193,13 +220,13 @@ <h4 class="price">$78</h4>
</div>
</section>

<section id="off-banner" class="section-m1">
<section id="off-banner" class="section-m1" onclick="closeDiv()">
<h4>Repaire Services</h4>
<h2>Up to 70% Off - All t-Shirts & Accessories</h2>
<button class="normal">Explore More</button>
</section>

<section class="product-section" class="section-p1">
<section class="product-section" class="section-p1" onclick="closeDiv()">
<h1>New Arrivals</h1>
<p>Summer Collection New Morden Design</p>
<div class="pro-collection">
Expand Down Expand Up @@ -318,7 +345,7 @@ <h4 class="price">$78</h4>
</div>
</section>

<section id="banners" class="section-p1">
<section id="banners" class="section-p1" onclick="closeDiv()">
<div class="big-banners">
<div class="big-banners-1">
<h4>crazy deals</h4>
Expand Down Expand Up @@ -349,7 +376,7 @@ <h5>New Trendy Prints</h4>
</div>
</section>

<section id="newsletter">
<section id="newsletter" onclick="closeDiv()">
<div class="newsletter-text">
<h3>Sign Up For Newsletters</h3>
<h5>get e-mail updates about out latest shop and <span>special offers</span></h5>
Expand All @@ -365,7 +392,7 @@ <h5>get e-mail updates about out latest shop and <span>special offers</span></h5
<!--footer section-->

<footer>
<div id="footer">
<div id="footer" onclick="closeDiv()">
<div class="contact">
<a href="indext.html"><img src="images/logo.png" alt="" /></a>
<br> <br>
Expand Down Expand Up @@ -420,5 +447,39 @@ <h3>Install App</h3>
</footer>

<script src="script.js"></script>
<script>
let sideDrawer=false
let count;
var sideDiv=document.getElementById('sideDiv')
var sideOpenB=sideDiv.style.display = "none";
var x = window.matchMedia("(min-width:768px)")
window.onresize=resizeFn;
function resizeFn(){
if(x.matches){

if(sideOpenB==='block'){
sideOpenB=sideDiv.style.display = "none";
}
}
}


function sideOpen() {

sideDrawer=true
if(sideDrawer && sideDiv.style.display === "none"){
sideOpenB=sideDiv.style.display = "block";

}
}


function closeDiv(){
if(sideDiv.style.display === "block"){
sideDiv.style.display = "none";
}
}

</script>
</body>
</html>
Loading