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

feat: back-button feature added with some more small changes #365 solved under gssoc #446

Open
wants to merge 1 commit 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
180 changes: 96 additions & 84 deletions Pages/Quizes/tests/button-1/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -8,104 +9,108 @@
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="media-queries.css">
<link rel="icon" type="image/x-icon" href="../../../../assets/logo.png">
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.3/font/bootstrap-icons.min.css" rel="stylesheet">
</head>

<body>
<!-- nav bar -->
<nav>
<div class="container main-nav flex">
<a href="../../../../index.html" class="company-logo">
<img src="./assets/asset 41.png" alt="company logo">
</a>
<div class="nav-links" id="nav-links">
<ul class="nav-menu">
<li><a href="../../../../index.html" class="hover-link"> Home </a></li>
<li><a href="../../../About-Us/index.html" class="hover-link">About Us</a></li>
<li><a href="../../../Simulation/index.html" class="hover-link">Simulations</a></li>
<li><a href="../../../3D-Visualizations/index.html" class="hover-link">3D Visualisations</a></li>
<li><a href="../../../Quizes/index.html" class="hover-link">Quizes</a></li>
<li><a href="../../../Videos/index.html" class="hover-link">Videos</a></li>
<li><a href="../../../Doubt Engine/index.html" class="hover-link">Doubt Engine</a></li>
</ul>
</div>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
</nav>
<div class="container main-nav flex">
<a href="../../../../index.html" class="company-logo">
<img src="./assets/asset 41.png" alt="company logo">
</a>
<div class="nav-links" id="nav-links">
<ul class="nav-menu">
<li><a href="../../../../index.html" class="hover-link"> Home </a></li>
<li><a href="../../../About-Us/index.html" class="hover-link">About Us</a></li>
<li><a href="../../../Simulation/index.html" class="hover-link">Simulations</a></li>
<li><a href="../../../3D-Visualizations/index.html" class="hover-link">3D Visualisations</a></li>
<li><a href="../../../Quizes/index.html" class="hover-link">Quizzes</a></li>
<li><a href="../../../Videos/index.html" class="hover-link">Videos</a></li>
<li><a href="../../../Doubt Engine/index.html" class="hover-link">Doubt Engine</a></li>
</ul>
</div>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
</nav>

<!-- header section -->
<header>
<div class="header">
<h1>P Block</h1>
</div>
<div class="header">
<h1>P Block</h1>
</div>
</header>

<!-- Quiz section -->

<div class="quiz-wrapper">
<div class="max-wrapper">
<div class="max-wrapper">
<div id="max-score"></div>
</div>

<div class="quiz-container" id="quiz">

<div class="quiz-header">
<div style="display: flex;">
<div id="difficulty" style="flex:1"></div>
<div id="quizcount" style="font-weight: bold;"></div>
</div>
<h2 id="question">Question is loading...</h2>

<ul class="quiz-ul">
<li>
<input type="radio" name="answer" id="a" class="answer" />
<label for="a" id="a_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="b" class="answer" />
<label for="b" id="b_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="c" class="answer" />
<label for="c" id="c_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="d" class="answer" />
<label for="d" id="d_text">Answer...</label>
</li>
<button id="submit">Submit</button>
</div>
</div>
<button id="reset_button" onclick="localStorage.clear('btn-7-max');window.location.reload()">Reset Max Score</button>

</div>
<div class="result">
<div class="weak">

<div class="text">

</div>
</div>

</div>

<script src="./script.js"></script>
</div>

<div class="quiz-container" id="quiz">

<div class="quiz-header">
<div style="display: flex;">
<div id="difficulty" style="flex:1"></div>
<div id="quizcount" style="font-weight: bold;"></div>
</div>
<h2 id="question">Question is loading...</h2>

<ul class="quiz-ul">
<li>
<input type="radio" name="answer" id="a" class="answer" />
<label for="a" id="a_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="b" class="answer" />
<label for="b" id="b_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="c" class="answer" />
<label for="c" id="c_text">Answer...</label>
</li>
<li>
<input type="radio" name="answer" id="d" class="answer" />
<label for="d" id="d_text">Answer...</label>
</li>
<button id="submit">Submit</button>
<button id="back" onclick="goBack()"><i class="bi bi-arrow-left"></i> Back</button>
</div>
</div>
<button id="reset_button" onclick="localStorage.clear('btn-7-max');window.location.reload()">Reset Max
Score</button>

</div>
<div class="result">
<div class="weak">


<div class="solution-div">

<div class="text">

</div>
</div>


</div>

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

</div>


<div class="solution-div">

</div>


<div class="recommendations">

</div>

<div >
<div>
<div class="recommendation-thumbnails">

</div>
Expand All @@ -121,17 +126,24 @@ <h2 id="question">Question is loading...</h2>
</div>
</footer>

<script>
function goBack() {
window.location.href = '/Pages/Quizes/index.html';
}
</script>

<script src="https://kit.fontawesome.com/c1fc3d2826.js" crossorigin="anonymous"></script>

<script>
const hamburger = document.querySelector(".hamburger");
const navMenu = document.querySelector(".nav-menu");
const hamburger = document.querySelector(".hamburger");
const navMenu = document.querySelector(".nav-menu");

hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
hamburger.addEventListener("click", () => {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})
</script>

</body>
</html>

</html>
8 changes: 7 additions & 1 deletion Pages/Quizes/tests/button-1/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -406,5 +406,11 @@ footer{
#reset_button{
width: 200px;
border-radius: 10px;
margin-top: 10px;
margin-top: 20px;
margin-left: -24px;
}


#back{
font-size: 18px;
}
Loading
Loading