Skip to content

Commit

Permalink
Analog clock (Avdhesh-Varshney#526)
Browse files Browse the repository at this point in the history
* added code-editor

* added analog-clock

* Updated README.md

* updated readme
  • Loading branch information
VaishnaviMankala19 authored Jul 14, 2024
1 parent 8d6d66f commit d8e0250
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 0 deletions.
75 changes: 75 additions & 0 deletions Vanilla-JS-Projects/Basic/Analog-Clock/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<h1 align='center'><b>💥 ANALOG-CLOCK 💥</b></h1>

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h3 align='center'>Tech Stack Used 🎮</h3>
<!-- enlist all the technologies used to create this project from them (Remove comment using 'ctrl+z' or 'command+z') -->

<div align='center'>

![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)
![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white)
<!-- ![Bootstrap](https://img.shields.io/badge/bootstrap-%238511FA.svg?style=for-the-badge&logo=bootstrap&logoColor=white) -->
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
<!-- ![jQuery](https://img.shields.io/badge/jquery-%230769AD.svg?style=for-the-badge&logo=jquery&logoColor=white) -->
<!-- ![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB) -->
<!-- ![Redux](https://img.shields.io/badge/redux-%23593d88.svg?style=for-the-badge&logo=redux&logoColor=white) -->
<!-- ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white) -->
<!-- ![Web3.js](https://img.shields.io/badge/web3.js-F16822?style=for-the-badge&logo=web3.js&logoColor=white) -->
<!-- ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB) -->
<!-- ![Angular.js](https://img.shields.io/badge/angular.js-%23E23237.svg?style=for-the-badge&logo=angularjs&logoColor=white) -->
<!-- ![Next JS](https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white) -->
<!-- ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) -->
<!-- ![Vue.js](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D) -->
<!-- ![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge&logo=mongodb&logoColor=white) -->
</div>


![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Description 📃

<div>
<!-- <p>Add Description of the project</p> -->
<p>An analog clock made with HTML, CSS, and JavaScript visually represents time using a traditional clock face with rotating hour, minute, and second hands. It showcases seamless integration of web technologies to create dynamic, real-time animations.</p>
</div>


<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: How to run it? 🕹️

<!-- Add steps how to run this project -->

- Clone this repository.
- Navigate to this project directory
- Run the `index.html` file.

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Screenshots 📸
<!-- add the screenshot of the project (Mandatory) -->
![img](./screenshot.webp)




![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h4 align='center'>Developed By <b><i>MANKALA VAISHNAVI</i></b> 👦</h4>
<p align='center'>
<a href='https://www.linkedin.com/in/vaishnavi-mankala-33a256252/'>
<img src='https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white' />
</a>
<a href='https://github.com/VaishnaviMankala19'>
<img src='https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white' />
</a>
</p>

<h4 align='center'>Happy Coding 🧑‍💻</h4>

<h3 align="center">Show some &nbsp;❤️&nbsp; by &nbsp;🌟&nbsp; this repository!</h3>
19 changes: 19 additions & 0 deletions Vanilla-JS-Projects/Basic/Analog-Clock/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<script src="index.js"></script>
<title>clock</title>
</head>
<body>
<h1>ANALOG CLOCK</h1>
<div id="clockcontainer">
<div id="hour"></div>
<div id="min"></div>
<div id="sec"></div>
</div>
</body>
</html>
14 changes: 14 additions & 0 deletions Vanilla-JS-Projects/Basic/Analog-Clock/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
setInterval(()=>{
d=new Date();
th=d.getHours();
tm=d.getMinutes();
ts=d.getSeconds();
hrot=30*th + tm/2;
mrot=6*tm;
srot=6*ts;

hour.style.transform=`rotate(${hrot}deg)`;
min.style.transform=`rotate(${mrot}deg)`;
sec.style.transform=`rotate(${srot}deg)`;

},1000)
Binary file not shown.
39 changes: 39 additions & 0 deletions Vanilla-JS-Projects/Basic/Analog-Clock/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
html{
background-color: #9376E0;
}
h1{
text-align: center;
}
#clockcontainer{
height:39vw;
width:40vw;
position: relative;
margin:auto;
background-image: url("https://clipart-library.com/images/8c65Lyrzi.jpg");
background-size: 100%;
border-radius: 20px;
}
#hour,#min,#sec{
background-color: black;
border-radius: 10px;
transform-origin: bottom;
position: absolute;
}
#hour{
height: 25%;
width: 1.8%;
top:24%;
left:48.4%;
}
#min{
height: 30%;
width: 1.5%;
top:19%;
left:48.5%;
}
#sec{
height: 33%;
width: 1.0%;
top:15.9%;
left:48.9%;
}
1 change: 1 addition & 0 deletions Vanilla-JS-Projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
| 56 | [Isomorphic-Strings-Checker](./Basic/Isomorphic-Strings-Checker/) | ![Basic](https://img.shields.io/badge/Basic-00FF00?style=for-the-badge) |
| 57 | [Random-Advice-Generator](./Basic/Random-Advice-Generator/) | ![Basic](https://img.shields.io/badge/Basic-00FF00?style=for-the-badge) |
| 58 | [Task-Reminder](./Intermediate/Task-Reminder/) | ![Intermediate](https://img.shields.io/badge/Intermediate-FFD700?style=for-the-badge) |
| 59 | [Analog-Clock](./Basic/Analog-Clock/) | ![Basic](https://img.shields.io/badge/Basic-00FF00?style=for-the-badge) |
</div>


Expand Down

0 comments on commit d8e0250

Please sign in to comment.