Cleanups
parent
77caac1401
commit
eafdb19f90
|
@ -87,7 +87,7 @@ MACRO: all-enabled-client-state ( seq quot -- )
|
|||
|
||||
: 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-steps unit-circle adjust-points scale-points ;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
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
|
||||
|
||||
SYMBOL: count
|
||||
|
@ -15,11 +16,11 @@ M: counter-app init-session*
|
|||
"" f <standard-redirect>
|
||||
] >>display ;
|
||||
|
||||
: counter-template ( -- template )
|
||||
"resource:extra/webapps/counter/counter.fhtml" <fhtml> ;
|
||||
|
||||
: <display-action> ( -- action )
|
||||
<action> [
|
||||
"text/html" <content>
|
||||
"resource:extra/webapps/counter/counter.fhtml" <fhtml> >>body
|
||||
] >>display ;
|
||||
<action> [ counter-template serve-template ] >>display ;
|
||||
|
||||
: <counter-app> ( -- responder )
|
||||
counter-app new-dispatcher
|
||||
|
|
Loading…
Reference in New Issue