From 8b77b6f722768216348976e1b4b83cf9a13e2438 Mon Sep 17 00:00:00 2001 From: Scott Ostler Date: Tue, 15 Feb 2011 17:56:09 -0500 Subject: front page going live --- src/site.clj | 8 +++----- template/frontpage.st | 35 ++++++++++++++--------------------- template/log_dump.st | 3 +-- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/site.clj b/src/site.clj index fdcf089..b5f400b 100644 --- a/src/site.clj +++ b/src/site.clj @@ -194,16 +194,14 @@ (defn front-page [session] (let [st (fetch-template "frontpage" session) - date-str "20100503";(format-yyyymmdd (Date.)) + date-str (format-yyyymmdd (Date.)) dumps (map process-message-for-output - (fetch-redis-daily-hall date-str 0 30))] + (fetch-redis-daily-hall date-str 0 20))] (.setAttribute st "dumps" dumps) (.toString st))) (defn landing [session] - (if (is-vip? session) - (front-page session) - (redirect-to "/chat"))) + (front-page session)) (defn log-login [user_id ip] ;; i'm using do-cmds here because update-values can't deal with stuff like 'last_login = now()' diff --git a/template/frontpage.st b/template/frontpage.st index 7910771..b6cb58a 100644 --- a/template/frontpage.st +++ b/template/frontpage.st @@ -453,34 +453,27 @@ jQuery(window).load(function(){ -
-
-You are viewing the current trending images posted to dump.fm; a super fun community of real-time image posting. - If you already have an account If not register! - - - -
+
+
+ $if(user_nick)$ + JOIN CHAT +
+ +
+ $else$ + Here are today's top images from dump.fm +

+ Join the conversation! or register + $endif$ +
$if(dumps)$ - - - $dumps: { d | $hall_log_dump(dump=d)$ }$ - - $if(json_tags)$ - - $endif$ - $else$ - No dumps! $endif$
diff --git a/template/log_dump.st b/template/log_dump.st index 1cf3145..fced8de 100644 --- a/template/log_dump.st +++ b/template/log_dump.st @@ -4,8 +4,7 @@ $else$
$endif$ -
$dump.message_id$
-$dump.created_on$ -- by $dump.nick$$if(dump.score)$ $dump.score$$endif$ +$dump.created_on$ -- by $dump.nick$
$dump.content$

$share_buttons()$ -- cgit v1.2.3-70-g09d2