Skip to content

Commit

Permalink
added toggle for bar
Browse files Browse the repository at this point in the history
  • Loading branch information
not-amplify authored Feb 1, 2024
1 parent 0af9435 commit e0cca74
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pages/edu.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<button id="saveBookmarkButton" class="hvr-pulse"> <i class="fa-solid fa-star"></i> </button>
</div>
</div>
<div style="position:absolute;right:2px;top:2px;height:50px;">
<button onclick="togglebar()" class="hide-btm-bar-btn hvr-sink"> <i class="fa-solid fa-bars-progress"></i> </button>
</div>
<div id="mySidebar" class="sidebar">
<br>
<a style="font-size:12px;" onclick="hide();"><i style="margin-right:2px;margin-left:10px;"
Expand Down
31 changes: 31 additions & 0 deletions static/css/edu.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,4 +445,35 @@ form {
.menubtn:hover {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}

.hide-btm-bar-btn {
border-radius: 60%;
margin-left: 1px;
margin-right: 1px;
width: 35px;
height: 35px;
background-color: rgba(0, 0, 0, 0.445);
backdrop-filter: blur(10px);
border: none;
cursor: pointer;
}

/* Sink */
.hvr-sink {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sink:hover, .hvr-sink:focus, .hvr-sink:active {
-webkit-transform: translateY(8px);
transform: translateY(8px);
}
10 changes: 10 additions & 0 deletions static/scripts/edu.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ function togglemenu() {
menu.style.height = "0%";
}
}

function togglebar() {
var osbar = document.querySelector(".os-bar")
if (osbar.style.height === "0px") {
osbar.style.height = "50px";
} else {
osbar.style.height = "0px";
}
}

function setIframe() {
let encodedUrl = sessionStorage.getItem("encodedUrl");
console.log(encodedUrl);
Expand Down

0 comments on commit e0cca74

Please sign in to comment.