Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

followers and following: template changes

  • Loading branch information...
commit 216fed6b3aae928a505fb034a54b1058e4a1c5a5 1 parent 5891bb5
Breno G. de Oliveira authored June 14, 2010

Showing 1 changed file with 17 additions and 0 deletions. Show diff stats Hide diff stats

  1. 17  tweetylicious.pl
17  tweetylicious.pl
@@ -372,6 +372,11 @@ package main;
372 372
     <input id="submit" tabindex="2" type="submit" value="Tell the World!" />
373 373
    </form>
374 374
 % } else {
  375
+%   if ( stash 'followed' ) {
  376
+     <a class="fineprint" href="<%= url_for %>/unfollow">[-] unfollow</a>
  377
+%   } else {
  378
+     <a class="fineprint" href="<%= url_for %>/follow">[+] follow!</a>
  379
+%   }
375 380
 <h2 id="title"><%= $user->{username} %>'s posts</h2>
376 381
 % }
377 382
 <ul class="messages">
@@ -391,6 +396,18 @@ package main;
391 396
     <li><span>Name</span><%= $user->{username} %></li>
392 397
     <li><span>Bio</span><%= $user->{bio} %></li>
393 398
    </ul>
  399
+   <ul id="followers">
  400
+    <li><span><%= scalar keys %$followers %></span> Followers</li>
  401
+% foreach my $face ( keys %$followers ) {
  402
+    <li><a href="/<%= $face %>"><img src="http://www.gravatar.com/avatar/<%= $followers->{$face}->{gravatar} %>?s=20.jpg" /></a></li>
  403
+% }
  404
+   </ul>
  405
+   <ul id="following">
  406
+    <li><span><%= scalar keys %$following %></span> Following</li>
  407
+% foreach my $face ( keys %$following ) {
  408
+    <li><a href="/<%= $face %>"><img src="http://www.gravatar.com/avatar/<%= $following->{$face}->{gravatar} %>?s=20.jpg" /></a></li>
  409
+% }
  410
+   </ul>
394 411
    <div id="totalposts"><span><%= $total_posts %></span> Posts</div>
395 412
 </div>
396 413
 

0 notes on commit 216fed6

Please sign in to comment.
Something went wrong with that request. Please try again.