Add dev server styles into a css file and make sure that not found page styles are included.

This commit is contained in:
Dillon Kearns 2022-02-25 11:22:32 -08:00
parent 1c7ff8aa7c
commit 2d81800317
2 changed files with 26 additions and 12 deletions

View File

@ -410,7 +410,8 @@ async function start(options) {
<head>
<script src="/hmr.js" type="text/javascript"></script>
<script src="/elm.js" type="text/javascript"></script>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/dev-style.css">
<script src="/elm-pages.js" type="module"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
@ -630,17 +631,8 @@ function errorHtml() {
return `<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/style.css"></link>
<style>
@keyframes lds-default {
0%, 20%, 80%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
}
</style>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/dev-style.css">
<link rel="preload" href="/index.js" as="script">
<!--<link rel="preload" href="/elm.js" as="script">-->
<script src="/hmr.js" type="text/javascript"></script>

View File

@ -0,0 +1,22 @@
@keyframes lds-default {
0%,
20%,
80%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
}
#not-found-reason code {
color: rgb(226, 0, 124);
}
#not-found-reason h1 {
font-size: 26px;
font-weight: bold;
padding-bottom: 15px;
}
#not-found-reason a:hover {
text-decoration: underline;
}