Skip to content

Commit 2e319c2

Browse files
author
sanika palav
committed
Fix 404 page styling and add responsive media queries
1 parent add0155 commit 2e319c2

1 file changed

Lines changed: 54 additions & 18 deletions

File tree

DISCOVER/404.html

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@
1212
}
1313
body {
1414
height: 100vh;
15-
background: linear-gradient(135deg, black, #e4f0ff);
15+
background: linear-gradient(135deg, #eef2ff, #f8fafc);
1616
display: flex;
1717
align-items: center;
1818
justify-content: center;
1919
font-family: 'Segoe UI', sans-serif;
2020
overflow: hidden;
2121
position: relative;
22+
2223
}
2324

2425
.light-blur {
2526
position: absolute;
2627
width: 500px;
2728
height: 500px;
28-
background: radial-gradient(circle at center, transparent);
29-
border-radius: 50%;
29+
background: radial-gradient(circle, rgba(99,102,241,0.35), transparent 70%);
30+
border-radius: 50%;
3031
filter: blur(80px);
3132
top: 20%;
3233
left: 10%;
@@ -40,44 +41,48 @@
4041
}
4142

4243
.glass-card {
43-
background: rgba(255, 255, 255, 0.25);
44-
backdrop-filter: blur(12px);
45-
-webkit-backdrop-filter: blur(12px);
44+
/* background-color: #444;*/
45+
background: rgba(31, 41, 55, 0.9);
46+
backdrop-filter: blur(5px);
47+
-webkit-backdrop-filter: blur(5px);
4648
padding: 2.5rem 3rem;
4749
border-radius: 20px;
4850
border: 1px solid rgba(255, 255, 255, 0.3);
4951
max-width: 500px;
5052
text-align: center;
5153
z-index: 1;
52-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
54+
box-shadow: 0 10px 30px rgba(192, 91, 91, 0.1);
5355
}
5456

5557
h1 {
5658
font-size: 2.5em;
57-
color: rgb(52, 51, 51);
59+
color: rgb(255, 250, 250);
5860
margin-bottom: 0.5rem;
61+
line-height:1.5;
5962
}
6063

6164
p {
6265
font-size: 1.1em;
63-
color: rgb(52, 51, 51);
66+
color: rgb(255, 247, 247);
6467
margin-bottom: 1.4rem;
68+
line-height: 1.5;
6569
}
6670

6771
a {
6872
display: inline-block;
6973
margin: 0.4rem;
7074
padding: 0.6rem 1rem;
71-
border-radius: 8px;
75+
border-radius: 12px;
7276
text-decoration: none;
73-
background: #d0bfff;
74-
color: #1f1f1f;
77+
background: #86efac;
78+
color: #064e3b;
7579
font-weight: 600;
7680
transition: background 0.3s ease;
7781
}
7882

7983
a:hover {
80-
background: #c1aaff;
84+
background: #9eaba2;
85+
color: rgb(255, 255, 255);
8186
}
8287

8388
select {
@@ -86,22 +91,53 @@
8691
border-radius: 6px;
8792
border: 1px solid #ccc;
8893
font-size: 1em;
89-
background: #fff;
94+
95+
background: #2f3a47; /* Darker background matching the card */
96+
color: #fff;
9097
}
98+
select option
99+
{
100+
background: #2f3a47;
101+
color: #fff;
102+
}
103+
104+
@media (max-width: 600px) {
105+
body {
106+
padding: 1rem;
107+
}
108+
.glass-card {
109+
max-width: 90%;
110+
padding: 1.5rem;
111+
border-radius: 12px;
112+
}
113+
h1 {
114+
font-size: 1.8em;
115+
}
116+
p {
117+
font-size: 1em;
118+
}
119+
a {
120+
padding: 0.5rem 0.8rem;
121+
font-size: 0.9em;
122+
}
123+
select {
124+
width: 100%;
125+
}
126+
}
91127
</style>
92128
</head>
93129
<body>
94130
<div class="light-blur"></div>
95131
<div class="glass-card">
96-
<h1 id="title">404 - Page Not Found</h1>
132+
<h1 id="title">Oops! We can’t find that page</h1>
97133
<p id="message">This page might’ve wandered off or was never here at all.</p>
98134
<p id="suggestion">Maybe it was deleted, renamed, or never existed in the first place.</p>
99135
<p><strong id="what-do">What can you do?</strong></p>
100136
<a href="./intro.html" id="home">⬅️ Back to Home</a>
101137
<a href="https://github.com/numfocus/DISCOVER-Cookbook/issues" id="report">🐞 Report the Issue</a>
102138

103139
<div>
104-
<label for="language-switcher" style="display:block; margin-top:1.5rem; color:#444;">🌐 Switch Language:</label>
140+
<label for="language-switcher" style="display:block; margin-top:1.5rem; color:#fffbfb;"> 🌐 Switch Language</label>
105141
<select id="language-switcher">
106142
<option value="en">English</option>
107143
<option value="es">Español</option>
@@ -114,7 +150,7 @@ <h1 id="title">404 - Page Not Found</h1>
114150
<script>
115151
const translations = {
116152
en: {
117-
title: "404 - Page Not Found",
153+
title: "Oops! We can’t find that page",
118154
message: "This page might’ve wandered off or was never here at all.",
119155
suggestion: "Maybe it was deleted, renamed, or never existed in the first place.",
120156
whatDo: "What can you do?",
@@ -123,7 +159,7 @@ <h1 id="title">404 - Page Not Found</h1>
123159
footer: "If you think this is an error, let us know by creating an issue."
124160
},
125161
es: {
126-
title: "404 - Página no encontrada",
162+
title: "No se pudo encontrar la página",
127163
message: "Esta página se ha perdido o nunca existió.",
128164
suggestion: "Tal vez fue eliminada, renombrada o nunca existió.",
129165
whatDo: "¿Qué puedes hacer?",

0 commit comments

Comments
 (0)