Update help webapp to work with the overhauled furnace
parent
1c3c7db0bc
commit
2447a20ad5
|
@ -6,18 +6,19 @@ USING: kernel furnace furnace.validator http.server.responders
|
|||
arrays io.files ;
|
||||
IN: webapps.help
|
||||
|
||||
! : string>topic ( string -- topic )
|
||||
! " " split dup length 1 = [ first ] when ;
|
||||
|
||||
: show-help ( topic -- )
|
||||
serving-html
|
||||
dup article-title [
|
||||
[ help ] with-html-stream
|
||||
] simple-html-document ;
|
||||
|
||||
: string>topic ( string -- topic )
|
||||
" " split dup length 1 = [ first ] when ;
|
||||
|
||||
\ show-help {
|
||||
{ "topic" "handbook" v-default string>topic }
|
||||
{ "topic" }
|
||||
} define-action
|
||||
\ show-help { { "topic" "handbook" } } default-values
|
||||
|
||||
M: link browser-link-href
|
||||
link-name
|
||||
|
@ -32,9 +33,10 @@ M: link browser-link-href
|
|||
lookup show-help ;
|
||||
|
||||
\ show-word {
|
||||
{ "word" "call" v-default }
|
||||
{ "vocab" "kernel" v-default }
|
||||
{ "word" }
|
||||
{ "vocab" }
|
||||
} define-action
|
||||
\ show-word { { "word" "call" } { "vocab" "kernel" } } default-values
|
||||
|
||||
M: f browser-link-href
|
||||
drop \ f browser-link-href ;
|
||||
|
@ -47,9 +49,11 @@ M: word browser-link-href
|
|||
f >vocab-link show-help ;
|
||||
|
||||
\ show-vocab {
|
||||
{ "vocab" "kernel" v-default }
|
||||
{ "vocab" }
|
||||
} define-action
|
||||
|
||||
\ show-vocab { { "vocab" "kernel" } } default-values
|
||||
|
||||
M: vocab-spec browser-link-href
|
||||
vocab-name [ show-vocab ] curry quot-link ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue