Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
after-party mobile version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Croak committed Feb 5, 2011
1 parent 278c548 commit 8993fc7
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 8 deletions.
2 changes: 2 additions & 0 deletions app/controllers/parties_controller.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,6 @@
class PartiesController < ApplicationController class PartiesController < ApplicationController
before_filter :force_mobile_format, :if => lambda { params[:mobile] }

def show def show
@partiers = User.partiers @partiers = User.partiers
@bostonians = User.bostonians @bostonians = User.bostonians
Expand Down
14 changes: 14 additions & 0 deletions app/views/parties/_form.mobile.erb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
<%= form_for current_user do |form| %>
<div class="description-field">
<label>Tell local students about yourself</label><br />
<%= form.text_area :description %>
</div>
<div class="partying-field">
<label>Are you attending the after-party?<abbr title="required">*</abbr></label><br />
<%= form.radio_button :partying, true %>
<%= form.label :partying, "Partying", :for => "user_partying_partying" %>
<%= form.radio_button :partying, false %>
<%= form.label :partying, "Not Partying", :for => "user_partying_not_partying" %>
</div>
<%= form.submit "Change RSVP", :disable_with => "Please wait..." %>
<% end %>
28 changes: 28 additions & 0 deletions app/views/parties/show.mobile.erb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,28 @@
<div data-role="page">
<div data-role="header">
<h1>After-Party</h1>
</div>

<div data-role="content" class="ui-content" role="main">
<% if current_user %>
<p>Cool, see you there today.</p>
<% else %>
<div class="register-button top clearfix">
<div class="hand left"></div>
<h2><%= link_to "RSVP here", "/auth/twitter", :rel => "external" %></h2>
<div class="hand right"></div>
</div>
<% end %>
<p><a href="http://maps.google.com/maps?cid=11425628393869581370">Map</a> to the Hard Rock Cafe. We suggest taking the Red Line from Kendall to Park Street, then the Green Line from Park Street to Haymarket. The Hard Rock is a short walk from there.</p>
</div>

<ul data-role="listview" id="partiers">
<% @partiers.each do |partier| %>
<li>
<%= twitter_avatar partier.twitter, 73 %>
<%= partier.name %>
<div class="description"><%= partier.description %></div>
</li>
<% end %>
</ul>
</div>
1 change: 1 addition & 0 deletions app/views/registrations/new.mobile.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<li><%= link_to "Talks", talks_path %></li> <li><%= link_to "Talks", talks_path %></li>
<li><%= link_to "Students", "#students" %></li> <li><%= link_to "Students", "#students" %></li>
<li><%= link_to "Startups", startups_path %></li> <li><%= link_to "Startups", startups_path %></li>
<li><%= link_to "After-Party", party_path(:mobile => true) %></li>
<li><%= link_to "Opportunities", opportunities_path %></li> <li><%= link_to "Opportunities", opportunities_path %></li>
</ul> </ul>
</div> </div>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/_head.mobile.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
<link href='http://font.thoughtbot.com/league-gothic.css' rel='stylesheet' type='text/css'> <link href='http://font.thoughtbot.com/league-gothic.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=IM+Fell+English&subset=latin' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=IM+Fell+English&subset=latin' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC&subset=latin' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "mobile" %> <%= stylesheet_link_tag "mobile" %>
16 changes: 13 additions & 3 deletions public/stylesheets/mobile.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
/*@mixin font-Lobster { /*@mixin font-Lobster {
font-family: 'Lobster', arial, sans-serif; font-family: 'Lobster', arial, sans-serif;
} }
@mixin font-Fell {
font-family: 'IM Fell English', Times, "Times New Roman", Georgia, serif;
}
@mixin font-FellSC { @mixin font-FellSC {
font-family: 'IM Fell English SC', Times, "Times New Roman", Georgia, serif; font-family: 'IM Fell English SC', Times, "Times New Roman", Georgia, serif;
}*/ }*/
Expand Down Expand Up @@ -61,3 +58,16 @@ ul .ui-btn-text {
font-family: 'LeagueGothicRegular', "Gill Sans", "Trebuchet MS", Calibri, sans-serif; font-family: 'LeagueGothicRegular', "Gill Sans", "Trebuchet MS", Calibri, sans-serif;
font-size: 1.4em; font-size: 1.4em;
font-weight: normal; } font-weight: normal; }

#partiers li {
height: 73px; }
#partiers li .description {
font-family: 'IM Fell English', Times, "Times New Roman", Georgia, serif;
font-size: 12px; }
#partiers li .ui-btn-inner {
padding-left: 90px; }
#partiers li .ui-icon-arrow-r {
margin-top: -19px; }

.description-field, .partying-field {
clear: both; }
30 changes: 26 additions & 4 deletions public/stylesheets/sass/mobile.scss
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
@mixin font-LeagueGothic { @mixin font-LeagueGothic {
font-family: 'LeagueGothicRegular', "Gill Sans", "Trebuchet MS", Calibri, sans-serif; font-family: 'LeagueGothicRegular', "Gill Sans", "Trebuchet MS", Calibri, sans-serif;
} }
/*@mixin font-Lobster {
font-family: 'Lobster', arial, sans-serif;
}
@mixin font-Fell { @mixin font-Fell {
font-family: 'IM Fell English', Times, "Times New Roman", Georgia, serif; font-family: 'IM Fell English', Times, "Times New Roman", Georgia, serif;
} }
/*@mixin font-Lobster {
font-family: 'Lobster', arial, sans-serif;
}
@mixin font-FellSC { @mixin font-FellSC {
font-family: 'IM Fell English SC', Times, "Times New Roman", Georgia, serif; font-family: 'IM Fell English SC', Times, "Times New Roman", Georgia, serif;
}*/ }*/
Expand Down Expand Up @@ -87,4 +87,26 @@ ul .ui-btn-text {
@include font-LeagueGothic; @include font-LeagueGothic;
font-size: 1.4em; font-size: 1.4em;
font-weight: normal; font-weight: normal;
} }

#partiers {
li {
height: 73px;
.description {
@include font-Fell;
font-size: 12px;
}
.ui-btn-inner {
padding-left: 90px;
.ui-btn-text {
}
}
.ui-icon-arrow-r {
margin-top: -19px;
}
}
}

.description-field, .partying-field {
clear: both;
}

0 comments on commit 8993fc7

Please sign in to comment.