-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1041 from amandeep-singh-parihar/master
digital clock
- Loading branch information
Showing
15 changed files
with
658 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Digital Clock</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="dayIntro"> | ||
<p id="dayName"></p> | ||
</div> | ||
<div class="container"> | ||
<div class="dispClock"> | ||
<div id="time"></div> | ||
</div> | ||
</div> | ||
<script src="index.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
setInterval(currentTime, 1000); | ||
|
||
function currentTime() | ||
{ | ||
let time = new Date(); // creating object of Date class | ||
let dayName=time.getDay(); | ||
let month=time.getMonth(); | ||
let year=time.getFullYear(); | ||
let date=time.getDate(); | ||
let hour = time.getHours(); | ||
let min = time.getMinutes(); | ||
let sec = time.getSeconds(); | ||
|
||
var am_pm = "AM"; | ||
if(hour==12) | ||
am_pm = "PM"; | ||
if (hour > 12) { | ||
hour -= 12; | ||
am_pm = "PM"; | ||
} | ||
if (hour == 0) { | ||
hour = 12; | ||
am_pm = "AM"; | ||
} | ||
|
||
hour = hour < 10 ? "0" + hour : hour; | ||
min = min < 10 ? "0" + min : min; | ||
sec = sec < 10 ? "0" + sec : sec; | ||
|
||
//value of current time | ||
let currentTime = hour + ":" + min + ":" + sec +" "+ am_pm; | ||
|
||
// value of present day(Day, Month, Year) | ||
var months=["January","February","March","April","May","June","July","August","September","October","November","December"]; | ||
var week=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; | ||
|
||
var presentDay=week[dayName]+", "+months[month]+" "+date+", "+year; | ||
|
||
const clock = document.getElementById("time"); | ||
const dayIntro=document.getElementById("dayName"); | ||
|
||
clock.innerHTML = currentTime; | ||
dayIntro.innerHTML = presentDay; | ||
} | ||
|
||
currentTime(); //calling currentTime() function to initiate the process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* Google font */ | ||
@import url('https://fonts.googleapis.com/css?family=Orbitron'); | ||
|
||
*{ | ||
margin: 0; | ||
padding: 0; | ||
|
||
} | ||
html,body{ | ||
display: grid; | ||
place-items: center; | ||
|
||
} | ||
#dayIntro | ||
{ | ||
font-size: 40px; | ||
font-weight: 600; | ||
letter-spacing: 3px; | ||
border: 7px solid rgb(17,129,134); | ||
border-radius: 10px; | ||
margin: 20px; | ||
font-family: 'Times New Roman', Times, serif; | ||
padding: 15px; | ||
background: linear-gradient(180deg, #a8b9d3,rgb(173, 227, 229)); | ||
} | ||
.container{ | ||
height: 120px; | ||
width: 550px; | ||
position: relative; | ||
background: linear-gradient(135deg, #14ffe9, #ffeb3b, #ff00e0); | ||
border-radius: 10px; | ||
cursor: default; | ||
|
||
} | ||
.container .dispClock, | ||
.container { | ||
position: absolute; | ||
top: 28%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
.container .dispClock{ | ||
top: 50%; | ||
height: 105px; | ||
width: 535px; | ||
background: linear-gradient(147deg, #000000 0%, #2c3e50 74%); | ||
border-radius: 6px; | ||
text-align: center; | ||
} | ||
.dispClock #time{ | ||
line-height: 85px; | ||
color: #fff; | ||
font-size: 70px; | ||
font-weight: 600; | ||
letter-spacing: 1px; | ||
font-family: 'Orbitron', sans-serif; | ||
background: linear-gradient(135deg, #14ffe9, #ffeb3b, #ff00e0); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>AMAZON CLONE</title> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<div class="navbar"> | ||
<div class="nav-logo border"> | ||
<div class="logo"></div> | ||
</div> | ||
|
||
<div class="nav-address border"> | ||
<p class="add-first">Deliver to</p> | ||
<div class="add-icon"> | ||
<i class="fa-solid fa-location-dot"></i> | ||
<p class="add-second">India</p> | ||
</div> | ||
</div> | ||
|
||
<div class="nav-search"> | ||
<select name="" id="" class="search-select"> | ||
<option value="">ALL</option> | ||
</select> | ||
<input type="text" placeholder="Search Amazon" class="search-input"> | ||
<div class="search-icon"> | ||
<i class="fa-solid fa-magnifying-glass"></i> | ||
</div> | ||
</div> | ||
|
||
<div class="country border"> | ||
<i class="flag">🏁</i> | ||
<p class="en">EN</p> | ||
<div class="down-arrow"> | ||
<i class="fa-solid fa-caret-down"></i> | ||
</div> | ||
</div> | ||
|
||
<div class="nav-signin border"> | ||
<div> | ||
<p><span>Hello, sign in</span></p> | ||
<p class="nav-second">Account & list</p> | ||
</div> | ||
<div class="down-arrow-sec"> | ||
<i class="fa-solid fa-caret-down"></i> | ||
</div> | ||
</div> | ||
|
||
<div class="nav-return border"> | ||
<p><span>Returns</span></p> | ||
<p class="nav-second">& Orders</p> | ||
</div> | ||
|
||
<div class="nav-cart border"> | ||
<i class="fa-solid fa-cart-shopping" id="cart-size"></i> | ||
<p class="cart-written">Cart</p> | ||
</div> | ||
</div> | ||
|
||
<div class="panel"> | ||
<div class="panel-all"> | ||
<i class="fa-solid fa-bars"></i> | ||
ALL | ||
</div> | ||
<div class="panel-ops"> | ||
<p>Today's Deals</p> | ||
<p>Buy Again</p> | ||
<p>Customer Service</p> | ||
<p>Registry</p> | ||
<p>Gift Cards</p> | ||
<p>Sell</p> | ||
</div> | ||
<div class="panel-deals"> | ||
Shop deals in Electronics | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<div class="hero-section"> | ||
<div class="hero-msg"> | ||
<p>You are on amazon.com. You can also shop on Amazon India for millions of product with fast local delivery. <a href="#"> Click here to go to amazon.in </a> </p> | ||
</div> | ||
</div> | ||
|
||
<div class="shop-section"> | ||
<div class="box1 box"> | ||
<div class="box-content"> | ||
<h2>Shop deals in Fashion</h2> | ||
<div class="box-img" style="background-image: url('box1_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box2 box"> | ||
<div class="box-content"> | ||
<h2>Health & Personal Care</h2> | ||
<div class="box-img" style="background-image: url('box2_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box3 box"> | ||
<div class="box-content"> | ||
<h2>Furniture and appliances</h2> | ||
<div class="box-img" style="background-image: url('box3_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box4 box"> | ||
<div class="box-content"> | ||
<h2>Smartphones</h2> | ||
<div class="box-img" style="background-image: url('box4_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box1 box"> | ||
<div class="box-content"> | ||
<h2>Beauty picks</h2> | ||
<div class="box-img" style="background-image: url('box5_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box2 box"> | ||
<div class="box-content"> | ||
<h2>Dogs and Cats</h2> | ||
<div class="box-img" style="background-image: url('box6_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box3 box"> | ||
<div class="box-content"> | ||
<h2>New arrivals in Toys</h2> | ||
<div class="box-img" style="background-image: url('box7_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
<div class="box4 box"> | ||
<div class="box-content"> | ||
<h2>Discover fashion trends</h2> | ||
<div class="box-img" style="background-image: url('box8_image.jpg') ;"></div> | ||
<p>See more</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<footer> | ||
<div class="foot-panel1"> | ||
Back to top | ||
</div> | ||
|
||
<div class="foot-panel2"> | ||
<ul> | ||
<p>Get to Know Us</p> | ||
<a>Careers</a> | ||
<a>Blog</a> | ||
<a>About Amazon</a> | ||
<a>Investor Relations</a> | ||
<a>Amazon Devices</a> | ||
<a>Amazon Science</a> | ||
</ul> | ||
<ul> | ||
<p>Make Money with Us</p> | ||
<a>Sell products on Amazon</a> | ||
<a>Sell on Amazon Business</a> | ||
<a>Sell apps on Amazon</a> | ||
<a>Become an Affiliate</a> | ||
<a>Advertise Your Products</a> | ||
<a>Self-Publish with Us</a> | ||
<a>Host an Amazon Hub</a> | ||
</ul> | ||
<ul> | ||
<p>Amazon Payment Products</p> | ||
<a>Amazon Business Card</a> | ||
<a>Shop with Points</a> | ||
<a>Reload Your Balance</a> | ||
<a>Amazon Currency Converter</a> | ||
</ul> | ||
<ul> | ||
<p>Let Us Help You</p> | ||
<a>Amazon and COVID-19</a> | ||
<a>Your Account</a> | ||
<a>Your Orders</a> | ||
<a>Shipping Rates & Policies</a> | ||
<a>Returns & Replacements</a> | ||
<a>Manage Your Content and Devices</a> | ||
<a>Amazon Assistant</a> | ||
<a>Help</a> | ||
</ul> | ||
</div> | ||
|
||
<div class="foot-panel3"> | ||
<div class="logo"></div> | ||
</div> | ||
|
||
<div class="foot-panel4"> | ||
<div class="pages"> | ||
<a>Conditions of use</a> | ||
<a>Privacy Notice</a> | ||
<a>Your ads privacy choices</a> | ||
</div> | ||
<div class="copyright"> | ||
© 1996-2023, Amazon.com, Inc. or its affiliates | ||
</div> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> |
Oops, something went wrong.