Adds styles for authentication pages
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
// 05.2. Debates Show
|
||||
// 06. Comments
|
||||
// 07. Tags
|
||||
// 08. Login and Sign Up
|
||||
// 08.1. Login
|
||||
// 08.2. Sign Up
|
||||
//
|
||||
|
||||
// 01. Variables
|
||||
@@ -17,7 +20,7 @@
|
||||
$font-family-sans-serif: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
$line-height: rem-calc(24);
|
||||
|
||||
$background: #F9F9F9;
|
||||
$background: #E9E9E9;
|
||||
$border: #DEE0E3;
|
||||
$brand: #0077B9;
|
||||
|
||||
@@ -81,6 +84,16 @@ body {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: $brand;
|
||||
color: white;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: $brand;
|
||||
color: white;
|
||||
}
|
||||
|
||||
// 03. Header
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@@ -493,10 +506,66 @@ header {
|
||||
background: #e5f1f8;
|
||||
border: 1px solid $brand;
|
||||
}
|
||||
}
|
||||
|
||||
// 08. Login and Sign Up
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// 08.1. Login
|
||||
// - - - - - - - - - - - -
|
||||
|
||||
.auth {
|
||||
background: $background;
|
||||
box-shadow: 0px -4px 5px $background;
|
||||
min-height: $line-height*20;
|
||||
|
||||
.panel {
|
||||
background: white;
|
||||
margin-top: $line-height*2;
|
||||
|
||||
h1 {
|
||||
font-size: rem-calc(30);
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
<%= form_for(@debate) do |f| %>
|
||||
<% if @debate.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@debate.errors.count, t("debates.form.one_error"), t("debates.form.multiple_errors")) %> <%= t("debates.form.not_saved") %>:</h2>
|
||||
<% if @debate.errors.any? %>
|
||||
<div id="error_explanation" class="alert-box alert radius">
|
||||
<p><%= pluralize(@debate.errors.count, t("debates.form.one_error"), t("debates.form.multiple_errors")) %> <%= t("debates.form.not_saved") %>:</p>
|
||||
<ul>
|
||||
<% @debate.errors.full_messages.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<ul>
|
||||
<% @debate.errors.full_messages.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p><strong><%= t("debates.form.debate_title") %></strong></p>
|
||||
<p><%= t("debates.form.title_instructions") %></p>
|
||||
<%= f.text_field :title %>
|
||||
<p><strong><%= t("debates.form.debate_title") %></strong></p>
|
||||
<p><%= t("debates.form.title_instructions") %></p>
|
||||
<%= f.text_field :title %>
|
||||
|
||||
<br/>
|
||||
<p><strong><%= t("debates.form.debate_text") %></strong></p>
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
<h2><%= t("devise_views.passwords.new.title") %></h2>
|
||||
<div class="row-full auth">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 large-8 column small-centered">
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.passwords.new.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email, t("devise_views.passwords.new.email_label") %><br />
|
||||
<%= f.email_field :email, autofocus: true %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :email, t("devise_views.passwords.new.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.passwords.new.email_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit t("devise_views.passwords.new.send_submit") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="small-12 column text-center">
|
||||
<%= f.submit t("devise_views.passwords.new.send_submit"), class: "button radius" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,42 +1,61 @@
|
||||
<h2><%= t("devise_views.registrations.new.title") %></h2>
|
||||
<div class="row-full auth">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 large-5 column small-centered">
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.registrations.new.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :first_name, t("devise_views.registrations.new.first_name_label") %>
|
||||
<%= f.text_field :first_name, autofocus: true, placeholder: t("devise_views.registrations.new.first_name_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :first_name, t("devise_views.registrations.new.first_name_label") %><br />
|
||||
<%= f.text_field :first_name, autofocus: true %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :last_name, t("devise_views.registrations.new.last_name_label") %>
|
||||
<%= f.text_field :last_name, placeholder: t("devise_views.registrations.new.last_name_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :last_name, t("devise_views.registrations.new.last_name_label") %><br />
|
||||
<%= f.text_field :last_name %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :email, t("devise_views.registrations.new.email_label") %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.registrations.new.email_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email, t("devise_views.registrations.new.email_label") %><br />
|
||||
<%= f.email_field :email %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :password, t("devise_views.registrations.new.password_label"), class: "inline-block" %>
|
||||
<% if @minimum_password_length %>
|
||||
<span class="inline-block"><i><%= t("devise_views.registrations.new.min_length", min: @minimum_password_length) %></i></span>
|
||||
<% end %>
|
||||
<%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.registrations.new.password_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password, t("devise_views.registrations.new.password_label") %>
|
||||
<% if @minimum_password_length %>
|
||||
<em><%= t("devise_views.registrations.new.min_length", min: @minimum_password_length) %></em>
|
||||
<% end %><br />
|
||||
<%= f.password_field :password, autocomplete: "off" %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :password_confirmation, t("devise_views.registrations.new.password_confirmation_label") %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off", placeholder: t("devise_views.registrations.new.password_confirmation_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation, t("devise_views.registrations.new.password_confirmation_label") %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
||||
</div>
|
||||
<%= render 'shared/captcha', resource: resource %>
|
||||
|
||||
<%= render 'shared/captcha', resource: resource %>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.submit t("devise_views.registrations.new.submit"), class: "button radius expand" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="actions" style="padding-top:20px">
|
||||
<%= f.submit t("devise_views.registrations.new.submit"), class: 'button radius' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,26 +1,42 @@
|
||||
<h2><%= t("devise_views.sessions.new.title") %></h2>
|
||||
<div class="row-full auth">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 large-5 column small-centered">
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.sessions.new.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div class="field">
|
||||
<%= f.label :email, t("devise_views.sessions.new.email_label") %><br />
|
||||
<%= f.email_field :email, autofocus: true %>
|
||||
</div>
|
||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :email, t("devise_views.sessions.new.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password, t("devise_views.sessions.new.password_label") %><br />
|
||||
<%= f.password_field :password, autocomplete: "off" %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :password, t("devise_views.sessions.new.password_label") %>
|
||||
<%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div class="field">
|
||||
<%= f.check_box :remember_me %>
|
||||
<%= f.label :remember_me, t("devise_views.sessions.new.remember_me") %>
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.check_box :remember_me %>
|
||||
<%= f.label :remember_me, t("devise_views.sessions.new.remember_me") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.submit(t("devise_views.sessions.new.submit"), class: "button radius expand") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit(t("devise_views.sessions.new.submit"), class: "button radius") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
@@ -1,25 +1,27 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t("devise_views.shared.links.login"), new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
<div class="text-center">
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t("devise_views.shared.links.login"), new_session_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t("devise_views.shared.links.signup"), new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t("devise_views.shared.links.signup"), new_registration_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to t("devise_views.shared.links.new_confirmation"), new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to t("devise_views.shared.links.new_confirmation"), new_confirmation_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to t("devise_views.shared.links.new_unlock"), new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to t("devise_views.shared.links.new_unlock"), new_unlock_path(resource_name) %><br>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to t("devise_views.shared.links.signin_with_provider", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to t("devise_views.shared.links.signin_with_provider", provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
Reference in New Issue
Block a user