diff options
| -rwxr-xr-x | src/site.clj | 3 | ||||
| -rwxr-xr-x | template/profile.st | 102 |
2 files changed, 56 insertions, 49 deletions
diff --git a/src/site.clj b/src/site.clj index 65890ef..b5c7ade 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 b4b303c..b00297a 100755 --- a/template/profile.st +++ b/template/profile.st @@ -2,42 +2,43 @@ <head> <title>$nick$'s dump.fm</title> $head()$ + <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> <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 type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> - <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> - <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.datepicker.js"></script> - + <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> + <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> + <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.datepicker.js"></script> <script> - jQuery(document).ready(initProfile); - </script> - <script> - jQuery(document).ready(function(){ - jQuery("#datepicker").datepicker(); - }); - - </script> + jQuery(document).ready(function(){ + initProfile(); + jQuery("#datepicker").datepicker(); + 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> + <div id="loghead"> + </div> <br> + <div id="posts"> - - <div id="posts"> - - $if(dumps)$ + $if(dumps)$ $dumps:{ d | $logged_dump(dump=d)$ }$ + $else$ <h3> </h3> <h3> </h3> @@ -48,56 +49,61 @@ To get started join <a href="/chat">come on in</a> and post a few pictures.</h3> <h3> </h3></div> <h3> </h3> - <h3> </h3> <h3> </h3> + <h3> </h3> + <h3> </h3> <h3> </h3> <h3> </h3> $endif$ + <p> </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"> + $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> - <div id="date"> -<div type="text" id="datepicker"></div></div> + <div id="bio" class="$if(is_home)$editable$else$linkify$endif$"> + $bio$ + </div> + <br> + <div id="date"> + <div type="text" id="datepicker"></div></div> </div> <div id="footer"> - $footer()$ - </div> + $footer()$ + </div> </div> </div> </body> |
