Skip to content

Commit

Permalink
moar button styling for #138.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Huerta committed Aug 24, 2014
1 parent 975e339 commit 06baf8d
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 53 deletions.
15 changes: 6 additions & 9 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<div class="space"></div>
<div class="login-container">
<div class="login">
<h2 class="admin_heading">Sign in</h2>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<div>
<%= f.email_field :email, :autofocus => true, :placeholder => "Email", :class => "text-field" %></div>

<%= f.email_field :email, :autofocus => true, :placeholder => "Email", :class => "text-field" %>
</div>
<div>
<%= f.password_field :password, :placeholder => "Password", :class => "text-field" %></div>

<%= f.password_field :password, :placeholder => "Password", :class => "text-field" %>
</div>
<% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
<% end -%>

<div><%= f.submit "Sign in" %></div>

<%= render "devise/shared/links" %>
<div><%= f.submit "Sign in", :id => "login-button", :class => "admin-form-button" %></div>
<div class="login-links"><%= render "devise/shared/links" %></div>
<% end %>
</div>
</div>
12 changes: 6 additions & 6 deletions app/views/devise/shared/_links.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Sign in", new_session_path(resource_name) %>
<%= link_to "Sign in", new_session_path(resource_name), class: 'admin-form-button' %>
<% end -%>

<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %>
<%= link_to "Sign up", new_registration_path(resource_name), class: 'admin-form-button' %>
<% end -%>

<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %>
<%= link_to "Forgot your password?", new_password_path(resource_name), class: 'admin-form-button' %>
<% end -%>

<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: 'admin-form-button' %>
<% end -%>

<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: 'admin-form-button' %>
<% end -%>

<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), class: 'admin-form-button' %>
<% end -%>
<% end -%>
4 changes: 2 additions & 2 deletions app/views/events/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container">
<h1>Editing Event</h1>
<%= render 'form' %>
<%= link_to 'Show', @event %> |
<%= link_to 'Back', events_path %>
<%= link_to 'Show', @event, class: 'admin-form-button' %>
<%= link_to 'Back', events_path, class: 'admin-form-button' %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/events/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

<%= render 'form' %>

<%= link_to 'Back', events_path %>
<%= link_to 'Back', events_path, class: 'admin-form-button' %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/organizers/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<div class="container">
<h1>Editing organizer</h1>
<%= render 'form' %>
<%= link_to 'Back', organizers_path %>
<%= link_to 'Back', organizers_path, class: 'admin-form-button' %>
</div>
</div>
6 changes: 3 additions & 3 deletions app/views/organizers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<td></td>
<td></td>
<td></td>
<td><%= link_to 'Edit', edit_organizer_path(organizer) %></td>
<td><%= link_to 'Destroy', organizer, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Edit', edit_organizer_path(organizer), class: 'admin-form-button' %> </td>
<td><%= link_to 'Destroy', organizer, method: :delete, data: { confirm: 'Are you sure?' }, class: 'admin-form-button' %> </td>
</tr>
<% end %>
</tbody>
</table>
<%= link_to 'Back', '/admin' %>
<%= link_to 'Back', '/admin', class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/participants/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container">
<h1>Editing participant</h1>
<%= render 'form' %>
<%= link_to 'Show', @participant %> |
<%= link_to 'Back', participants_path %>
<%= link_to 'Show', @participant, class: 'admin-form-button' %> |
<%= link_to 'Back', participants_path, class: 'admin-form-button' %>
</div>
</div>
10 changes: 5 additions & 5 deletions app/views/participants/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
<td><%= participant.bio %></td>
<td><%= participant.twitter_handle %></td>
<td><%= participant.website %></td>
<td><%= link_to 'Show', participant %></td>
<td><%= link_to 'Edit', edit_participant_path(participant) %></td>
<td><%= link_to 'Destroy', participant, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Show', participant, class: 'admin-form-button' %> </td>
<td><%= link_to 'Edit', edit_participant_path(participant), class: 'admin-form-button' %> </td>
<td><%= link_to 'Destroy', participant, method: :delete, data: { confirm: 'Are you sure?' }, class: 'admin-form-button' %> </td>
</tr>
<% end %>
</tbody>
</table>

<%= link_to 'New Participant', new_participant_path %>
<%= link_to 'Back', '/admin' %>
<%= link_to 'New Participant', new_participant_path, class: 'admin-form-button' %>
<%= link_to 'Back', '/admin', class: 'admin-form-button' %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/participants/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<div class="container">
<h1>New participant</h1>
<%= render 'form' %>
<%= link_to 'Back', participants_path %>
<%= link_to 'Back', participants_path, class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/participants/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% end %>
</p>

<%= link_to 'Edit', edit_participant_path(@participant) %> |
<%= link_to 'Back', participants_path %>
<%= link_to 'Edit', edit_participant_path(@participant), class: 'admin-form-button' %>
<%= link_to 'Back', participants_path, class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/projects/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container">
<h1>Editing project</h1>
<%= render 'form' %>
<%= link_to 'Show', @project %> |
<%= link_to 'Back', projects_path %>
<%= link_to 'Show', @project, class: 'admin-form-button' %>
<%= link_to 'Back', projects_path, class: 'admin-form-button' %>
</div>
</div>
10 changes: 5 additions & 5 deletions app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<td><%= project.name %></td>
<td><%= project.description %></td>
<td><%= project.tag %></td>
<td><%= link_to 'Show', project %></td>
<td><%= link_to 'Edit', edit_project_path(project) %></td>
<td><%= link_to 'Destroy', project, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Show', project, class: 'admin-form-button' %> </td>
<td><%= link_to 'Edit', edit_project_path(project), class: 'admin-form-button' %> </td>
<td><%= link_to 'Destroy', project, method: :delete, data: { confirm: 'Are you sure?' }, class: 'admin-form-button' %> </td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Project', new_project_path %>
<%= link_to 'Back', '/admin' %>
<%= link_to 'New Project', new_project_path, class: 'admin-form-button' %>
<%= link_to 'Back', '/admin', class: 'admin-form-button' %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/projects/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<div class="container">
<h1>New project</h1>
<%= render 'form' %>
<%= link_to 'Back', projects_path %>
<%= link_to 'Back', projects_path, class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/venues/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container">
<h1>Editing venue</h1>
<%= render 'form' %>
<%= link_to 'Show', @venue %> |
<%= link_to 'Back', venues_path %>
<%= link_to 'Show', @venue, class: 'admin-form-button' %> |
<%= link_to 'Back', venues_path, class: 'admin-form-button' %>
</div>
</div>
10 changes: 5 additions & 5 deletions app/views/venues/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
<td><%= venue.country %></td>
<td><%= venue.postal_code %></td>
<td><%= venue.website %></td>
<td><%= link_to 'Show', venue %></td>
<td><%= link_to 'Edit', edit_venue_path(venue) %></td>
<td><%= link_to 'Destroy', venue, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Show', venue, class: 'admin-form-button' %> </td>
<td><%= link_to 'Edit', edit_venue_path(venue), class: 'admin-form-button' %> </td>
<td><%= link_to 'Destroy', venue, method: :delete, data: { confirm: 'Are you sure?' }, class: 'admin-form-button' %> </td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Venue', new_venue_path %>
<%= link_to 'Back', '/admin' %>
<%= link_to 'New Venue', new_venue_path, class: 'admin-form-button' %>
<%= link_to 'Back', '/admin', class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/venues/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="section">
<div class="container">
<h1>New venue</h1>
<%= render 'form' %>
<%= link_to 'Back', venues_path %>
<%= render 'form', class: 'admin-form-button' %>
<%= link_to 'Back', venues_path, class: 'admin-form-button' %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/venues/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@
<%= @venue.website %>
</p>

<%= link_to 'Edit', edit_venue_path(@venue) %> |
<%= link_to 'Back', venues_path %>
<%= link_to 'Edit', edit_venue_path(@venue), class: 'admin-form-button' %> |
<%= link_to 'Back', venues_path, class: 'admin-form-button' %>
45 changes: 43 additions & 2 deletions public/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
}*/

.login-container {
padding-top:100px;
padding-top:140px;
width:442px;
margin:0 auto;
}

.login {
width: 400px;
height: 300px;
height: 350px;
border-style: solid;
border-width: 1px;
border-color: #000;
Expand Down Expand Up @@ -78,6 +78,7 @@
}

.login .text-field {
margin-top:20px;
width:380px;
}

Expand All @@ -87,6 +88,25 @@
float:left;
}*/

#login-button {
margin-top:0px;
width:400px;
font-family:'COLFAX';
background-color: #000;
color:#FFF;
border: none;
cursor: pointer;
}

#login-button:hover {
background-color:#5000ff;
}

.login-links {
margin-top:10px;
text-align:right;
}

.admin-two-column {
-moz-column-count: 2;
-webkit-column-count: 2;
Expand All @@ -106,6 +126,27 @@ small {
font-size:12px;
}

/*Generic form button*/
.admin-form-button, .admin-form-button:visited {
margin-top:15px;
padding: 10px 20px;
background-color: black;
font-family: 'COLFAX';
color:#FFF;
border: none;
font-size: 13px;
text-transform:uppercase;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-webkit-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.admin-form-button:hover {
background-color: #5000ff;
color:#FFF;
}

/* Admin access buttons when logged in as an admin */
.admin-button, .admin-button:visited {
padding:10px 20px;
Expand Down

0 comments on commit 06baf8d

Please sign in to comment.