From bb45b6702b9dbfaf1e58db7ebfcaf883cc2202b1 Mon Sep 17 00:00:00 2001
From: Slava Pestov
Date: Thu, 6 Dec 2007 01:03:10 -0500
Subject: [PATCH] Planet factor tweak
---
extra/webapps/planet/planet.factor | 13 +++++----
extra/webapps/planet/planet.furnace | 4 +--
extra/webapps/planet/style.css | 45 +++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 8 deletions(-)
create mode 100644 extra/webapps/planet/style.css
diff --git a/extra/webapps/planet/planet.factor b/extra/webapps/planet/planet.factor
index 0ddd48e36e..8abc9e5bc6 100644
--- a/extra/webapps/planet/planet.factor
+++ b/extra/webapps/planet/planet.factor
@@ -50,11 +50,6 @@ IN: webapps.planet
: print-postings ( postings -- )
[ print-posting ] each ;
-: browse-webapp-source ( vocab -- )
- vocab-link browser-link-href =href a>
- "Browse source" write
- ;
-
SYMBOL: default-blogroll
SYMBOL: cached-postings
@@ -71,12 +66,18 @@ SYMBOL: cached-postings
"http://planet.factorcode.org"
cached-postings get 30 head ;
-: feed.xml
+: feed.xml ( -- )
"text/xml" serving-content
planet-feed feed>xml write-xml ;
\ feed.xml { } define-action
+: style.css ( -- )
+ "text/css" serving-content
+ "style.css" send-resource ;
+
+\ style.css { } define-action
+
SYMBOL: last-update
: diagnostic write print flush ;
diff --git a/extra/webapps/planet/planet.furnace b/extra/webapps/planet/planet.furnace
index bc9172a55a..949ee7c172 100644
--- a/extra/webapps/planet/planet.furnace
+++ b/extra/webapps/planet/planet.furnace
@@ -8,7 +8,7 @@
planet-factor
-
+
@@ -28,7 +28,7 @@
Syndicate
- This webapp is written in Factor.
+ This webapp is written in Factor.
<% "webapps.planet" browse-webapp-source %>
Blogroll
diff --git a/extra/webapps/planet/style.css b/extra/webapps/planet/style.css
new file mode 100644
index 0000000000..7a66d8d495
--- /dev/null
+++ b/extra/webapps/planet/style.css
@@ -0,0 +1,45 @@
+body {
+ font:75%/1.6em "Lucida Grande", "Lucida Sans Unicode", verdana, geneva, sans-serif;
+ color:#888;
+}
+
+h1.planet-title {
+ font-size:300%;
+}
+
+a {
+ color:#222;
+ border-bottom:1px dotted #ccc;
+ text-decoration:none;
+}
+
+a:hover {
+ border-bottom:1px solid #ccc;
+}
+
+.posting-title {
+ background-color:#f5f5f5;
+}
+
+pre, code {
+ color:#000000;
+ font-size:120%;
+}
+
+.infobox {
+ border-left: 1px solid #C1DAD7;
+}
+
+.posting-date {
+ text-align: right;
+ font-size:90%;
+}
+
+a.more {
+ display:block;
+ padding:0 0 5px 0;
+ color:#333;
+ text-decoration:none;
+ text-align:right;
+ border:none;
+}