Skip to content

Commit

Permalink
Merge pull request #71 from aidan-yip/preview
Browse files Browse the repository at this point in the history
Added arrow text and adjusted arrow
  • Loading branch information
aidan-yip authored Sep 3, 2024
2 parents f5b8df0 + e3333ee commit 263ac4d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
</div>
<div id="background">
<img src="./public/icons/icons8-collapse-arrow-100.png" id="arrow_up" />
<h2 id="arrow_text">Scroll up for more apps</h2>
<div id="home_bar">
<div
class="app_icon"
Expand Down
18 changes: 16 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ function check_mobile() {
}
}

//Arrow
//Arrow and arrow text
const arrow_up = document.getElementById("arrow_up");
const arrow_text = document.getElementById("arrow_text");

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

Expand Down Expand Up @@ -359,13 +361,25 @@ home_bar.onmouseleave = () => {
console.log("Reset Homebar");
};

//Link onclick events
//Link onclick and mouse events

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

arrow_up.onclick = () => {
scroll_container.scrollIntoView();
}

arrow_text.onmouseover = () => {
arrow_text.style.cursor = "pointer";
}

arrow_text.onclick = () => {
scroll_container.scrollIntoView();
}

//folder
app_folder.onclick = () => {
folder_back.style.pointerEvents = "all";
Expand Down
17 changes: 15 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,27 @@ body {
}

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

#arrow_text {
position: relative;
z-index: 3;
color: #ffffff;
margin-left: auto;
margin-right: auto;
margin-top: 36%;
font-size: 90%;
top: 33%;
margin-bottom: 10px;
opacity: 70%;
text-shadow: 0px 0px 45px #000000;
}

#color_input {
Expand Down

0 comments on commit 263ac4d

Please sign in to comment.