help: simplify navigation-table.

master
John Benediktsson 2020-02-19 21:42:25 -08:00
parent 76fcbdc690
commit b73b3e04f9
1 changed files with 8 additions and 8 deletions

View File

@ -108,7 +108,9 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
[ [ article-title ] [ >link ] bi write-object ] ($block) ; [ [ article-title ] [ >link ] bi write-object ] ($block) ;
: ($navigation-table) ( element -- ) : ($navigation-table) ( element -- )
help-path-style get table-style [ $table ] with-variable ; help-path-style get dup [
table-style [ $table ] with-variable
] with-style ;
: ($navigation-path) ( topic -- ) : ($navigation-path) ( topic -- )
help-path-style get [ help-path-style get [
@ -119,13 +121,11 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
[ prefix 1array ] dip prefix , ; [ prefix 1array ] dip prefix , ;
: ($navigation-links) ( topic -- ) : ($navigation-links) ( topic -- )
help-path-style get [ [
[ [ prev-article [ 1array \ $long-link "Prev:" ($navigation-link) ] when* ]
[ prev-article [ 1array \ $long-link "Prev:" ($navigation-link) ] when* ] [ next-article [ 1array \ $long-link "Next:" ($navigation-link) ] when* ]
[ next-article [ 1array \ $long-link "Next:" ($navigation-link) ] when* ] bi
bi ] { } make [ ($navigation-table) ] unless-empty ;
] { } make [ ($navigation-table) ] unless-empty
] with-style ;
: $title ( topic -- ) : $title ( topic -- )
title-style get [ title-style get [