Skip to content

Commit

Permalink
:)
Browse files Browse the repository at this point in the history
  • Loading branch information
alej4ndro-cm committed Oct 6, 2024
1 parent 7ccde92 commit bc4efb5
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebVanillaProjects</title>
<style>
:root {
--bg-color: #f0f0f0;
--container-bg: white;
--text-color: #333;
--text-secondary: #666;
--button-bg: #4c90af;
--button-hover: #45a049;
}
body.dark-mode {
--bg-color: #1a1a1a;
--container-bg: #2c2c2c;
--text-color: #e0e0e0;
--text-secondary: #b0b0b0;
--button-bg: #5c6bc0;
--button-hover: #3f51b5;
}
body {
font-family: 'Arial', sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
transition: background-color 0.3s, color 0.3s;
}
.container {
background-color: var(--container-bg);
border-radius: 10px;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
padding: 40px;
text-align: center;
max-width: 600px;
width: 90%;
transition: background-color 0.3s;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
}
p {
color: var(--text-secondary);
font-size: 1.2em;
margin-bottom: 30px;
}
.project-list {
display: flex;
flex-direction: column;
gap: 15px;
}
.project-button {
background-color: var(--button-bg);
color: white;
border: none;
padding: 15px 20px;
font-size: 1em;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
text-decoration: none;
}
.project-button:hover {
background-color: var(--button-hover);
transform: translateY(-2px);
}
.mode-toggle {
position: absolute;
top: 20px;
right: 20px;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #2196F3;
}
input:checked + .slider:before {
transform: translateX(26px);
}
@media (max-width: 480px) {
.container {
padding: 20px;
}
h1 {
font-size: 2em;
}
p {
font-size: 1em;
}
}
</style>
</head>
<body>
<div class="mode-toggle">
<label class="switch">
<input type="checkbox" id="darkModeToggle">
<span class="slider"></span>
</label>
</div>
<div class="container">
<h1>Welcome to WebVanillaProjects</h1>
<p>Explore our collection of vanilla JavaScript projects. Click on a project to get started!</p>
<div class="project-list">
<a href="form-validator/index.html" class="project-button">Form Validator Project</a>
<a href="movie-seat-booking/index.html" class="project-button">Movie Seat Booking Project</a>
<!-- Add more projects here as you create them -->
</div>
</div>

<script>
const darkModeToggle = document.getElementById('darkModeToggle');
const body = document.body;

darkModeToggle.addEventListener('change', () => {
body.classList.toggle('dark-mode');
});
</script>
</body>
</html>

0 comments on commit bc4efb5

Please sign in to comment.