Skip to content

Commit

Permalink
Add tv quote mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jollytoad committed Mar 13, 2024
1 parent 1f4b555 commit 09116dc
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default cascade(
byPattern("/sse/feed", lazy(() => import("./routes/sse/feed.tsx"))),
byPattern("/sse", lazy(() => import("./routes/sse/index.tsx"))),
byPattern("/sleep", lazy(() => import("./routes/sleep.ts"))),
byPattern("/quote/tv", lazy(() => import("./routes/quote/tv.tsx"))),
byPattern("/quote", lazy(() => import("./routes/quote/index.tsx"))),
byPattern("/quiz/answer/:id/:answer", lazy(() => import("./routes/quiz/answer/:id/:answer.tsx"))),
byPattern("/quiz", lazy(() => import("./routes/quiz/index.tsx"))),
Expand Down
22 changes: 22 additions & 0 deletions routes/quote/tv.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Page } from "../../components/Page.tsx";
import { renderPage } from "../../lib/handle_page.ts";
import { byMethod } from "@http/fns/by_method";
import { Quote } from "./_components/Quote.tsx";

export default byMethod({
GET: (req, match: URLPatternResult) => {
return renderPage(() => (
<html lang="en-GB">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="refresh" content="900" />
<link rel="stylesheet" href="/quote_tv.css" />
</head>
<body>
<Quote />
</body>
</html>
))(req, match);
},
});
28 changes: 28 additions & 0 deletions static/quote_tv.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
html {
background: black;
color: white;
height: 100%;
}

body {
margin: 0;
height: 100%;
}

blockquote {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}

blockquote p {
font-size: xxx-large;
font-family: Verdana, Geneva, Tahoma, sans-serif;
text-align: center;
padding: 1em;
}

blockquote footer {
text-align: end;
}

0 comments on commit 09116dc

Please sign in to comment.