]> gitweb.factorcode.org Git - factor.git/commitdiff
webaps.help: display errors in red, add a main method.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Sep 2011 17:20:15 +0000 (10:20 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Sep 2011 17:20:15 +0000 (10:20 -0700)
extra/webapps/help/help.factor
extra/webapps/help/search.xml

index 20c807dca41415927566d5caa091814e6d1a9c67..38a1895f3733436fa40b7c1e13a0f71889de6a57 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel accessors http.server.dispatchers
-http.server.static furnace.actions furnace.redirection urls
-validators locals io.files io.directories html.forms
-html.components help.html ;
+USING: accessors db.sqlite furnace.actions furnace.alloy kernel
+http.server.dispatchers http.server.static furnace.redirection
+urls validators locals io.files io.directories help.html
+html.forms html.components http.server namespaces ;
 IN: webapps.help
 
 TUPLE: help-webapp < dispatcher ;
@@ -41,4 +41,10 @@ M: result link-href href>> ;
         swap <static> "content" add-responder
         "resource:basis/definitions/icons/" <static> "icons" add-responder ;
 
+: run-help-webapp ( -- )
+    "resource:temp/docs" <help-webapp>
+    "resource:help.db" <sqlite-db> <alloy>
+        main-responder set-global
+    8080 httpd drop ;
 
+MAIN: run-help-webapp
index f6b364f089eed50e882d2789fbe6e5933a2766de..97b096c3bedb08208b09bd61e5f387ef06609b05 100644 (file)
@@ -14,6 +14,7 @@
                        a:visited { text-decoration: none; color: #00004c; }
                        a:active { text-decoration: none; color: #00004c; }
                        a:hover { text-decoration: underline; color: #00004c; }
+                       span.error { display: block; color: red; }
                </style>
        </head>