Commit 2b2cb9ca
Changed files (4)
app
views
my
settings
passwords
profiles
shared
app/views/my/settings/index.html.erb
@@ -7,55 +7,49 @@
</script>
<% end %>
-<div class="row-fluid">
- <div class="span2">
+<div class="row">
+ <div class="col-3">
<%= render partial: "my/shared/my_nav" %>
</div>
- <div class="span10">
+ <div class="col-9">
<%= form_for(@user, :url => my_setting_path(@user), :html => { :method => :put, :class => "form-horizontal" }) do |f| %>
<fieldset>
- <div class="control-group">
- <%= f.label :name, :class => "control-label" %>
- <div class="controls"> <%= f.text_field :name, :class => "input-xlarge" %> </div>
+ <div class="form-group">
+ <%= f.label :name %>
+ <%= f.text_field :name, class: "form-control" %>
</div>
- <div class="control-group">
- <%= f.label :email, :class => "control-label" %>
- <div class="controls"> <%= f.email_field :email, :class => "input-xlarge" %> </div>
+ <div class="form-group">
+ <%= f.label :email %>
+ <%= f.email_field :email, class: "form-control" %>
</div>
- <div class="control-group">
- <%= f.label :city, :class => 'control-label' %>
- <div class="controls"> <%= f.text_field :city, :class => "input-xlarge" %> </div>
+ <div class="form-group">
+ <%= f.label :city %>
+ <%= f.text_field :city, class: "form-control" %>
</div>
- <div class="control-group">
- <%= f.label :website, :class => "control-label" %>
- <div class="controls"> <%= f.url_field :website, :class => "input-xlarge url", :placeholder => "http://cakeside.com" %> </div>
+ <div class="form-group">
+ <%= f.label :website %>
+ <%= f.url_field :website, class: "form-control url", placeholder: "http://cakeside.com" %>
</div>
- <div class="control-group">
- <%= f.label :twitter, "Twitter username @", :class => "control-label" %>
- <div class="controls"> <%= f.text_field :twitter, :class => "input-xlarge", :placeholder => "without the @ sign", :maxlength => "255" %> </div>
+ <div class="form-group">
+ <%= f.label :twitter, "Twitter username @" %>
+ <%= f.text_field :twitter, class: "form-control", placeholder: "without the @ sign", maxlength: "255" %>
</div>
- <div class="control-group">
- <%= f.label :facebook, :class => "control-label" %>
- <div class="controls"> <%= f.text_field :facebook, :class => "input-xlarge", :placeholder => "http://www.facebook.com/your_profile", :maxlength => "255" %> </div>
+ <div class="form-group">
+ <%= f.label :facebook %>
+ <%= f.text_field :facebook, class: "form-control", placeholder: "http://www.facebook.com/your_profile", maxlength: "255" %>
</div>
- <p class="help-block">
- <strong>Note:</strong> Help us better serve you by checking off what best describes you?
- </p>
- <div class="control-group">
- <label class="control-label">About me:</label>
- <div class="controls">
- <% for interest in Interest.all %>
- <label class="checkbox">
- <%= check_box_tag "user[interest_ids][]", interest.id, current_user.interests.include?(interest) %>
- <%= interest.name %>
- </label>
- <% end %>
- </div>
- </div><!-- /control-group -->
- <div class="form-actions">
- <input type="submit" class="btn btn-primary" value="Save changes" />
- <button type="reset" class="btn">Cancel</button>
+ <p class="help-block"><strong>Note:</strong> Help us better serve you by checking off what best describes you?</p>
+ <div class="form-check">
+ <label class="">About me:</label>
+ <% for interest in Interest.all %>
+ <label class="form-check-label">
+ <%= check_box_tag "user[interest_ids][]", interest.id, current_user.interests.include?(interest), class: 'form-check-input' %>
+ <%= interest.name %>
+ </label>
+ <% end %>
</div>
+ <input type="submit" class="btn btn-primary" value="Save changes" />
+ <button type="reset" class="btn btn-secondary">Cancel</button>
</fieldset>
<% end %>
</div>
app/views/passwords/edit.html.erb
@@ -1,20 +1,14 @@
-<div class="row-fluid">
- <div class="span12">
+<div class="row">
+ <div class="col">
<h1>Reset Password</h1>
<%= form_for(@user, url: password_path(@user.reset_password_token), html: { method: :put }, class: "form-horizontal") do |f| %>
- <fieldset>
- <legend>Enter your new password</legend>
- <div class="control-group">
- <%= f.label :password, "New password", class: "control-label" %>
- <div class="controls">
- <%= f.password_field :password, class: "input-xlarge" %>
- </div>
- </div>
- <div class="form-actions">
- <%= f.hidden_field :reset_password_token %>
- <%= f.submit "Change my password", class: 'btn btn-primary' %>
- </div>
- </fieldset>
+ <legend>Enter your new password</legend>
+ <div class="form-group">
+ <%= f.label :password, "New password" %>
+ <%= f.password_field :password, class: "form-control" %>
+ </div>
+ <%= f.hidden_field :reset_password_token %>
+ <%= f.submit "Change my password", class: 'btn btn-primary' %>
<% end %>
</div>
</div>
app/views/profiles/show.html.erb
@@ -1,12 +1,10 @@
<% provide(:title, @user.name) -%>
<% provide(:search_path, profiles_path) %>
<div class="row">
- <div class="span3">
- <div class="thumbnail">
- <%= avatar_for(@user) %>
- </div>
+ <div class="col-3">
+ <%= avatar_for(@user, clazz: 'img-thumbnail') %>
</div>
- <div class="span9">
+ <div class="col-9">
<h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
<h5><%= @user.city %></h5>
<hr>
@@ -17,27 +15,18 @@
<p><a href="https://twitter.com/<%= @user.twitter %>" target="_blank" class="twitter-follow-button" data-show-count="false">Follow @<%= @user.twitter %></a></p>
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
<% end %>
- <% unless @user.facebook.blank? %>
- <p><a href="<%= @user.facebook %>" target="_blank"><%= image_tag "f_logo_16x16x32.png", :alt => "Like us on Facebook" %> Like on Facebook</a></p>
+ <% if @user.facebook.present? %>
+ <p><a href="<%= @user.facebook %>" target="_blank"><%= image_tag "f_logo_16x16x32.png", :alt => "Like us on Facebook" %> Like on Facebook</a></p>
<% end %>
</div>
</div>
<hr />
-<div class="row-fluid">
- <% @creations.each_slice(6).each do |batch| %>
- <ul class='thumbnails'>
- <% batch.each do |creation| %>
- <li class="span2">
- <div class="thumbnail">
- <%= link_to cake_path(creation) do %>
- <%= image_tag creation.primary_image.url_for(:thumb) %>
- <% end %>
- <div class="caption">
- <small><%= link_to truncate(creation.name, length: 20), cake_path(creation) %></small>
- </div>
- </div>
- </li>
+<div class="card-columns">
+ <% @creations.each do |creation| %>
+ <div class="card">
+ <%= link_to cake_path(creation) do %>
+ <%= image_tag creation.primary_image.url_for(:thumb), class: 'card-img-top' %>
<% end %>
- </ul>
+ </div>
<% end %>
</div>