Skip to content
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

Added Bulb ON/OFF #732

Merged
merged 2 commits into from
Aug 4, 2024
Merged
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
70 changes: 70 additions & 0 deletions Vanilla-JS-Projects/Basic/Bulb-On-Off/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<h1 align='center'><b>💥 Bulb On/Off 💥</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)
![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>In this simple project , on click of the power button the bulb glows and on another click bulb stops glowing .</p>

</div>


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

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

- Fork this repository.
- Clone the forked repository.
- Open index.html in your web browser to start your culinary exploration.



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

## :zap: Screenshots 📸
<!-- add the screenshot of the project (Mandatory) -->
![Adviceimg](./screenshot.webp)
![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

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

<h4 align='center'>Developed By <b><i>Meet Arora</i></b> 👦</h4>
<p align='center'>
<a href='https://www.linkedin.com/in/meet-arora-603682296'>
<img src='https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white' />
</a>
<a href='https://github.com/meetarora10'>
<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>
22 changes: 22 additions & 0 deletions Vanilla-JS-Projects/Basic/Bulb-On-Off/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bulb On/Off</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="container">
<div class="wire"></div>
<div class="bulb">
<i class="fas fa-lightbulb"></i>
</div>
<div class="power">
<i class="fas fa-power-off" onclick="toggle()"></i>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
Binary file not shown.
4 changes: 4 additions & 0 deletions Vanilla-JS-Projects/Basic/Bulb-On-Off/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const body = document.body;
const toggle = () =>{
body.classList.toggle('on');
}
45 changes: 45 additions & 0 deletions Vanilla-JS-Projects/Basic/Bulb-On-Off/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
body{
display: flex;
height: 100vh;
width: 100vw;
justify-content: center;
background-color: black;
background: linear-gradient(45deg,rgb(60, 59, 59),black);
}
body.on{
background: radial-gradient(rgb(212, 207, 207),rgb(88, 88, 88))
}
.wire{
background-color: white;
height: 300px;
width: 5px;
border-radius: 3px;
}
i{
font-size: 37px;
color: grey;
}
.bulb{
position: relative;
right: 11px;
rotate: 180deg;
}
.power{
position: absolute;
top: 60px;
right: 100px;
height: 40px;
width: 40px;
background-color: white;
display: flex;
border-radius: 50%;
justify-content: center;
align-items: center;
cursor: pointer;
}
.on .bulb i{
color: yellow;
}
.on .power{
background-color: rgb(123, 244, 123);
}
1 change: 1 addition & 0 deletions Vanilla-JS-Projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
| 87 | [Dictionay-App](./Basic/Dictionary-App/) | ![Basic](https://img.shields.io/badge/Basic-00FF00?style=for-the-badge) |
| 88 | [Hackathon-Tracker](./Advanced/Hackathon-Tracker/) | ![Advanced](https://img.shields.io/badge/Advanced-FF0000?style=for-the-badge) |
| 89 | [Travel-Journal](./Intermediate/Travel-Journal/) | ![Intermediate](https://img.shields.io/badge/Intermediate-FFD700?style=for-the-badge) |
| 90 | [Bulb-On-Off](./Basic/Bulb-On-Off/) | ![Basic](https://img.shields.io/badge/Basic-00FF00?style=for-the-badge) |
</div>


Expand Down