add 404
This commit is contained in:
1 parent
6addd97a93
commit
e355cb8f33
3 files changed
+87
-1
No files matched your search
+14
-1
@@ -12,7 +12,20 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Отдельная страница ошибки 404
|
||||
error_page 404 /404.html;
|
||||
|
||||
# Убираем .html из исходных запросов браузера
|
||||
if ($request_uri ~ ^(/[^?]*)\.html(\?.*)?$) {
|
||||
return 301 $1$is_args$args;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# Доступ только для внутренней обработки ошибки
|
||||
location = /404.html {
|
||||
internal;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, follow">
|
||||
<title>Страница не найдена — О’ляпка</title>
|
||||
<link rel="icon" type="image/svg+xml" href="img/favicon.svg">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Caveat:wght@500;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/404.css">
|
||||
</head>
|
||||
<body class="error-page">
|
||||
<a class="skip-link" href="#main-content">Перейти к содержимому</a>
|
||||
<header class="error-header container">
|
||||
<a class="logo" href="index.html" aria-label="О’ляпка — на главную"><span class="logo-bird" aria-hidden="true">🐦</span><span>О’ЛЯПКА</span></a>
|
||||
<a class="error-contact" href="contacts.html">Связаться со студией <span aria-hidden="true">↗</span></a>
|
||||
</header>
|
||||
<main id="main-content" class="error-main container" tabindex="-1">
|
||||
<div class="error-art" aria-hidden="true">
|
||||
<span class="error-orbit"></span>
|
||||
<span class="error-spark error-spark-one">✦</span>
|
||||
<span class="error-code">4<span class="error-zero">0<span class="error-bird">🐦</span></span>4</span>
|
||||
<span class="error-spark error-spark-two">✧</span>
|
||||
<span class="error-note">кажется, не тот кадр…</span>
|
||||
</div>
|
||||
<p class="error-eyebrow">ОШИБКА 404 · СТРАНИЦА НЕ НАЙДЕНА</p>
|
||||
<h1>Эта страница<br>улетела из сюжета</h1>
|
||||
<p class="error-description">Возможно, ссылка устарела или в адресе опечатка.<br class="desktop-break"> Но ваша история только начинается — вернёмся к ней?</p>
|
||||
<div class="error-actions">
|
||||
<a class="btn btn-primary" href="index.html">На главную <span aria-hidden="true">↗</span></a>
|
||||
<a class="btn btn-outline" href="services.html">Выбрать мультфильм</a>
|
||||
</div>
|
||||
<p class="error-portfolio">Нужна идея? <a href="portfolio.html">Посмотрите наши работы <span aria-hidden="true">→</span></a></p>
|
||||
</main>
|
||||
<footer class="error-footer container"><span>© 2026 О’ляпка</span><span>Даже у хорошей истории бывают неожиданные повороты.</span></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
.error-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 50% 30%, #f5d5c855, transparent 55%), #f9f7f0; }
|
||||
.error-header { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
|
||||
.error-contact { font-size: 13px; font-weight: 600; padding: 10px 0; }
|
||||
.error-contact:hover, .error-portfolio a:hover { color: #b30000; }
|
||||
.error-main { width: 100%; flex: 1; text-align: center; padding-top: 18px; padding-bottom: 64px; }
|
||||
.error-art { position: relative; isolation: isolate; width: min(100%, 530px); margin: 0 auto 28px; padding: 8px 0 35px; }
|
||||
.error-code { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: clamp(112px, 24vw, 200px); font-weight: 800; line-height: 1.15; letter-spacing: -.08em; color: #e60000; }
|
||||
.error-zero { position: relative; color: transparent; -webkit-text-stroke: 2px #e60000; }
|
||||
.error-bird { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .35em; letter-spacing: normal; -webkit-text-stroke: 0; color: #2c2c2c; transform: rotate(-12deg); }
|
||||
.error-orbit { position: absolute; z-index: -1; width: 88%; height: 65%; top: 14%; left: 6%; border: 1px dashed #cfa393; border-radius: 50%; transform: rotate(-13deg); }
|
||||
.error-spark { position: absolute; font-size: 30px; color: #b35d45; }
|
||||
.error-spark-one { top: 0; right: 9%; transform: rotate(15deg); }
|
||||
.error-spark-two { bottom: 38px; left: 8%; font-size: 40px; }
|
||||
.error-note { position: absolute; bottom: 0; right: 7%; font-family: 'Caveat', cursive; font-size: clamp(22px, 4vw, 30px); transform: rotate(-7deg); color: #795c50; }
|
||||
.error-eyebrow { color: #8b3b2d; font-weight: 600; font-size: 10px; letter-spacing: .15em; margin-bottom: 18px; }
|
||||
.error-main h1 { font-size: clamp(30px, 5.5vw, 48px); line-height: 1.17; letter-spacing: -.04em; font-weight: 800; margin-bottom: 22px; }
|
||||
.error-description { font-size: 15px; line-height: 1.8; color: #62605a; max-width: 580px; margin: 0 auto; }
|
||||
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 30px auto 22px; }
|
||||
.error-actions .btn { gap: 22px; }
|
||||
.error-portfolio { font-size: 13px; color: #62605a; }
|
||||
.error-portfolio a { color: #2c2c2c; text-decoration: underline; text-underline-offset: 4px; }
|
||||
.error-footer { width: 100%; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid #e5ded4; font-size: 11px; color: #68645e; }
|
||||
@media (max-width: 480px) {
|
||||
.error-header { padding-top: 16px; padding-bottom: 16px; gap: 12px; }
|
||||
.error-header .logo { font-size: 17px; gap: 4px; }
|
||||
.error-contact { font-size: 11px; max-width: 110px; text-align: right; }
|
||||
.error-main { padding-top: 28px; padding-bottom: 40px; }
|
||||
.error-art { margin-bottom: 26px; }
|
||||
.error-actions { flex-direction: column; max-width: 320px; }
|
||||
.error-actions .btn { white-space: normal; }
|
||||
.desktop-break { display: none; }
|
||||
.error-footer { justify-content: center; text-align: center; }
|
||||
}
|
||||
Reference in new issue
Block a user