Skip to content

Commit

Permalink
Add error pages (#79)
Browse files Browse the repository at this point in the history
* Extract directory-only styles

* Add error pages

* Fix redirect function

* Remove 503 error page

---------

Co-authored-by: Carl <[email protected]>
  • Loading branch information
hkamran80 and Carlgo11 authored Nov 4, 2024
1 parent 18ce42d commit 228c5ad
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
27 changes: 27 additions & 0 deletions 502.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.2/css/bootstrap.min.css" integrity="sha512-CpIKUSyh9QX2+zSdfGP+eWLx23C8Dj9/XmHjZY2uDtfkdLGo0uY12jgcnkX9vXOgYajEKb/jiw67EYm+kBf+6g==" crossorigin="anonymous" referrerpolicy="no-referrer"/>

<link rel="icon" href="/icons/icon.svg" type="image/svg+xml" sizes="any"/>
<link rel="icon apple-touch-icon" href="/icons/icon.png" type="image/png" sizes="512x512"/>

<title>Bad Gateway | 2FA Directory</title>
</head>
<body>
<!-- navbar -->

<main role="main">
<h1 class="display-1">502</h1>
<p class="note">Bad Gateway</p>
</main>

<!-- footer -->

<script type="module" src="/src/components/style.js"></script>
<script type="module" src="/src/components/style.error.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ <h5 class="modal-title">Attention!</h5>
<!-- footer -->

<script type="module" src="/src/components/style.js"></script>
<script type="module" src="/src/components/style.directory.js"></script>
<script type="module" src="/src/components/regions.js"></script>
<script type="module" src="/src/components/category.js"></script>
<script type="module" src="/src/components/search.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions src/components/style.directory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import "/assets/css/search.scss";
import "/assets/css/category-buttons.scss";
import "/assets/css/table.scss";
1 change: 1 addition & 0 deletions src/components/style.error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "/assets/css/error.scss";
3 changes: 0 additions & 3 deletions src/components/style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import "/assets/css/root.scss";
import "/assets/css/page.scss";
import "/assets/css/navbar.scss";
import "/assets/css/search.scss";
import "/assets/css/category-buttons.scss";
import "/assets/css/table.scss";
import "/assets/css/footer.scss";
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default defineConfig({
rollupOptions: {
input: {
main: resolve(__dirname, "index.html"),
502: resolve(__dirname, "502.html"),
},
},
cssCodeSplit: true, // This is the default behavior
Expand Down

0 comments on commit 228c5ad

Please sign in to comment.