forked from wasi-master/13ft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
177 lines (153 loc) · 4.65 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>13ft Ladder</title>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet" async>
<style>
body {
font-family: 'Open Sans', sans-serif;
background-color: #FFF;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 90vh;
transition: background-color 0.3s, color 0.3s;
}
h1 {
font-size: 1.5rem;
margin-bottom: 20px;
text-align: center;
color: #333;
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
input[type=text] {
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
width: 100%;
font-size: 1rem;
box-sizing: border-box;
}
input[type="submit"] {
padding: 16px;
background-color: #a327f0;
color: #fff;
border: none;
border-radius: 5px;
width: 100%;
text-transform: uppercase;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #821fc0;
}
/* Toggle switch styles */
.dark-mode-toggle {
position: absolute;
top: 10px;
right: 10px;
}
.dark-mode-toggle input {
display: none;
}
.dark-mode-toggle label {
cursor: pointer;
text-indent: -9999px;
width: 52px;
height: 27px;
background: grey;
display: block;
border-radius: 100px;
position: relative;
}
.dark-mode-toggle label:after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 23px;
height: 23px;
background: #fff;
border-radius: 90px;
transition: 0.3s;
}
.dark-mode-toggle input:checked+label {
background: #7359f8;
}
.dark-mode-toggle input:checked+label:after {
left: calc(100% - 2px);
transform: translateX(-100%);
}
/* Responsive adjustments */
@media only screen and (max-width: 600px) {
form {
padding: 10px;
}
h1 {
font-size: 1.2rem;
}
}
/* Dark mode styles */
body.dark-mode {
background-color: #191a21;
color: #FFF;
}
body.dark-mode h1 {
color: #FFF;
}
body.dark-mode input[type=text] {
background-color: #555;
border: 1px solid #777;
color: #FFF;
}
body.dark-mode input[type="submit"] {
background-color: #7359f8;
}
body.dark-mode input[type="submit"]:hover {
background-color: #5c47c6;
}
</style>
</head>
<body>
<div class="dark-mode-toggle">
<input type="checkbox" id="dark-mode-toggle">
<label for="dark-mode-toggle" title="Toggle Dark Mode"></label>
</div>
<form action="/article" method="post">
<h1>Enter Website Link</h1>
<label for="link">Link of the website you want to remove paywall for:</label>
<input type="text" id="link" name="link" required>
<input type="submit" value="Submit">
</form>
<script>
const toggleSwitch = document.getElementById('dark-mode-toggle');
const currentTheme = localStorage.getItem('theme') || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
if (currentTheme === "dark") {
document.body.classList.add("dark-mode");
toggleSwitch.checked = true;
}
toggleSwitch.addEventListener('change', function () {
if (this.checked) {
document.body.classList.add("dark-mode");
localStorage.setItem('theme', 'dark');
} else {
document.body.classList.remove("dark-mode");
localStorage.setItem('theme', 'light');
}
});
</script>
</body>
</html>