: article-apropos ( string -- results )
"articles.idx" offline-apropos ;
-: word-apropos ( string -- results )
- "words.idx" offline-apropos ;
-
: vocab-apropos ( string -- results )
"vocabs.idx" offline-apropos ;
+
+: qualified-index ( str index -- str index' )
+ over ":" split1 [
+ drop vocab-apropos values [ "," ".html" surround ] map
+ '[ drop _ [ tail? ] with any? ] dupd assoc-filter
+ [ over ".html" ?tail drop "," split1-last nip swap ":" glue ] assoc-map append
+ ] [ drop ] if* ;
+
+: word-apropos ( string -- results )
+ "words.idx" load-index qualified-index completions ;
{ { 0 } } [ 1 0 <repetition> >array ] unit-test
{ { 0 0 0 } } [ 3 0 <repetition> >array ] unit-test
+{ "ABCD" } [ "AAAA" [ + ] map-index ] unit-test
+
{
{ 11 23 35 }
} [ { 11 22 33 } [ + ] map-index ] unit-test
[ dup length <iota> ] 2dip 2map-as ; inline
: map-index ( ... seq quot: ( ... elt index -- ... newelt ) -- ... newseq )
- { } map-index-as ; inline
+ over map-index-as ; inline
: interleave ( ... seq between quot: ( ... elt -- ... ) -- ... )
pick empty? [ 3drop ] [
PRIVATE>
: fuel-start-remote-listener ( port/f -- )
- print-banner integer? [ 9000 ] unless* <tty-server> start-server drop ;
+ print-banner [ 9000 ] unless* <tty-server> start-server drop ;
: fuel-start-remote-listener* ( -- ) f fuel-start-remote-listener ;
! Copyright (C) 2008, 2011 Eduardo Cavazos, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: arrays calendar combinators continuations io.directories
-io.pathnames kernel mason.child mason.cleanup mason.common
-mason.config mason.docs mason.git mason.notify mason.platform
-mason.release mason.updates namespaces sequences ;
+USING: arrays calendar combinators continuations io.backend
+io.directories io.pathnames kernel mason.child mason.cleanup
+mason.common mason.config mason.docs mason.git mason.notify
+mason.platform mason.release mason.updates namespaces sequences
+;
IN: mason.build
: create-build-dir ( -- )
: clone-source ( -- )
"Cloning GIT repository" print-timestamp
- "git" "clone" builds-dir get "factor" append-path 3array
+ "git" "clone" builds-dir get "factor" append-path normalize-path 3array
short-running-process ;
: copy-image ( -- )
furnace.redirection help.html help.topics html.components
html.forms http.server http.server.dispatchers
http.server.static io.directories io.files.temp io.servers
-kernel namespaces sequences unicode urls ;
+kernel namespaces sequences splitting unicode urls ;
IN: webapps.help
TUPLE: help-webapp < dispatcher ;
+: fixup-words ( title href -- title' href' )
+ dup "word-" head? [
+ dup ".html" ?tail drop "," split1-last nip dup ":" append
+ '[ " (" _ 3append ")" append _ ?head drop ] dip
+ ] when ;
+
: links ( apropos -- seq )
- [ swap <simple-link> ] { } assoc>map ;
+ [ swap fixup-words <simple-link> ] { } assoc>map ;
: ?links ( has-links? apropos -- has-links? seq/f )
links [ f ] [ nip t swap ] if-empty ;
.label {
width: 100%;
padding: 5px;
- background: white;
cursor: pointer;
font-weight: bold;
font-size: 14pt;
.panel {
display: none;
width: 100%;
+ border-top: 1px solid #ccc;
}
.radiotab:checked + .label + .panel {
display: block;
}
+@media (prefers-color-scheme: dark) {
+
+ .panel {
+ border-top: 1px solid #666;
+ }
+
+ .label {
+ color: #bdc1c6;
+ border: 1px solid #666;
+ }
+
+ .label:hover {
+ background: #373e48;
+ border: 1px solid #666;
+ }
+
+ .radiotab:checked + .label {
+ border: 1px solid #666;
+ background: #373e48;
+ color: white;
+ }
+}
+
+@media (max-width: 599px) {
+
+ .panel {
+ border-top: none;
+ }
+}
+
@media (min-width: 600px) {
.panel {
order: 99;
- border-top: 1px solid #ccc;
}
.label {
width: 33.33%;
- border: 1px solid white;
+ border: 1px solid transparent;
border-bottom: none;
}