aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cljssss-g.clj9
-rw-r--r--index.st8
-rw-r--r--public/layout.css5
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)$
<h2>Feeds</h2>
<ul>
$feeds:{feed |
- <li><a href="/?feed=$feed.id$">$feed.title$</a></li>
+ <li><a href="/?feed=$feed.id$"
+ $if(feed.active_p)$
+ class="active-feed-name"
+ $else$
+ class="inactive-feed-name"
+ $endif$
+ >$feed.title$</a></li>
}$
</ul>
</div>
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;