Cleanups
parent
77caac1401
commit
eafdb19f90
|
@ -87,7 +87,7 @@ MACRO: all-enabled-client-state ( seq quot -- )
|
||||||
|
|
||||||
: adjust-points [ [ 1 + 0.5 * ] map ] bi@ ;
|
: adjust-points [ [ 1 + 0.5 * ] map ] bi@ ;
|
||||||
|
|
||||||
: scale-points 2array flip [ v* ] with map [ v+ ] with map ;
|
: scale-points zip [ v* ] with map [ v+ ] with map ;
|
||||||
|
|
||||||
: circle-points ( loc dim steps -- points )
|
: circle-points ( loc dim steps -- points )
|
||||||
circle-steps unit-circle adjust-points scale-points ;
|
circle-steps unit-circle adjust-points scale-points ;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
USING: math kernel accessors http.server http.server.actions
|
USING: math kernel accessors http.server http.server.actions
|
||||||
http.server.sessions http.server.templating.fhtml locals ;
|
http.server.sessions http.server.templating
|
||||||
|
http.server.templating.fhtml locals ;
|
||||||
IN: webapps.counter
|
IN: webapps.counter
|
||||||
|
|
||||||
SYMBOL: count
|
SYMBOL: count
|
||||||
|
@ -15,11 +16,11 @@ M: counter-app init-session*
|
||||||
"" f <standard-redirect>
|
"" f <standard-redirect>
|
||||||
] >>display ;
|
] >>display ;
|
||||||
|
|
||||||
|
: counter-template ( -- template )
|
||||||
|
"resource:extra/webapps/counter/counter.fhtml" <fhtml> ;
|
||||||
|
|
||||||
: <display-action> ( -- action )
|
: <display-action> ( -- action )
|
||||||
<action> [
|
<action> [ counter-template serve-template ] >>display ;
|
||||||
"text/html" <content>
|
|
||||||
"resource:extra/webapps/counter/counter.fhtml" <fhtml> >>body
|
|
||||||
] >>display ;
|
|
||||||
|
|
||||||
: <counter-app> ( -- responder )
|
: <counter-app> ( -- responder )
|
||||||
counter-app new-dispatcher
|
counter-app new-dispatcher
|
||||||
|
|
Loading…
Reference in New Issue