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

main #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

main #64

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
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@

<td align="center">
<a href="https://github.com/sreshtech">
<img src="https://github.com/account" width="100px;" alt="Sreshta"/>
<br />
<sub><b>Sreshta</b></sub>
</a>
</td>
37 changes: 25 additions & 12 deletions code/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,39 @@
}

main {
padding: 2rem;
border: 0.1rem solid gray;
width: 45em;
margin: 5rem auto;
border-radius: 2rem;
box-shadow: 0.1rem 0.2rem 0.2rem gray;
background-image: url('main-bg.jpg');
background-size: cover;
padding: 4rem;
text-align: center;
font-family: 'Roboto', sans-serif;
}

.start:hover {
background-color: #FF5733; /* Change the background color on hover */
transform: scale(1.05); /* Add a scale effect on hover */
}
/* I've made the following changes here*/
main .description {
line-height: 2;
margin-top: 1rem;
margin-bottom: 1rem;
}
line-height: 1.5;
margin-top: 20px;
margin-bottom: 20px;
font-size: 1.1rem;
color: #333; /* Change the text color to a dark gray */
}

/*style start quiz button*/
main .start {
padding: 0.7rem;
padding: 0.7rem 1.5rem;
font-weight: bold;
color: white;
background-color: var(--primary_color);
border-radius: 0.4rem;
border: none;
}
cursor: pointer;
}




/* quiz */
.question {
Expand Down
36 changes: 35 additions & 1 deletion code/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>Quiz Project</title>
</head>

<body>
<body >
<header>
<nav>

Expand All @@ -20,7 +20,14 @@
</nav>

</header>
<label for="theme-select">Select Theme:</label>
<select id="theme-select">
<option value="light-theme" id="light-theme">Light Theme</option>
<option value="dark-theme" id="dark-theme">Dark Theme</option>
</select>

<main>

<h1>Coding Quiz Challange</h1>
<p class="description">Try to answer to following code-related questions within the
time limit.<br>
Expand All @@ -31,6 +38,33 @@ <h1>Coding Quiz Challange</h1>

</main>
<script src="assets/script.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
const themeSelect = document.getElementById("theme-select");
const body = document.body;

// Event listener for the theme dropdown
themeSelect.addEventListener("change", function() {
const selectedTheme = themeSelect.value;

// Remove the existing theme classes
body.classList.remove("light-theme", "dark-theme");

// Add the selected theme class to change the background
body.classList.add(selectedTheme);
});

const main = document.querySelector("main");
const start = document.querySelector(".start");
const time = document.querySelector(".time");
const leaderboard = document.querySelector("#leaderboard");

// ... Rest of your existing code

// Initial
goBack();
});
</script>
</body>

</html>