Sort search results, better template

db4
Slava Pestov 2008-09-29 05:08:16 -05:00
parent a75622f813
commit 6faa172895
2 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,8 @@ USING: io.encodings.utf8 io.encodings.ascii io.encodings.binary
io.files html.streams html.elements html.components help kernel io.files html.streams html.elements html.components help kernel
assocs sequences make words accessors arrays help.topics vocabs assocs sequences make words accessors arrays help.topics vocabs
tools.vocabs tools.vocabs.browser namespaces prettyprint io tools.vocabs tools.vocabs.browser namespaces prettyprint io
vocabs.loader serialize fry memoize unicode.case ; vocabs.loader serialize fry memoize unicode.case math.order
sorting ;
IN: help.html IN: help.html
: escape-char ( ch -- ) : escape-char ( ch -- )
@ -106,7 +107,8 @@ M: result link-href href>> ;
: offline-apropos ( string index -- results ) : offline-apropos ( string index -- results )
load-index swap >lower load-index swap >lower
'[ [ drop _ ] dip >lower subseq? ] assoc-filter '[ [ drop _ ] dip >lower subseq? ] assoc-filter
[ swap result boa ] { } assoc>map ; [ swap result boa ] { } assoc>map
[ [ title>> ] compare ] sort ;
: article-apropos ( string -- results ) : article-apropos ( string -- results )
"articles.idx" offline-apropos ; "articles.idx" offline-apropos ;

View File

@ -19,10 +19,12 @@
<body> <body>
<h1><t:a t:href="$help-webapp/content/article-handbook.html" <h1><t:a t:href="$help-webapp/content/article-handbook.html"
target="content">Factor help</t:a></h1> target="content">Factor documentation</t:a></h1>
<p>This documentation was generated offline from a Factor <p>This is the <a href="http://factorcode.org">Factor</a>
image where <code>load-everything</code> was run.</p> documentation, generated offline from a
<code>load-everything</code> image. The Factor UI also
includes a documentation browser tool.</p>
<p>You may search article titles below.</p> <p>You may search article titles below.</p>