diff options
-rw-r--r-- | cljssss-g.clj | 3 | ||||
-rw-r--r-- | header.st | 1 | ||||
-rw-r--r-- | index.st | 12 | ||||
-rw-r--r-- | public/layout.css | 50 |
4 files changed, 62 insertions, 4 deletions
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))) @@ -5,6 +5,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>$title$ — Gödel-Gentzen Clojure Syndication Services Super System</title> + <link rel="stylesheet" href="/layout.css" type="text/css" /> </head> <body> @@ -2,18 +2,21 @@ $header(title=title)$ <h1 class="title">$title$</h1> +<div id="feed-list-container"> <div id="feed-list"> <h2>Feeds</h2> - <ul> + <ul> $feeds:{feed | <li><a href="/?feed=$feed.id$">$feed.title$</a></li> }$ - </ul> + </ul> +</div> </div> $if(entries)$ +<div id="feed-content-container"> <div id="feed-content"> - <h2>Entries</h2> + <h2>$active_feed_title$</h2> <ul> $entries:{entry | $if(entry.active_p)$ @@ -22,9 +25,10 @@ $if(entries)$ $else$ <li><a id="entry-$entry.id$" href="/entries/$entry.id$?feed=$active_feed_id$#entry-$entry.id$">$entry.title$</a></li> $endif$ - }$ + }$ </ul> </div> +</div> $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; +} |