summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Ostler <scottbot9000@gmail.com>2011-02-15 17:56:09 -0500
committerScott Ostler <scottbot9000@gmail.com>2011-02-15 17:56:09 -0500
commit8b77b6f722768216348976e1b4b83cf9a13e2438 (patch)
treecbcd33f7f3e3d417cf902906e0e548bc5f7a65f9
parent7fe8f065b024cd12870a7492bc37f9a319cce5dd (diff)
front page going live
-rw-r--r--src/site.clj8
-rw-r--r--template/frontpage.st35
-rw-r--r--template/log_dump.st3
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(){
<!--END BANNER-->
- <div id="posts" class="clickable clearfix">
-<div id="sideinfo">
-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 <strong><a href="http://dump.fm/login" class="signin">sign in</a></strong> If not <strong><a href="http://dump.fm/register">register</a></strong>!
-
-
-
-</div>
+<div id="posts" class="clickable clearfix">
+ <div id="sideinfo">
+ $if(user_nick)$
+ <strong><a href="$domain$/chat">JOIN CHAT</a></strong>
+ <div id="hallnick">
+ <iframe src="$domain$/fullscreen" style="overflow:hidden;width:240px;height:200px;border:0px;"></iframe>
+ </div>
+ $else$
+ Here are today's top images from dump.fm
+ <br /> <br />
+ Join the conversation!<strong><a href="$domain$/login" class="signin">sign in</a></strong> or <strong><a href="$domain$/register">register</a></strong>
+ $endif$
+ </div>
<!-- <div class="logged-dump">
- <i id="hallnick">On dump.fm now..</i>
+ <div id="hallnick">On dump.fm now..</i>
<iframe src="http://dump.fm/fullscreen"style="overflow:hidden;width:240px;height:200px;border:0px;"></iframe>
</div>-->
$if(dumps)$
-
-
-
$dumps: { d | $hall_log_dump(dump=d)$ }$
-
- $if(json_tags)$
- <script>
- $json_tags: { j | $j$;
- }$
- </script>
- $endif$
- $else$
- No dumps!
$endif$
</div>
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$
<div class="logged-dump dump $if(dump.favorited)$favorite$endif$" id="message-$dump.message_id$" nick="$dump.nick$">
$endif$
-<div><a href="/p/$dump.nick$/$dump.message_id$">$dump.message_id$</a></div>
-$dump.created_on$ -- by <a href="/$dump.nick$"><b>$dump.nick$</b></a>$if(dump.score)$ <span>$dump.score$</span><img src="$domain$/static/img/thumbs/heartfavedsm.gif" />$endif$
+$dump.created_on$ -- by <a href="/$dump.nick$"><b>$dump.nick$</b></a>
<div class="content" data-category="posts">$dump.content$</div>
<hr />
$share_buttons()$