summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/site.clj3
-rwxr-xr-xtemplate/profile.st121
2 files changed, 64 insertions, 60 deletions
diff --git a/src/site.clj b/src/site.clj
index 4f6ca71..9d66735 100755
--- a/src/site.clj
+++ b/src/site.clj
@@ -132,6 +132,7 @@
@(room :messages)))))
(defn process-user [u]
+ (prn u)
(if (u :avatar)
{"nick" (u :nick)
"avatar" (encode-html-entities (u :avatar))}
@@ -217,7 +218,7 @@
(defn login [session params]
(let [nick (params :nick)
hash (params :hash)
- db-user (authorize-nick-hash nick hash)]
+ db-user (authorize-nick-hash nick hash)]
(if db-user
[(populate-session-from-db db-user)
(resp-success "OK")]
diff --git a/template/profile.st b/template/profile.st
index 6204e27..e407ce1 100755
--- a/template/profile.st
+++ b/template/profile.st
@@ -2,94 +2,97 @@
<head>
<title>$nick$'s dump.fm</title>
$head()$
- <link rel="stylesheet" type="text/css" media="screen" href="/static/profile.css">
-
- <script type="text/javascript" src="/static/jquery.editinplace.1.0.1.packed.js"></script>
-
-
+ <link rel="stylesheet" type="text/css" media="screen"
+ href="/static/profile.css">
+ <script src="/static/jquery.editinplace.1.0.1.packed.js"
+ type="text/javascript" >
+ </script>
<script>
jQuery(document).ready(initProfile);
-
-
- </script>
-
-
+ jQuery(document).ready(function() {
+ jQuery(".linkify").each(function() {
+ var text = jQuery(this).text();
+ jQuery(this).html(linkify(text));
+ });
+ });
+ </script>
</head>
<body>
$banner()$
<div id="chatrap">
-
<div id="log">
- <div id="loghead">
+ <div id="loghead">
- </div>
+ </div>
<br>
+ <div id="posts">
-
- <div id="posts">
-
- $if(dumps)$
+ $if(dumps)$
$dumps:{ d | $logged_dump(dump=d)$ }$
- $else$
- <h3>&nbsp;</h3>
- <h3>&nbsp;</h3>
- <h3>&nbsp;</h3> <h3>&nbsp;</h3>
- <h3>&nbsp;</h3>
- <h3>&nbsp;</h3><div id="newuser">
- <h3>This is your user log, it's where all the images you post are saved. <br>
- To get started join <a href="/chat">Room A</a> and post a few pictures.</h3>
- <h3>&nbsp;</h3></div>
- <h3>&nbsp;</h3>
- <h3>&nbsp;</h3> <h3>&nbsp;</h3>
- <h3>&nbsp;</h3>
- <h3>&nbsp;</h3>
- $endif$
- <p>&nbsp;</p>
- <div id="pnav">
- <div id="pnavo">
+ $else$
+ <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3> <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3><div id="newuser">
+ <h3>This is your user log, it's where all the images you post
+ are saved. <br>
+ To get started join <a href="/chat">Room A</a> and post a
+ few pictures.</h3>
+ <h3>&nbsp;</h3></div>
+ <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3> <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3>
+ <h3>&nbsp;</h3>
+ $endif$
+ <p>&nbsp;</p>
+ <div id="pnav">
+ <div id="pnavo">
$if(next)$
<a href="/u/$nick$/$next$"><- OLD DUMPS</a>
$endif$
</div>
- <div id="pnavn">
+ <div id="pnavn">
&nbsp;&nbsp;
$if(prev)$
<a href="/u/$nick$/$prev$">NEW DUMPS -></a>
$endif$
- <br><br>
-</div></div>
+ <br><br>
+ </div></div>
+ </div>
- </div>
-
- <div id="profile">
-
- <h2>$nick$</h2>
+ <div id="profile">
+ <h2>$nick$</h2>
- $if(avatar)$
- <img id="avatarPic" src="$avatar$" width="150px"/>
- $else$
- <b id="avatarPic">No avatar</b>
- $endif$
+ $if(avatar)$
+ <img id="avatarPic" src="$avatar$" width="150px"/>
+ $else$
+ <b id="avatarPic">No avatar</b>
+ $endif$
- $if(is_home)$
- <div id="avatar" class="editable">$avatar$</div>
- $endif$
+ $if(is_home)$
+ <div id="avatar" class="editable">$avatar$</div>
+ $endif$
- <h3>contact info</h3>
- <div id="contact" $if(is_home)$class="editable"$endif$>$contact$</div>
- <br>
+ <h3>contact info</h3>
+ <div id="contact" class="$if(is_home)$editable$else$linkify$endif$">
+ $contact$
+ </div>
+ <br>
- <h3>personal info</h3>
- <div id="bio" $if(is_home)$class="editable"$endif$>$bio$</div>
- <br><br><br>
+ <h3>personal info</h3>
+ <div id="bio" class="$if(is_home)$editable$else$linkify$endif$">
+ $bio$
+ </div>
+ <br><br><br>
- </div>
+ </div>
<div id="footer">
- $footer()$
- </div>
+ $footer()$
+ </div>
</div>
</div>
</body>