Skip to content

Commit

Permalink
Merge pull request #69 from aidan-yip/preview
Browse files Browse the repository at this point in the history
Added up arrow to homebar
  • Loading branch information
aidan-yip authored Sep 3, 2024
2 parents 3626115 + 2b81e47 commit 7a8f9f8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
public/app_icons/.DS_Store
public/.DS_Store
public/.DS_Store
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
</div>
</div>
<div id="background">
<img src="./public/icons/icons8-collapse-arrow-100.png" id="arrow_up" />
<div id="home_bar">
<div
class="app_icon"
Expand Down Expand Up @@ -422,7 +423,10 @@
data-tilt-max-glare="0.6"
data-tilt-scale="113%"
>
<img src="./public/app_icons/icons8-airpods-3-100.png" id="airpods_img" />
<img
src="./public/app_icons/icons8-airpods-3-100.png"
id="airpods_img"
/>
</div>

<div
Expand Down
Binary file modified public/.DS_Store
Binary file not shown.
Binary file added public/icons/icons8-collapse-arrow-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function check_mobile() {
}
}

//Arrow
const arrow_up = document.getElementById("arrow_up");

let isMobile =
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
Expand All @@ -24,6 +27,7 @@ if (isMobile) {
if (window.innerHeight > window.innerWidth) {
alert("Please rotate to Landscape!");
}
arrow_up.style.display = "none";
console.log("Mobile device detected");
}

Expand Down Expand Up @@ -357,6 +361,11 @@ home_bar.onmouseleave = () => {

//Link onclick events

//arrow
arrow_up.onmouseover = () => {
arrow_up.style.cursor = "pointer";
}

//folder
app_folder.onclick = () => {
folder_back.style.pointerEvents = "all";
Expand Down
18 changes: 17 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,20 @@ body {
transform: translateZ(20px);
}

#arrow_up {
width: 3%;
height: 35px;
z-index: 4;
position: relative;
margin-left: auto;
margin-right: auto;
margin-top: 36%;
opacity: 70%;
}

#color_input {
width: 50%;
height: 60%;
height: 70%;
border: solid 3px #212121;
border-radius: 10px;
transform: translateZ(20px);
Expand All @@ -154,6 +165,7 @@ body {

#background {
display: flex;
flex-direction: column;
justify-content: center;
width: 100vw;
height: 90vh;
Expand Down Expand Up @@ -706,6 +718,10 @@ img {
display: none;
}

#color_input {
height: 50%;
}

input[type="range"] {
-webkit-appearance: none;
width: 80%;
Expand Down

0 comments on commit 7a8f9f8

Please sign in to comment.