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 achievements section #4679

Merged
merged 1 commit into from
Nov 6, 2024
Merged
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
147 changes: 147 additions & 0 deletions achievements.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Badge Information - SwapReads</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: pink;
color: #333;
margin: 0;
padding: 20px;
}

.container {
max-width: 1600px;
margin: auto;
padding: 20px;
background-color: #faf7faca;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
text-align: center;
color: #d35400; /* Dark orange color */
}

table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
background-color: rgba(255, 192, 203, 0.609);
}

th, td {
padding: 12px;
border: 1px solid #848181;
text-align: center;
font-style: italic;
font-size: 19.5px;
color: black;
}


th {
background-color: #f39c12; /* Orange color */
color: white;
}

.badge-img {
width: 150px;
height: 150px;
}

.prompt {
text-align: center;
margin-top: 20px;
padding: 10px;
background-color: #f9f1e7;
border-radius: 8px;
}

#loginButton {
background-color: #e67e22; /* Orange button color */
color: white;
border: none;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border-radius: 4px;
margin-top: 10px;
}

#loginButton:hover {
background-color: #d35400; /* Darker orange */
}

</style>
</head>
<body>
<div class="container">
<h1>Badge Achievement Information</h1>
<table id="badgeTable">
<thead>
<tr>
<th>Badge Image</th>
<th>How to Earn</th>
<th>Points</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="assets/images/website-login.png" alt="Badge 1" class="badge-img"></td>
<td>Signup to SwapReads</td>
<td>10 points</td>
</tr>
<tr>
<td><img src="assets/images/your-first-read.png" alt="Badge 2" class="badge-img"></td>
<td>Complete your First Book</td>
<td>30 points</td>
</tr>
<tr>
<td><img src="assets/images/first-5-read.png" alt="Badge 3" class="badge-img"></td>
<td>Complete five books in a Row</td>
<td>60 points</td>
</tr>
<tr>
<td><img src="assets/images/part-of-our-community.png" alt="Badge 4" class="badge-img"></td>
<td>Signup to our NewsLetter</td>
<td>20 points</td>
</tr>
<tr>
<td><img src="assets/images/share-books.png" alt="Badge 5" class="badge-img"></td>
<td>Share a SwapRead Book</td>
<td>40 points</td>
</tr>
<tr>
<td><img src="assets/images/10-books-30-days.png" alt="Badge 6" class="badge-img"></td>
<td>Complete Reading 10 Books in 30 Days</td>
<td>90 points</td>
</tr>
<tr>
<td><img src="assets/images/swap-read-mega-1.png" alt="Badge 7" class="badge-img"></td>
<td>Earn all the badges to Win this Mega Badge</td>
<td>300 points</td>
</tr>
<!-- Add more badges as needed -->
</tbody>
</table>

<div class="prompt">
<p style="font-weight: bold; font-size: 21px;">Want to see which badges you've earned? Log in to find out!</p>
<button id="loginButton">Login to your Profile</button>
</div>
</div>

<script>
// JavaScript for navigation to login page
document.getElementById("loginButton").onclick = function() {
window.location.href = "assets/html/login.html"; // Replace with the actual login page URL
};

</script>
</body>
</html>
Binary file added assets/images/10-books-30-days.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/first-5-read.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/part-of-our-community.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/share-books.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/swap-read-mega-1.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/website-login.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/your-first-read.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7807,6 +7807,46 @@ <h1>Subscribe to Our Newsletter</h1>
</script>


<button id="achievement" class="achievement-button" onclick="window.location.href='./achievements.html'" title="Achievements">🏅</button>

<style>
.achievement-button {
position: fixed;
right: 45px;
top: 50%;
transform: translateY(-50%);
background: linear-gradient(hwb(357 6% 30%), #d26d6d);
color: white;
border: none;
border-radius: 50%;
/* Make it circular */
width: 50px;
/* Set width */
height: 50px;
/* Set height */
padding: 0;
/* Remove padding */
cursor: pointer;
z-index: 1005;
/* Ensure button is on top */
display: flex;
/* Center content */
justify-content: center;
/* Center content horizontally */
align-items: center;
/* Center content vertically */
font-size: 12px;
/* Smaller font size */
text-align: center;
/* Center text */
font-size: 23px;
}

.achievement-button:hover {
transform: translateY(-50%) scale(1.2);
}
</style>

<style>

.popupp {
Expand Down
18 changes: 17 additions & 1 deletion profiletest.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@
transition: transform 0.1s ease-out;
}
</style>
<style></style>
<style>
.badges-img img{
width: 160px;
height: 160px;
}
</style>
</head>

<body>
Expand Down Expand Up @@ -179,6 +184,17 @@ <h3>Recent Activity</h3>
</div>
</div>

<div class="content-section" id="badge-earned">
<h2>Badges Earned</h2>
<div class="badges-img" style="display: inline;">
<img src="assets/images/website-login.png" alt="website-login" title="successfully logd-in">
<img src="assets/images/your-first-read.png" alt="first-book-completion" title="1st book completion">
<img src="assets/images/part-of-our-community.png" alt="newsletter-signup" title="signed-up newsletter">
<img src="assets/images/share-books.png" alt="shared-a-book" title="Shared a book">
<img src="assets/images/first-5-read.png" alt="5-book-completion" title="completed 5 books">
</div>
</div>

<section class="content-section">
<h2>Notifications</h2>
<div class="card">
Expand Down
Loading