From 97a850b1d882e6eb9400601734f0856e8f36fd3e Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 1 Mar 2009 13:59:31 +0100 Subject: Apply a column-based layout to the main page via CSS. --- cljssss-g.clj | 3 +++ header.st | 1 + index.st | 12 ++++++++---- public/layout.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 public/layout.css diff --git a/cljssss-g.clj b/cljssss-g.clj index ad466d0..159cd48 100644 --- a/cljssss-g.clj +++ b/cljssss-g.clj @@ -124,6 +124,7 @@ feed active-entry-id)) "active_feed_id" feed + "active_feed_title" (and feed (select-feed-name feed user)) "title" "Subscriptions"}))))) (defmacro with-session @@ -160,6 +161,8 @@ (with-session (show-subscriptions (session :id) (params :feed) nil))) (GET "/entries/*" (with-session (show-subscriptions (session :id) (params :feed) 5))) + (GET "/layout.css" + (serve-file "layout.css")) (ANY "*" (page-not-found))) diff --git a/header.st b/header.st index 146addf..2f56d2d 100644 --- a/header.st +++ b/header.st @@ -5,6 +5,7 @@ $title$ — Gödel-Gentzen Clojure Syndication Services Super System + diff --git a/index.st b/index.st index c00eea9..ffd8aee 100644 --- a/index.st +++ b/index.st @@ -2,18 +2,21 @@ $header(title=title)$

$title$

+

Feeds

- +
$if(entries)$ +
-

Entries

+

$active_feed_title$

    $entries:{entry | $if(entry.active_p)$ @@ -22,9 +25,10 @@ $if(entries)$ $else$
  • $entry.title$
  • $endif$ - }$ + }$
+
$endif$ $footer()$ diff --git a/public/layout.css b/public/layout.css new file mode 100644 index 0000000..2b47eb3 --- /dev/null +++ b/public/layout.css @@ -0,0 +1,50 @@ +/* -*- mode: css -*- */ + +h1 { + font-size: 2em; + margin: 0 0 0.75em 0.75em; +} + +#feed-list-container { + position: fixed; + left: 0; + top: 0; + width: 30%; + bottom: 0; + overflow: auto; + clear: none; + float: left; + z-index: 0; +} + +#feed-list { + position: relative; + margin: 0 5px 0 5px; + padding: 0 5px 0 5px; + top: 3.5em; + border: 1px solid #888; + +} + +body { + /* width: 80%; */ + margin: 10px; +} + +#feed-content-container { + position: absolute; + /* width: 70%; */ + top: 0; + left: 30%; + right: 0; + display: block; + z-index: 1; +} + +#feed-content { + padding: 0 5px 0 5px; + margin: 0 5px 0 5px; + position: relative; + top: 3.5em; + border: solid 1px #888; +} -- cgit v1.2.3