Skip to content

Commit

Permalink
Merge pull request #613 from sabhansali/main
Browse files Browse the repository at this point in the history
adding icons to side bar
  • Loading branch information
aditya-bhaumik authored Aug 8, 2024
2 parents 4912aa1 + ee6489b commit 9178183
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
23 changes: 22 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ nav ul li a {
font-size: 20px;
}

nav ul li a:hover {
nav ul li a:hover, nav ul li #pauseStartBtn:hover {
color: #ff7f50;
}

Expand Down Expand Up @@ -2718,3 +2718,24 @@ goog-logo-link,
font-size: 10px !important;
}
}


#pauseStartBtn {
display: flex;
align-items: center;
font-size: 20px;
text-decoration: none;
color: white;
}

#pauseStartBtn i {
margin-right: 0.5em;
font-size: 20px;
}

#pauseStartBtn .button-text {
font-size: 20px;
font-family: inherit;
}


8 changes: 3 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@
<ul class="sidebarOne">
<li class="cross"><i style="cursor: pointer;" class="fa-solid fa-x"></i></li>
<li class="logo"><a href="./index.html"><img src="assets/images/logo/logo..png" alt="Website Logo"></a></li>
<li><a href="#" id="reload" style="display: none;" aria-label="reload">Reload</a></li>
<li><a href="#" id="reload" style="display: none;" aria-label="reload"><i class="fa-solid fa-rotate-right"></i> Reload</a></li>
<!-- <li><a href="#" id="addTime" aria-label="Add Time" style="display: none;">Add Time</a></li> -->
<li><a href="#" id="pauseStartBtn" style="display: none;" aria-label="Pause/Start">Pause</a></li>
<li><a href="#" id="pauseStartBtn" style="display: none;" aria-label="Pause/Start"><i class="fa-solid fa-pause"></i><span class="button-text">Pause</span></a></li>
<li><a href="#" id="fullscreenBtn" aria-label="Toggle Fullscreen"><i class="fa fa-chalkboard-teacher" aria-hidden="true"></i> Fullscreen</a></li>
<li><a href="#" id="editBtn" aria-label="Edit">Edit</a></li>
<li><a href="#" id="editBtn" aria-label="Edit"><i class="fa-solid fa-pen-to-square"></i> Edit</a></li>
<!-- edit drop down content -->
<div class="editdropdown" id="editdropdown" style="display: none;">
<li class="exclude"><a href="#" id="addTime" aria-label="Add Time">Add Time</a></li>
Expand Down Expand Up @@ -730,9 +730,7 @@ <h2>Account Not Available</h2>
<script src="js/background.js"></script>
<script src="js/social.js"></script>
<script src="js/script.js"></script>

<script src="/js/backToTopBtn.js"></script>

<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
Expand Down
14 changes: 11 additions & 3 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,14 @@ document.addEventListener('DOMContentLoaded', () => {
musicMuted = selectedAudio.muted; // Remember the mute state
selectedAudio.pause();
}
// document.getElementById('changeMusic').style.display = 'none';//to disable changing of music when simulation is paused.
/* document.getElementById('changeMusic').style.display = 'none';//to disable changing of music when simulation is paused.
pauseStartButton.textContent = 'Resume';
isPaused = true;
isPaused = true;*/
// console.log(musicAudio); testing
pauseStartButton.querySelector('i').className = 'fa-solid fa-play';
pauseStartButton.querySelector('span').textContent = 'Resume';
isPaused = true;

}

function resumeSimulation() {
Expand All @@ -671,8 +675,12 @@ document.addEventListener('DOMContentLoaded', () => {
document.getElementById('color2').value
);
// console.log(musicAudio); testing

/*let text = document.getElementById("pauseStartBtn").innerHTML;
pauseStartButton.textContent = 'Pause';
//pauseStartButton.textContent = document.getElementById("pauseStartBtn").innerHTML;
isPaused = false;*/
pauseStartButton.querySelector('i').className = 'fa-solid fa-pause';
pauseStartButton.querySelector('span').textContent = 'Pause';
isPaused = false;
}

Expand Down
2 changes: 1 addition & 1 deletion pages/licensing.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ <h1 id="changingHeading" style="font-family: Arial, sans-serif; font-size: 30px;
<pre>
MIT License

Copyright (c) <span id="year"></span> Random-Disco-Light-Simulator. All rights reserved.
Copyright (c) <span id="year"></span> Sanu Kumar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 9178183

Please sign in to comment.