master
Steve Ayerhart 2022-01-24 17:37:59 -05:00
parent 29b95f4f2c
commit 5f4a3b7397
No known key found for this signature in database
GPG Key ID: 5C815FDF3A00B8BA
2 changed files with 8 additions and 5 deletions

View File

@ -10,7 +10,7 @@ IN: bonerbonerboner.api
TUPLE: bbb < dispatcher ;
: bbb-themes ( -- themes )
{ "bbb" "bones" "float" "hockey" "rocket" "burger" "wakeywakey" } ;
{ "bbb" "bones" "float" "hockey" "rocket" "burger" "wakeywakey" "dog" } ;
: v-valid-theme ( str -- theme )
dup bbb-themes member? [ "not a valid theme" throw ] unless ;
@ -21,11 +21,13 @@ TUPLE: bbb < dispatcher ;
} validate-params ;
: <theme-action> ( -- action )
<page-action>
[ validate-theme ] >>init
{ bbb "themes" } >>template ;
: <404-theme-action> ( -- action )
<page-action>
[ "_404" "theme" set-value ] >>init
{ bbb "themes" } >>template ;
: <heartbeat-action> ( -- action )
@ -33,6 +35,7 @@ TUPLE: bbb < dispatcher ;
: <bbb> ( -- responder )
bbb new-dispatcher
<404-theme-action> >>default
<heartbeat-action> "heartbeat" add-responder
<slack-event-action> "slack-events" add-responder
<theme-action> "subdomain" add-responder ;

View File

@ -3,7 +3,7 @@
<html class="@theme" lang="en" >
<head>
<title>boners</title>
<meta name="viewport" content="width=device-width, initial-sale=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="https://static.bonerbonerboner.com/css/bbb.css" />
</head>
<body/>