Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Progress Bar assets #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
Binary file added assets/images/FireBackground_Pixelart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/SpaceBackground_Pixelart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Spaceship_Pixelart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 25 additions & 7 deletions assets/scripts/ProjectCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ class ProjectCard extends HTMLElement {
width: 100%;
}
.project-card .progress-bar {
width: 100%;
background-color: grey;
position: absolute;
bottom: 52px;
width: 89%;
height: 5%;
background-image: url('assets/images/SpaceBackground_Pixelart.png');
background-size: 100% cover;
background-position: center;
background-repeat: no-repeat;
}

.project-card .desc {
Expand All @@ -98,16 +104,25 @@ class ProjectCard extends HTMLElement {
border-radius: 5% 5% 5% 5%;
background-color: rgba(0, 0, 0, 0.164);
}
.progress-bar {
height: 100%;
}
.progress-bar > .progress-bar-fill {
width: 12%;
position: absolute;
height: 100%;
background-color: rgb(0, 128, 122);
background-image: url('assets/images/FireBackground_Pixelart.png');
background-size: 100% cover;
background-position: center;
background-repeat: no-repeat;
text-align: center;
color: white;
}
.progress-bar > .cursor {
position: absolute;
height: 100%;
width: 12%;
background-image: url('assets/images/Spaceship_Pixelart.png');
background-size: 100% 100%;
background-position: center;
background-repeat: no-repeat;
}

/**
* accessibility: 3 stages
Expand Down Expand Up @@ -208,6 +223,9 @@ class ProjectCard extends HTMLElement {
<div class="progress-bar-fill" style="width: ${
data.progress || 0
}%;">${data.progress || 0}%</div>
<div class="cursor" style="left: ${
data.progress-5 || 0
}%;"></div>
</div>
</div>
<div class="actions">
Expand Down
2 changes: 1 addition & 1 deletion assets/styles/homepage.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body, html {
box-sizing: border-box;
height: 100%;
font-family: 'Arial', sans-serif; /* Temporary */
background: url('assets/images/space-background.jpg') no-repeat center center fixed; /* Add the starry background image */
background: url('../images/background.jpg') no-repeat center center fixed; /* Add the starry background image */
background-size: cover;
min-height: 500px;
}
Expand Down
Loading