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 User profile section and also added check progress section in profile dropdown #297

Merged
merged 1 commit into from
Jun 12, 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
44 changes: 44 additions & 0 deletions check-progress.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Check Progress</title>
<link rel="stylesheet" href="progress.css">
</head>

<body>
<header class="header">
<a href="about.html" class="btn--about">About Us</a>
<div class="profile-menu">
<button class="profile-btn">
<img src="profilepic.jpg" class="profile-pic">
</button>
<div class="dropdown-content">
<a href="edit-profile.html">Edit Profile</a>
<a href="check-progress.html">Check Progress</a>
<a href="settings.html">Settings</a>
<a href="#">Exit</a>
<a href="#">Sign Out</a>
</div>
</div>
</header>

<div class="progress-container">
<h1>Your Rubik's Cube Progress</h1>
<div class="progress-stats">
<div>Total Solves: <span id="total-solves">--</span></div>
<div>Best Time: <span id="best-time">--</span></div>
<div>Average Time: <span id="average-time">--</span></div>
<div>Types of Cubes Solved: <span id="cube-types">3x3, 4x4, 5x5</span></div>
<div>Latest Solves:</div>
<ul id="recent-solves">
<!-- List of recent solves will be inserted here -->
</ul>
</div>
</div>

<script src="progress.js"></script>
</body>

</html>
45 changes: 45 additions & 0 deletions edit-profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Profile Dropdown and Edit Profile</title>
<link rel="stylesheet" href="profile.css">
</head>

<body>
<header class="header">
<a href="index.html">About Us</a>
<div class="profile-menu">
<button class="profile-btn">
<img src="./images/profilepic.jpg" class="profile-pic" id="main-profile-pic">
</button>
<div class="dropdown-content">
<a href="edit-profile.html" id="edit-profile-link">Edit Profile</a>
<a href="#" id="dropdown-settings-link">Settings</a>
<a href="check-progress.html" id="check-progress">Check Progress</a>
<a href="#">Exit</a>
<a href="#">Sign Out</a>
</div>
</div>
</header>

<!-- Edit Profile Form -->
<div id="edit-profile-form">
<h1>Edit Profile</h1>
<p>You are playing as a guest now, add details to identify you.</p>
<form id="edit-profile">
<label for="name">Name:</label>
<input type="text" id="name" name="name">

<label for="profile-pic">Profile Picture:</label>
<input type="file" id="profile-pic" name="profile-pic" accept="image/*">

<button type="submit">Save</button>
</form>
</div>

<script src="profile.js"></script>
</body>

</html>
Binary file added images/profilepic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
212 changes: 116 additions & 96 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,126 +1,146 @@

<!DOCTYPE html>
<html lang="en" >
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Rubik Cube</title>
<link rel="icon" type="image/x-icon" href="images\icon.png">
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"><link rel="stylesheet" href="./style.css">
<meta charset="UTF-8">
<title>Rubik Cube</title>
<link rel="icon" type="image/x-icon" href="images\icon.png">
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<link rel="stylesheet" href="./style.css">
<!--Link form FontAwesome for volume icon, info icon, left arrow icon-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
</head>

<body>
<!-- separate div element for the goggle sign-in/log-in element -->
<!-- g_id_onload is for automatic loading of the Google Identity Services. -->
<div id="g_id_onload"
data-client_id="1056580552736-gos4t0nvaco0o3eq9v5tdaa1425qhhdu.apps.googleusercontent.com"

data-callback="handleCredentialResponse">
</div>
<!-- the data client id is the goggle o-auth secret client id. -->
<!-- g_id_signin is for rendering the Google Sign-In button. -->
<header class="ui__header header">
<!-- Added "header" class -->
<a href="about.html" class="btn--about">About Us</a>
<!-- Profile dropdown button -->
<div class="profile-menu">
<button class="profile-btn">
<img src="profilepic.jpg" alt="Profile Picture" class="profile-pic">
</button>
<!-- Dropdown menu -->
<div class="dropdown-content">
<a href="edit-profile.html">Edit Profile</a>
<a href="check-progress.html">Check Progress</a>
<a href="#">Settings</a>
<a href="#">Exit</a>
<a href="#">Sign Out</a>
</div>
</div>
</header>
<!-- separate div element for the goggle sign-in/log-in element -->

<div class="g_id_signin" data-type="standard"></div>
<!-- g_id_onload is for automatic loading of the Google Identity Services. -->
<div id="g_id_onload" data-client_id="1056580552736-gos4t0nvaco0o3eq9v5tdaa1425qhhdu.apps.googleusercontent.com" data-callback="handleCredentialResponse">
</div>
<!-- the data client id is the goggle o-auth secret client id. -->
<!-- g_id_signin is for rendering the Google Sign-In button. -->

<!-- Adding the Google Identity Services script to your HTML file. -->
<script src="https://accounts.google.com/gsi/client" async defer></script>
<div class="g_id_signin" data-type="standard"></div>

<!-- Added the script1.js file for initializing the Google Identity Services client and handle the sign-in process. -->
<script src="script1.js"></script>
<!-- Adding the Google Identity Services script to your HTML file. -->
<script src="https://accounts.google.com/gsi/client" async defer></script>

<div class="ui">
<!-- Added the script1.js file for initializing the Google Identity Services client and handle the sign-in process. -->
<script src="script1.js"></script>

<div class="ui__background"></div>
<div class="ui">

<div class="ui__game"></div>
<div class="ui__background"></div>

<div class="ui__texts">
<h1 class="text text--title">
<span>Let's</span>
<span>Solve!</span>
</h1>
<div class="text text--note">
Double tap to start
</div>
<div class="text text--timer">
0:00
</div>
<div class="text text--complete">
<span>Complete!</span>
</div>
<div class="text text--best-time">
<icon trophy></icon>
<span>Best Time!</span>
</div>
</div>

<div class="ui__prefs">
<range name="size" title="Cube Size" list="2,3,4,5"></range>
<range name="flip" title="Flip Type" list="Swift&nbsp;,Smooth,Bounce"></range>
<range name="scramble" title="Scramble Length" list="20,25,30"></range>
<range name="fov" title="Camera Angle" list="Ortographic,Perspective"></range>
<range name="theme" title="Color Scheme" list="Cube,Erno,Dust,Camo,Rain"></range>
</div>

<div class="ui__theme">
<range name="hue" title="Hue" color></range>
<range name="saturation" title="Saturation" color></range>
<range name="lightness" title="Lightness" color></range>
</div>

<div class="ui__stats">
<div class="stats" name="cube-size">
<i>Cube:</i><b>3x3x3</b>
</div>
<div class="stats" name="total-solves">
<i>Total solves:</i><b>-</b>
</div>
<div class="stats" name="best-time">
<i>Best time:</i><b>-</b>
</div>
<div class="stats" name="worst-time">
<i>Worst time:</i><b>-</b>
</div>
<div class="stats" name="average-5">
<i>Average of 5:</i><b>-</b>
</div>
<div class="stats" name="average-12">
<i>Average of 12:</i><b>-</b>
</div>
<div class="stats" name="average-25">
<i>Average of 25:</i><b>-</b>
</div>
</div>
<div class="ui__game"></div>

<div class="ui__texts">
<h1 class="text text--title">
<span>Let's</span>
<span>Solve!</span>
</h1>
<div class="text text--note">
Double tap to start
</div>
<div class="text text--timer">
0:00
</div>
<div class="text text--complete">
<span>Complete!</span>
</div>
<div class="text text--best-time">
<icon trophy></icon>
<span>Best Time!</span>
</div>
</div>

<div class="ui__prefs">
<range name="size" title="Cube Size" list="2,3,4,5"></range>
<range name="flip" title="Flip Type" list="Swift&nbsp;,Smooth,Bounce"></range>
<range name="scramble" title="Scramble Length" list="20,25,30"></range>
<range name="fov" title="Camera Angle" list="Ortographic,Perspective"></range>
<range name="theme" title="Color Scheme" list="Cube,Erno,Dust,Camo,Rain"></range>
</div>

<div class="ui__theme">
<range name="hue" title="Hue" color></range>
<range name="saturation" title="Saturation" color></range>
<range name="lightness" title="Lightness" color></range>
</div>

<div class="ui__buttons">
<button class="btn btn--bl btn--stats">
<div class="ui__stats">
<div class="stats" name="cube-size">
<i>Cube:</i><b>3x3x3</b>
</div>
<div class="stats" name="total-solves">
<i>Total solves:</i><b>-</b>
</div>
<div class="stats" name="best-time">
<i>Best time:</i><b>-</b>
</div>
<div class="stats" name="worst-time">
<i>Worst time:</i><b>-</b>
</div>
<div class="stats" name="average-5">
<i>Average of 5:</i><b>-</b>
</div>
<div class="stats" name="average-12">
<i>Average of 12:</i><b>-</b>
</div>
<div class="stats" name="average-25">
<i>Average of 25:</i><b>-</b>
</div>
</div>

<div class="ui__buttons">
<button class="btn btn--bl btn--stats">
<icon trophy></icon>
</button>
<button class="btn btn--br btn--prefs">
<button class="btn btn--br btn--prefs">
<icon settings></icon>
</button>
<button class="btn btn--tl btn--back">
<button class="btn btn--tl btn--back">
<icon back></icon>
</button>
<button class="btn btn--br btn--theme">
<button class="btn btn--br btn--theme">
<icon theme></icon>
</button>
<button class="btn btn--br btn--reset">
<button class="btn btn--br btn--reset">
<icon reset></icon>
<button class="btn btn--tr fa-solid fa-volume-high" id="play-btn"></button>
</button>
<a href="./AboutUs/About.html"><button class="btn btn--in fa-solid fa-circle-info"></button></a>
</div>
<!-- Audio element for background music -->
<audio id="background-music" autoplay loop >
</button>
<a href="./AboutUs/About.html"><button class="btn btn--in fa-solid fa-circle-info"></button></a>
</div>

<!-- Audio element for background music -->
<audio id="background-music" autoplay loop>
<source src="Music/8 Bit Space Groove! Chill Pretty Chiptune Game Music by HeatleyBros.mp3" type="audio/mpeg">
</audio>

</div>
<!-- partial -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/95/three.min.js'></script><script src="./script.js"></script>
</div>
<!-- partial -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/95/three.min.js'></script>
<script src="./script.js"></script>
<script src="progress.js"></script>

</body>
</html>

</html>
Loading