-# Copyright 2012 Twitter, Inc. and others.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.

- unless data['profile_image'].blank?
  %p
    %img{:src => data['profile_image']}

- unless data['name'].blank?
  %p
    %b Name:
    = data['name']

- unless data['username'].blank?
  %p
    %b Screen Name:
    %a{:target => '_blank', :href => "https://twitter.com/#{data['username']}"}
      @#{data['username']}

- unless data['bio'].blank?
  %p
    %b Bio:
    = data['bio']

- unless data['location'].blank?
  %p
    %b Location:
    = data['location']

- unless data['website'].blank?
  %p
    %b Website:
    %a{:target => '_blank', :href => data['website']}= data['website']

- unless data['recent_tweets'].blank?
  %h3 Recent Tweets:
  .timeline
    - data['recent_tweets'].to_s.split(/\s/).each do |id|
      = render :partial => 'components/tweet', :locals => {:data => {'tweet_id' => id}}

- unless data['retweets'].blank?
  %h3 Retweets:
  .timeline
    - data['retweets'].to_s.split(/\s/).each do |id|
      = render :partial => 'components/tweet', :locals => {:data => {'tweet_id' => id}}

- unless data['favorites'].blank?
  %h3 Favorite Tweets:
  .timeline
    - data['favorites'].to_s.split(/\s/).each do |id|
      = render :partial => 'components/tweet', :locals => {:data => {'tweet_id' => id}}
