Permalink
Browse files

adding player view, updating todos, added and organized stylesheet be…

…tter, partialized some elements that looked messy, removed broken back button... and a bunch of improvements (_I think_)
  • Loading branch information...
1 parent 9ce778e commit ee50159e6941b900b9e399d85b563320299af9d7 @michaelparenteau michaelparenteau committed Oct 3, 2010
View
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/michaelparenteau/swish.git
- revision: a39808bcb578e2e35b522d77e1601cad1ec5e27f
+ revision: 4cddac75d2f5766a72d506d46184453b8ea34420
specs:
swish (0.6.0)
View
@@ -1,27 +1,28 @@
Player View:
- - Link to here from Shot page (use player name from shot title as link)
+ - Link to here from Shot page (use player name from shot title as link) @done
- Link to here from List of Players
# See some data about the player & use shot page as starting template
- - player.name
- - player.avatar_url
- - player.url
- - player.location
- - Link to follow (player.twitter_screen_name)
- - player.drafted_by_player_id
+ - player.name @done
+ - player.avatar_url @done
+ - player.url @done
+ - player.location @done
+ - Link to follow (player.twitter_screen_name) @done
+ - player.drafted_by_player_id as username
# Player stats
- - player.shots_count
- - Link to shots (separate view) => player.shots , or paginate: player.shots(:page => 2, :per_page => 10)
- - player.draftees_count
- - List Draftees (separate view) => player.draftees
- - player.followers_count
- - player.following_count
+ - player.shots_count @done
+ - paginate shots: player.shots(:page => 2, :per_page => 10)
+ - player.draftees_count @done
+ - player.followers_count @done
+ - player.following_count @done
Players List View(s):
+!!! api not sufficient yet for this
+
- List "All-Stars"
- player.name
- player.avatar_url
@@ -38,12 +39,16 @@ Shot View:
- comment
Tags List View:
-
+
+!!! api not sufficient yet for this
+
- List of popular tags
- Links to List of Shots (tagged)
Navigation:
+!!! api not sufficient yet for this
+
- Land on Grid Nav
- Items:
- Popular Shots
@@ -52,4 +57,17 @@ Navigation:
- About hooppps
- Follow hooppps on Twitter
- Find a Player
- - Current "About" link in header will open this grid nav (will provide access to many points from anywhere in app)
+ - Current "About" link in header will open this grid nav (will provide access to many
+ points from anywhere in app)
+
+Breadcrumb history for "back" link:
+
+ - The "back" button in the header is a requesting url so it does not follow three pages
+ back. It will loop after the third page between the 2nd and third.
+
+Format page:
+
+ - Design page for when "landscape mode" is in effect and if "viewport size" is not
+ optimal for the hooppps design. This is a mobile dribbble browser... it is not the
+ end-all app!
+
@@ -0,0 +1,7 @@
+class PlayerController < ApplicationController
+
+ def show
+ @player = Dribbble::Player.find(params[:id])
+ end
+
+end
@@ -0,0 +1,2 @@
+module PlayerHelper
+end
View
Binary file not shown.
@@ -0,0 +1,9 @@
+- @player.shots.each do |shot|
+ %a{:href => shot_path(shot.id)}
+ = image_tag shot.image_url
+ %ul.stats
+ %li.views=shot.views_count
+ %li.comments=shot.comments_count
+ %li.likes=shot.likes_count
+ %li.view
+ %a{:href => shot_path(shot.id)} view &raquo;
@@ -0,0 +1,16 @@
+%h3
+ Drafted by:
+ = @player.drafted_by_player_id
+%ul.player_stats
+ %li
+ Shots
+ %span= @player.shots_count
+ %li
+ Draftees
+ %span= @player.draftees_count
+ %li
+ Followers
+ %span= @player.followers_count
+ %li
+ Following
+ %span= @player.following_count
@@ -0,0 +1,17 @@
+#header
+ %h1.hooppps hooppps
+ /= link_to "back", :back, :class => 'back_button'
+#content
+ .shot_meta
+ =image_tag @player.avatar_url
+ %h2
+ = @player.name
+ %span
+ = @player.location
+ %br
+ %a{:href => @player.website_url , :target => '_blank'}=@player.website_url
+ = render :partial => "player_stats"
+ %h3=@player.name+'\'s shots:'
+ = render :partial => "player_shots"
+
+ %a.big-pink{:href => "http://twitter.com/"+@player.twitter_screen_name , :target => "_blank"} Follow Player on Twitter
Binary file not shown.
@@ -0,0 +1,12 @@
+- @shots.each do |shot|
+ %a{:href => shot_path(shot.id)}
+ = image_tag shot.image_url
+ %ul.stats
+ %li.views
+ = shot.views_count
+ %li.comments
+ = shot.comments_count
+ %li.likes
+ = shot.likes_count
+ %li.view
+ %a{:href => shot_path(shot.id)} view &raquo;
@@ -2,18 +2,7 @@
%h1.hooppps hooppps
%a.about{:href => '#about'} About
#content
- - @shots.each do |shot|
- %a{:href => shot_path(shot.id)}
- = image_tag shot.image_url
- %ul.stats
- %li.views
- = shot.views_count
- %li.comments
- = shot.comments_count
- %li.likes
- = shot.likes_count
- %li.view
- %a{:href => shot_path(shot.id)} view &raquo;
+ = render :partial => "shots"
- if @page == 1
= link_to raw("more shots &rsaquo;"), root_path(:page => @page + 1), :class => 'big-pink'
- elsif @page > 1 && @page < @shots.pages
@@ -1,14 +1,15 @@
#header
%h1.hooppps hooppps
- = link_to "back", request.env["HTTP_REFERER"], :class => 'back_button'
+ /= link_to "back", :back, :class => 'back_button'
#content
.shot_meta
= image_tag @shot.player.avatar_url
%h2
= @shot.title
%span
%strong By:
- = @shot.player.name
+ %a{:href => player_path(@shot.player.username)}
+ = @shot.player.name
= image_tag @shot.image_url
%ul.stats
%li.views
@@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)
# Initialize the rails application
-Hooppps::Application.initialize!
+Hooppps::Application.initialize!
View
@@ -1,5 +1,6 @@
Hooppps::Application.routes.draw do
resources :shots
+ resources :player
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -1,3 +1,5 @@
+/* basic html
+---------------------------------------------*/
html {-webkit-text-size-adjust:none}
body {
background-color: #b0b0b0;
@@ -16,12 +18,34 @@ a:visited {
h3 {
font-weight: normal;
}
+
+
+/* structure & #content specified text
+---------------------------------------------*/
#header {
border-bottom: 1px solid #8d98a0;
height: 45px;
background: url(img/toolbar.png) 0 0 #6d84a2 repeat-x;
width: 100%;
}
+#content {
+ padding: 10px;
+}
+#content img {
+ max-width: 100% !important;
+ display: block;
+ width: auto;
+ height: auto;
+ margin: 0 auto;
+ margin-bottom: 10px;
+}
+#content h3 {
+ font-weight: bold;
+ text-shadow: 0px 1px 1px #eee;
+}
+
+/* header
+---------------------------------------------*/
#header h1.hooppps {
text-indent: 37px;
line-height: 45px;
@@ -66,20 +90,10 @@ h3 {
#header a.back_button:active {
background: #ae446e url(img/buttons/glare.png) 0 0 repeat-x;
}
-#content {
- padding: 10px;
-}
-#content img {
- max-width: 100% !important;
- display: block;
- width: auto;
- height: auto;
- margin: 0 auto;
- margin-bottom: 10px;
-}
-#content a {
- color: #fff;
-}
+
+
+/* about
+---------------------------------------------*/
#about {
display: none;
margin: 10px;
@@ -91,6 +105,10 @@ h3 {
#about a {
color: #EA4C88;
}
+
+
+/* shot stats
+---------------------------------------------*/
#content ul.stats {
margin: 10px 0;
background: #9d9fa1;
@@ -99,7 +117,6 @@ h3 {
padding: 10px;
position: relative;
}
-
#content ul.stats li {
list-style-type: none;
display: inline-block;
@@ -142,12 +159,17 @@ h3 {
font-weight: bold;
text-shadow: 0px 1px 1px #000;
}
+
+
+/* shot title & meta
+---------------------------------------------*/
#content .shot_meta {
min-height: 50px;
}
#content .shot_meta h2 {
padding: 0 0 0 65px;
color: #333;
+ text-shadow: 0px 1px 1px #eee;
}
#content .shot_meta img {
position: absolute;
@@ -161,6 +183,15 @@ h3 {
font-size: 14px;
display: block;
}
+#content .shot_meta h2 span a:link,
+#content .shot_meta h2 span a:visited {
+ color: #EA4C88;
+ font-weight: bold;
+}
+
+
+/* Button styles
+---------------------------------------------*/
#content a.big-pink:link,
#content a.big-pink:visited {
display: block;
@@ -222,3 +253,33 @@ h3 {
text-align: center;
width: 24%;
}
+
+
+/* player stats
+---------------------------------------------*/
+#content ul.player_stats {
+ margin: 10px 0;
+ background: #9d9fa1;
+ border: 1px solid #989a9b;
+ border-radius: 4px;
+ padding: 10px;
+ position: relative;
+}
+#content ul.player_stats li {
+ list-style-type: none;
+ display: inline-block;
+ font-size: 10px;
+ font-weight: bold;
+ line-height: px;
+ text-align: center;
+ width: 23%;
+ border-right: 1px solid #666;
+}
+#content ul.player_stats li:last-child {
+ border: none;
+}
+#content ul.player_stats li span {
+ display: block;
+ font-size: 24px;
+ text-shadow: 0px 1px 1px #ccc;
+}
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class PlayerControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class PlayerHelperTest < ActionView::TestCase
+end

0 comments on commit ee50159

Please sign in to comment.