|
6 | 6 |
|
7 | 7 | <style> |
8 | 8 | .error-container { |
9 | | - max-width: 800px; |
| 9 | + max-width: 1200px; |
10 | 10 | margin: 2rem auto; |
11 | 11 | padding: 2rem; |
12 | | - text-align: center; |
13 | 12 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
14 | 13 | } |
15 | | - |
| 14 | + |
| 15 | + .error-layout { |
| 16 | + display: flex; |
| 17 | + gap: 2rem; |
| 18 | + align-items: start; |
| 19 | + } |
| 20 | + |
| 21 | + .error-content { |
| 22 | + flex: 2; |
| 23 | + text-align: center; |
| 24 | + } |
| 25 | + |
| 26 | + .error-image-wrapper { |
| 27 | + flex: 1 1 200px; |
| 28 | + display: flex; |
| 29 | + align-items: center; |
| 30 | + justify-content: center; |
| 31 | + } |
| 32 | + |
16 | 33 | .error-image { |
17 | | - max-width: 300px; |
18 | | - margin: 2rem auto; |
19 | | - display: block; |
| 34 | + max-width: 100%; |
| 35 | + height: auto; |
20 | 36 | } |
21 | | - |
| 37 | + |
22 | 38 | .error-title { |
23 | 39 | color: #d63031; |
24 | 40 | font-size: 2rem; |
25 | 41 | margin-bottom: 1rem; |
26 | 42 | } |
27 | | - |
| 43 | + |
28 | 44 | .error-message { |
29 | 45 | color: #2d3436; |
30 | 46 | font-size: 1.1rem; |
31 | 47 | line-height: 1.6; |
32 | 48 | margin-bottom: 1.5rem; |
33 | 49 | } |
34 | | - |
| 50 | + |
35 | 51 | .suggested-link { |
36 | 52 | background-color: #00b894; |
37 | 53 | color: white; |
|
43 | 59 | font-weight: bold; |
44 | 60 | transition: background-color 0.3s; |
45 | 61 | } |
46 | | - |
| 62 | + |
47 | 63 | .suggested-link:hover { |
48 | 64 | background-color: #00a383; |
49 | 65 | } |
50 | | - |
| 66 | + |
51 | 67 | .recommendation { |
52 | 68 | background-color: #fff3cd; |
53 | 69 | border-left: 4px solid #ffc107; |
54 | 70 | padding: 1rem; |
55 | 71 | margin: 2rem 0; |
56 | 72 | text-align: left; |
57 | 73 | } |
58 | | - |
| 74 | + |
59 | 75 | .navigation-section { |
60 | | - margin-top: 3rem; |
| 76 | + margin-top: 2rem; |
61 | 77 | padding: 2rem; |
62 | 78 | background-color: #f8f9fa; |
63 | 79 | border-radius: 8px; |
64 | 80 | } |
65 | | - |
| 81 | + |
66 | 82 | .navigation-section h2 { |
67 | 83 | color: #2d3436; |
68 | 84 | margin-bottom: 1rem; |
69 | 85 | } |
70 | | - |
| 86 | + |
71 | 87 | .nav-links { |
72 | 88 | display: grid; |
73 | 89 | grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); |
74 | 90 | gap: 0.5rem; |
75 | 91 | margin-top: 1rem; |
76 | 92 | } |
77 | | - |
| 93 | + |
78 | 94 | .nav-link { |
79 | 95 | color: #0984e3; |
80 | 96 | text-decoration: none; |
81 | 97 | padding: 0.5rem; |
82 | 98 | border-radius: 4px; |
83 | 99 | transition: background-color 0.3s; |
84 | 100 | } |
85 | | - |
| 101 | + |
86 | 102 | .nav-link:hover { |
87 | 103 | background-color: #dfe6e9; |
88 | 104 | } |
89 | | - |
| 105 | + |
90 | 106 | .trailing-slash-notice { |
91 | 107 | display: none; |
92 | 108 | margin-bottom: 1rem; |
93 | 109 | } |
94 | | - |
| 110 | + |
95 | 111 | .trailing-slash-notice.visible { |
96 | 112 | display: block; |
97 | 113 | } |
| 114 | + |
| 115 | + @media (max-width: 640px) { |
| 116 | + .error-layout { |
| 117 | + flex-direction: column-reverse; |
| 118 | + } |
| 119 | + |
| 120 | + .error-image-wrapper { |
| 121 | + flex: 0 0 auto; |
| 122 | + width: 150px; |
| 123 | + margin: 0 auto; |
| 124 | + } |
| 125 | + |
| 126 | + .nav-links { |
| 127 | + grid-template-columns: 1fr; |
| 128 | + } |
| 129 | + } |
98 | 130 | </style> |
99 | 131 |
|
100 | 132 | <div class="error-container"> |
101 | | - <div class="trailing-slash-notice" id="trailingSlashNotice"> |
102 | | - <h1 class="error-title">Almost There!</h1> |
103 | | - <p class="error-message"> |
104 | | - It looks like you almost typed the correct address. |
105 | | - <span id="nearMatchReason"></span> |
106 | | - </p> |
107 | | - <p class="error-message"> |
108 | | - <strong>What you tried:</strong> <code id="attemptedUrl"></code><br> |
109 | | - <strong>What you probably want:</strong> |
110 | | - </p> |
111 | | - <a href="" id="suggestedLink" class="suggested-link">Go to the correct page</a> |
112 | | - |
113 | | - <div class="recommendation"> |
114 | | - <strong>💡 Tip:</strong> If you followed a link from another site or used a bookmark, |
115 | | - you may want to update it to the correct URL shown above. This will ensure it works properly in the future. |
| 133 | + <div class="error-layout"> |
| 134 | + <div class="error-content"> |
| 135 | + <div class="trailing-slash-notice" id="trailingSlashNotice"> |
| 136 | + <h1 class="error-title">Almost There!</h1> |
| 137 | + <p class="error-message"> |
| 138 | + It looks like you almost typed the correct address. |
| 139 | + <span id="nearMatchReason"></span> |
| 140 | + </p> |
| 141 | + <p class="error-message"> |
| 142 | + <strong>What you tried:</strong> <code id="attemptedUrl"></code><br> |
| 143 | + <strong>What you probably want:</strong> |
| 144 | + <a href="" id="suggestedLink" class="suggested-link">Go to the correct page</a> |
| 145 | + </p> |
| 146 | + |
| 147 | + <div class="recommendation"> |
| 148 | + <strong>💡 Tip:</strong> If you followed a link from another site or used a bookmark, |
| 149 | + you may want to update it to the correct URL shown above. This will ensure it works properly in the future. |
| 150 | + </div> |
| 151 | + </div> |
| 152 | + |
| 153 | + <div class="standard-404" id="standard404"> |
| 154 | + <h1 class="error-title">Page Not Found</h1> |
| 155 | + <p class="error-message"> |
| 156 | + Sorry, we couldn't find the page you're looking for. |
| 157 | + </p> |
| 158 | + </div> |
| 159 | + |
| 160 | + <div class="navigation-section"> |
| 161 | + <h2>Helpful Links</h2> |
| 162 | + <p>Maybe one of these pages can help you find what you're looking for:</p> |
| 163 | + <div class="nav-links"> |
| 164 | + <a href="/" class="nav-link">🏠 Home</a> |
| 165 | + <a href="/profile" class="nav-link">👤 Profile</a> |
| 166 | + <a href="/transcribe" class="nav-link">✍️ Transcribe</a> |
| 167 | + <a href="/project" class="nav-link">📁 Projects</a> |
| 168 | + <a href="/projects/all" class="nav-link">📋 All Projects</a> |
| 169 | + <a href="/project/create" class="nav-link">➕ Create Project</a> |
| 170 | + <a href="/project/import" class="nav-link">📥 Import Project</a> |
| 171 | + <a href="/manage/quicktype" class="nav-link">⚡ Quick Type</a> |
| 172 | + </div> |
| 173 | + </div> |
116 | 174 | </div> |
117 | | - </div> |
118 | | - |
119 | | - <img src="/assets/images/hopeful404.png" alt="Friendly 404 Error" class="error-image"> |
120 | | - |
121 | | - <div class="navigation-section"> |
122 | | - <h2>Helpful Links</h2> |
123 | | - <p>Maybe one of these pages can help you find what you're looking for:</p> |
124 | | - <div class="nav-links"> |
125 | | - <a href="/" class="nav-link">🏠 Home</a> |
126 | | - <a href="/profile" class="nav-link">👤 Profile</a> |
127 | | - <a href="/transcribe" class="nav-link">✍️ Transcribe</a> |
128 | | - <a href="/project" class="nav-link">📁 Projects</a> |
129 | | - <a href="/projects/all" class="nav-link">📋 All Projects</a> |
130 | | - <a href="/project/create" class="nav-link">➕ Create Project</a> |
131 | | - <a href="/project/import" class="nav-link">📥 Import Project</a> |
132 | | - <a href="/manage/quicktype" class="nav-link">⚡ Quick Type</a> |
| 175 | + |
| 176 | + <div class="error-image-wrapper"> |
| 177 | + <img src="/assets/images/hopeful404.png" alt="Friendly 404 Error" class="error-image"> |
133 | 178 | </div> |
134 | 179 | </div> |
135 | | - |
136 | | - <div class="standard-404" id="standard404"> |
137 | | - <h1 class="error-title">Page Not Found</h1> |
138 | | - <p class="error-message"> |
139 | | - Sorry, we couldn't find the page you're looking for. |
140 | | - </p> |
141 | | - </div> |
142 | 180 | </div> |
143 | 181 |
|
144 | 182 | <script> |
|
0 commit comments