From 3dbc931ae93a00c5b26db6b587ff0dc044162c3c Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 1 Mar 2009 14:16:27 +0100 Subject: Highlight the currently displayed feed on the feed list. --- cljssss-g.clj | 9 +++++---- index.st | 8 +++++++- public/layout.css | 5 +++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cljssss-g.clj b/cljssss-g.clj index c7d8eb0..1f0b3e6 100644 --- a/cljssss-g.clj +++ b/cljssss-g.clj @@ -60,7 +60,7 @@ "htmlurl" link}) results)})))))) -(defn select-feeds [user] +(defn select-feeds [user active-feed-id] (sql/with-query-results results [(str "SELECT feed.id, feed.uri, feed.link, user_feed_link.title" @@ -73,7 +73,8 @@ link :link}] {"title" title "id" id - "link" link}) + "link" link + "active_p" (= active-feed-id id)}) results)))) (defn select-feed-name [user feed-id] @@ -108,7 +109,7 @@ (defn lynxy-feedlist [user] (with-db (.toString (doto (.getInstanceOf templates "simple-feed-list") - (.setAttributes {"feeds" (select-feeds user)}))))) + (.setAttributes {"feeds" (select-feeds user nil)}))))) (defn lynxy-showfeed [user feed] (with-db @@ -119,7 +120,7 @@ (defn show-subscriptions [user feed active-entry-id] (with-db (.toString (doto (.getInstanceOf templates "index") - (.setAttributes {"feeds" (select-feeds user) + (.setAttributes {"feeds" (select-feeds user feed) "entries" (when feed (select-entries user feed active-entry-id)) diff --git a/index.st b/index.st index ffd8aee..16c8173 100644 --- a/index.st +++ b/index.st @@ -7,7 +7,13 @@ $header(title=title)$

Feeds

diff --git a/public/layout.css b/public/layout.css index 2b47eb3..60ff240 100644 --- a/public/layout.css +++ b/public/layout.css @@ -26,6 +26,11 @@ h1 { } +.active-feed-name { + font-weight: bold; + font-stretch: wider; +} + body { /* width: 80%; */ margin: 10px; -- cgit v1.2.3