From: John Benediktsson Date: Tue, 27 Sep 2011 17:20:15 +0000 (-0700) Subject: webaps.help: display errors in red, add a main method. X-Git-Tag: 0.97~4044 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=12cfe67f20708d9cd318d4543798483ddf65c332 webaps.help: display errors in red, add a main method. --- diff --git a/extra/webapps/help/help.factor b/extra/webapps/help/help.factor index 20c807dca4..38a1895f37 100644 --- a/extra/webapps/help/help.factor +++ b/extra/webapps/help/help.factor @@ -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 "content" add-responder "resource:basis/definitions/icons/" "icons" add-responder ; +: run-help-webapp ( -- ) + "resource:temp/docs" + "resource:help.db" + main-responder set-global + 8080 httpd drop ; +MAIN: run-help-webapp diff --git a/extra/webapps/help/search.xml b/extra/webapps/help/search.xml index f6b364f089..97b096c3be 100644 --- a/extra/webapps/help/search.xml +++ b/extra/webapps/help/search.xml @@ -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; }