Skip to content
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
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<div id="header">
<div id="header" class="head">
<div id="logo">CodeRunner</div>

<button id="runBtn">Run</button>
Expand All @@ -20,6 +20,7 @@
<div class="toggle-btn" id="js">JS</div>
<div class="toggle-btn" id="output">Output</div>
</div>
<button id="toggleDarkMode" onclick="toggleDarkMode()" class="toggleModeButton">Dark Mode</button>
</div>
<div id="bodyContainer">
<textarea class="panelH" id="htmlTA" placeholder="Enter HTML"></textarea>
Expand All @@ -37,5 +38,11 @@
<iframe id="outputDiv" class="panel"></iframe>
</div>
</div>
<script>
function toggleDarkMode() {
var element = document.body;
element.classList.toggle("dark-mode");
}
</script>
</body>
</html>
44 changes: 44 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,48 @@ iframe {

hr {
background-color: #227C7B;
}
.toggleModeButton{
border:1px solid #227C7B;
margin: 10px;
background-color: whitesmoke;
position: relative;
right: 70px;
}
.dark-mode #bodyContainer,
.dark-mode textarea,
.dark-mode .panel{
color: cornsilk!important;
background-color: #1b262c;
}
.dark-mode textarea::placeholder {
color: white;
opacity: 1;
}
.dark-mode #logo{
color: #bbe1fa!important;
}
.dark-mode .head{
background-color: #0f4c75!important;
}
.dark-mode #runBtn{
background-color: #bbe1fa!important;
}
.dark-mode #btnContainer{
color: white!important;
background-color: #0f4c75!important;
border-color: #227C7B!important;
}
.dark-mode #btnContainer .toggle-btn{
color: white!important;
border-color: #227C7B!important;

}
.dark-mode hr{
border-color: #227C7B;
margin: 0px!important;
}
.dark-mode .toggleModeButton{
background-color: #1b262c!important;
color: whitesmoke!important;
}