Skip to content

Commit

Permalink
Template
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Oct 18, 2024
1 parent de9a7fe commit 60de719
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/client/route/404/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home</title>
<link rel="shortcut icon" href="./home/assets/favicon.svg" type="image/x-icon" />
<title>404 Not found</title>
<link rel="shortcut icon" href="./assets/favicon.svg" type="image/x-icon" />
<link rel="stylesheet" href="./bundle.min.css" />
</head>
<body>
<h1>404 Page not found.</h1>
<h1 class="title">404 Not found</h1>
<img class="logo" src="/-/solidjs_logo.svg" alt="SolidJS Logo" />
</body>
</html>
24 changes: 24 additions & 0 deletions src/client/route/404/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
display: grid;
padding: 100px;
height: 100vh;
justify-content: center;
background-color: #e0e0e0;
}

.title {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
text-align: center;
}

.logo {
width: 250px;
}
6 changes: 4 additions & 2 deletions src/client/route/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home</title>
<link rel="shortcut icon" href="./home/assets/favicon.svg" type="image/x-icon" />
<link rel="shortcut icon" href="./assets/favicon.svg" type="image/x-icon" />
<link rel="stylesheet" href="./bundle.min.css" />
</head>
<body>
<img src="/-/solidjs_logo.svg" alt="SolidJS Logo" />
<h1 class="title">Home</h1>
<img class="logo" src="/-/solidjs_logo.svg" alt="SolidJS Logo" />
</body>
</html>
24 changes: 24 additions & 0 deletions src/client/route/home/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
display: grid;
padding: 100px;
height: 100vh;
justify-content: center;
background-color: #e0e0e0;
}

.title {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
text-align: center;
}

.logo {
width: 250px;
}
2 changes: 1 addition & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const routes: Route[] = [
)
},
{
pattern: new URLPattern({ pathname: '/:page([a-z0-9]+[a-z0-9-.]*\/?)' }),
pattern: new URLPattern({ pathname: '/:page/' }),
handler: (request, _info, parameters) => pageHandler(
request,
routeDirectory,
Expand Down

0 comments on commit 60de719

Please sign in to comment.