-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
158 lines (156 loc) · 4.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
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 Web Vanilla Projects</h1>
<p>Explore a collection of vanilla frontend 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>