404
parent
29b95f4f2c
commit
5f4a3b7397
|
@ -10,7 +10,7 @@ IN: bonerbonerboner.api
|
||||||
TUPLE: bbb < dispatcher ;
|
TUPLE: bbb < dispatcher ;
|
||||||
|
|
||||||
: bbb-themes ( -- themes )
|
: bbb-themes ( -- themes )
|
||||||
{ "bbb" "bones" "float" "hockey" "rocket" "burger" "wakeywakey" } ;
|
{ "bbb" "bones" "float" "hockey" "rocket" "burger" "wakeywakey" "dog" } ;
|
||||||
|
|
||||||
: v-valid-theme ( str -- theme )
|
: v-valid-theme ( str -- theme )
|
||||||
dup bbb-themes member? [ "not a valid theme" throw ] unless ;
|
dup bbb-themes member? [ "not a valid theme" throw ] unless ;
|
||||||
|
@ -21,11 +21,13 @@ TUPLE: bbb < dispatcher ;
|
||||||
} validate-params ;
|
} validate-params ;
|
||||||
|
|
||||||
: <theme-action> ( -- action )
|
: <theme-action> ( -- action )
|
||||||
|
|
||||||
<page-action>
|
<page-action>
|
||||||
|
|
||||||
[ validate-theme ] >>init
|
[ validate-theme ] >>init
|
||||||
|
{ bbb "themes" } >>template ;
|
||||||
|
|
||||||
|
: <404-theme-action> ( -- action )
|
||||||
|
<page-action>
|
||||||
|
[ "_404" "theme" set-value ] >>init
|
||||||
{ bbb "themes" } >>template ;
|
{ bbb "themes" } >>template ;
|
||||||
|
|
||||||
: <heartbeat-action> ( -- action )
|
: <heartbeat-action> ( -- action )
|
||||||
|
@ -33,6 +35,7 @@ TUPLE: bbb < dispatcher ;
|
||||||
|
|
||||||
: <bbb> ( -- responder )
|
: <bbb> ( -- responder )
|
||||||
bbb new-dispatcher
|
bbb new-dispatcher
|
||||||
|
<404-theme-action> >>default
|
||||||
<heartbeat-action> "heartbeat" add-responder
|
<heartbeat-action> "heartbeat" add-responder
|
||||||
<slack-event-action> "slack-events" add-responder
|
<slack-event-action> "slack-events" add-responder
|
||||||
<theme-action> "subdomain" add-responder ;
|
<theme-action> "subdomain" add-responder ;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0" >
|
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0" >
|
||||||
<html class="@theme" lang="en" >
|
<html class="@theme" lang="en" >
|
||||||
<head>
|
<head>
|
||||||
<title>boners</title>
|
<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" />
|
<link rel="stylesheet" type="text/css" href="https://static.bonerbonerboner.com/css/bbb.css" />
|
||||||
</head>
|
</head>
|
||||||
<body/>
|
<body/>
|
||||||
|
|
Loading…
Reference in New Issue