Skip to content

Commit

Permalink
Merge pull request #78 from RekhaKushwaha01/main
Browse files Browse the repository at this point in the history
Button to toggle between Dark mode and Light mode
  • Loading branch information
Anishkagupta04 authored May 13, 2024
2 parents f9595c4 + 97a1dbf commit 8a84984
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Binary file removed images/12.png
Binary file not shown.
30 changes: 28 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@
<link href="css/style.css" rel="stylesheet">
<link href="patient-portal.css" rel="stylesheet">

<style>
body {
padding: 25px;
background-color: white;
color: black;
font-size: 20px;
}

.dark-mode {
background-color: black;
color: white;
}
.button{
height: 35px;
width: 65px;
background-color: rgb(133, 133, 255);
color: rgb(249, 245, 245);
border-radius: 8px;
}
</style>
</head>

<body>
Expand All @@ -31,7 +51,8 @@
<!-- ############### Top Bar ############### -->



<button class="button" onclick="myFunction()">Toggle</button>

<div id="topbar" class="d-flex align-items-center fixed-top">
<div class="container d-flex justify-content-between">
<div class="contact-info d-flex align-items-center">
Expand Down Expand Up @@ -638,5 +659,10 @@ <h4>Daily Newsletter</h4>
<script src="patient-portal.js"></script>

</body>

<script>
function myFunction() {
var element = document.body;
element.classList.toggle("dark-mode");
}
</script>
</html>

0 comments on commit 8a84984

Please sign in to comment.