Commit b94adaf7 by Ba Toi Dang

Merge branch 'features/create_my_page' into 'master'

create my page

See merge request !7
parents 8d0f1d38 75d6f614
...@@ -20,3 +20,6 @@ ...@@ -20,3 +20,6 @@
# Ignore application configuration # Ignore application configuration
/config/application.yml /config/application.yml
# Ignore public
/public
...@@ -82,12 +82,13 @@ GEM ...@@ -82,12 +82,13 @@ GEM
loofah (2.1.1) loofah (2.1.1)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.6.6) mail (2.7.0)
mime-types (>= 1.16, < 4) mini_mime (>= 0.1.1)
method_source (0.9.0) method_source (0.9.0)
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mini_mime (0.1.4)
mini_portile2 (2.3.0) mini_portile2 (2.3.0)
minitest (5.10.3) minitest (5.10.3)
multipart-post (2.0.0) multipart-post (2.0.0)
......
...@@ -17,4 +17,8 @@ ...@@ -17,4 +17,8 @@
$(document).ready(function(){ $(document).ready(function(){
$('.message').delay(5000).fadeOut('slow'); $('.message').delay(5000).fadeOut('slow');
$(document).on('change', 'input[name=job_id]', function(event) {
event.preventDefault();
$('#apply').removeAttr('disabled')
});
}); });
...@@ -37,6 +37,10 @@ body{ ...@@ -37,6 +37,10 @@ body{
width: 80% !important; width: 80% !important;
} }
.mrTop5{
margin-top: 5px;
}
// key-visual // key-visual
.key-visual{ .key-visual{
width: 100%; width: 100%;
......
...@@ -15,13 +15,14 @@ class AppliesController < ApplicationController ...@@ -15,13 +15,14 @@ class AppliesController < ApplicationController
@application = ApplyJob.new(application_params) @application = ApplyJob.new(application_params)
@application.user = current_user @application.user = current_user
@application.job_id = session[:job_id] @application.job_id = session[:job_id]
session[:candidate] = {name: application_params[:name], @application.cv = current_user.cv if application_params[:cv].blank?
email: application_params[:email], session[:candidate] = { name: application_params[:name],
cv: application_params[:cv]} email: application_params[:email],
cv: (application_params[:cv] || current_user.cv) }
unless @application.valid? unless @application.valid?
flash[:error] = @application.errors.full_messages.to_sentence flash[:error] = @application.errors.full_messages.to_sentence
redirect_to apply_path(job_id: session[:job_id]) redirect_to apply_applies_path(job_id: session[:job_id])
return return
end end
end end
...@@ -30,6 +31,7 @@ class AppliesController < ApplicationController ...@@ -30,6 +31,7 @@ class AppliesController < ApplicationController
@application = ApplyJob.new(user: current_user, @application = ApplyJob.new(user: current_user,
job_id: session[:job_id]) job_id: session[:job_id])
@application.attributes = session[:candidate] @application.attributes = session[:candidate]
@application.cv = current_user.cv if @application.cv.file.nil?
if @application.save if @application.save
flash[:notice] = 'Congratulation! Job was successfully applied' flash[:notice] = 'Congratulation! Job was successfully applied'
......
...@@ -8,6 +8,7 @@ class JobsController < ApplicationController ...@@ -8,6 +8,7 @@ class JobsController < ApplicationController
def show def show
clear_session_candidate clear_session_candidate
current_user.view(Job.find(params[:id])) if current_user
end end
def city def city
......
class MyPagesController < ApplicationController
before_action :authenticate_user!
def index
@user = current_user
end
def my_job
@jobs = current_user.my_jobs
end
def history
@jobs = current_user.viewed_jobs.includes(:apply_jobs, :company).limit(Settings.top.job_per_history_page)
end
def download_cv
if current_user.cv.file.exists?
send_file current_user.cv.path
else
flash[:notice] = 'File not exist!'
redirect_back(fallback_location: root_path)
end
end
end
class PasswordsController < Devise::PasswordsController
def edit
self.resource = User.with_reset_password_token(params[:reset_password_token])
if self.resource
set_minimum_password_length
resource.reset_password_token = params[:reset_password_token]
else
flash[:notice] = 'was already confirmed, please try signing in'
redirect_to root_path
end
end
end
module ApplicationHelper module ApplicationHelper
def user_has_applied?(job)
current_user && current_user.applied?(job)
end
end end
class ApplyJob < ApplicationRecord class ApplyJob < ApplicationRecord
belongs_to :job belongs_to :job
belongs_to :user belongs_to :user
validates :cv, presence: true validates_size_of :cv, maximum: 5.megabytes, message: 'size should be less than 5MB'
validates :email, presence: true validates :email, presence: true
validates :name, presence: true validates :name, presence: true
# CarrierWave
mount_uploader :cv, CvUploader
end end
...@@ -8,6 +8,8 @@ class Job < ApplicationRecord ...@@ -8,6 +8,8 @@ class Job < ApplicationRecord
has_many :industries, through: :industries_jobs has_many :industries, through: :industries_jobs
has_many :cities_jobs has_many :cities_jobs
has_many :cities, through: :cities_jobs has_many :cities, through: :cities_jobs
has_many :view_jobs
has_many :users_has_viewed, through: :view_jobs, class_name: 'User', source: :user
scope :top_list, -> { order(updated_date: :desc).limit(Settings.top.job_per_page) } scope :top_list, -> { order(updated_date: :desc).limit(Settings.top.job_per_page) }
...@@ -54,15 +56,14 @@ class Job < ApplicationRecord ...@@ -54,15 +56,14 @@ class Job < ApplicationRecord
puts "Saving #{item[:name]} ......................................" puts "Saving #{item[:name]} ......................................"
if job.save if job.save
puts "Job was successfully created" puts 'Job was successfully created'
else else
puts "Error..." puts 'Error...'
end end
end end
end end
def self.filter_link_exist(links) def self.filter_link_exist(links)
return links - Job.where(original_link: links).pluck(:original_link) links - Job.where(original_link: links).pluck(:original_link)
end end
end end
...@@ -5,6 +5,8 @@ class User < ApplicationRecord ...@@ -5,6 +5,8 @@ class User < ApplicationRecord
has_many :applied_jobs, through: :apply_jobs, class_name: 'Job', source: :job has_many :applied_jobs, through: :apply_jobs, class_name: 'Job', source: :job
has_many :favorite_jobs has_many :favorite_jobs
has_many :liked_jobs, through: :favorite_jobs, class_name: 'Job', source: :job has_many :liked_jobs, through: :favorite_jobs, class_name: 'Job', source: :job
has_many :view_jobs
has_many :viewed_jobs, through: :view_jobs, class_name: 'Job', source: :job
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable # :confirmable, :lockable, :timeoutable and :omniauthable
...@@ -33,6 +35,25 @@ class User < ApplicationRecord ...@@ -33,6 +35,25 @@ class User < ApplicationRecord
liked_jobs.include?(job) liked_jobs.include?(job)
end end
def view(job)
viewed_jobs << job unless viewed?(job)
end
def viewed?(job)
viewed_jobs.include?(job)
end
def applied?(job)
applied_jobs.include?(job)
end
def my_jobs
Job.select(:'jobs.id', :'jobs.name', :'jobs.salary', :'jobs.description',
:'companies.location', :'apply_jobs.created_at')
.joins(:company, :apply_jobs)
.where(apply_jobs: { user_id: id })
end
private private
def password_required? def password_required?
......
class ViewJob < ApplicationRecord
belongs_to :user
belongs_to :job
end
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="text-info">1. Apply form</p> <p class="text-info">1. Apply form</p>
</div> </div>
<div class="form-horizontal"> <div class="form-horizontal">
<%= form_for @application, url: confirm_applies_path do |f| %> <%= form_for(@application, url: confirm_applies_path, html: { multipart: true }) do |f| %>
<div class="form-group"> <div class="form-group">
<%= f.label :Email, 'Email:', class: "control-label col-md-2" %> <%= f.label :Email, 'Email:', class: "control-label col-md-2" %>
<div class="col-sm-10"> <div class="col-sm-10">
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
<div class="form-group"> <div class="form-group">
<%= f.label :cv, 'Cv:',class: "control-label col-md-2" %> <%= f.label :cv, 'Cv:',class: "control-label col-md-2" %>
<div class="col-sm-10"> <div class="col-sm-10 mrTop5">
<%= f.text_field :cv, class: "form-control" %> <label for="apply_job_cv"><%= @application.cv.filename %></label>
</label>
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<p>Fullname: <%= @application.name %></p> <p>Fullname: <%= @application.name %></p>
<p>Email: <%= @application.email %></p> <p>Email: <%= @application.email %></p>
<p>Cv: <%= @application.cv %></p> <p>Cv: <%= @application.cv.filename %></p>
<div class="col-md-10"> <div class="col-md-10">
<%= button_to "Edit", <%= button_to "Edit",
apply_applies_path(job_id: session[:job_id]), apply_applies_path(job_id: session[:job_id]),
......
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
</p> </p>
<p> <p>
<span>CV Link: </span> <span>CV Link: </span>
<span> <%= @application.cv %></span> <span>
<%= link_to @application.cv.filename, download_my_pages_url %>
</span>
</p> </p>
</div> </div>
......
...@@ -3,29 +3,42 @@ ...@@ -3,29 +3,42 @@
<div class="jobs clearfix"> <div class="jobs clearfix">
<div class="job col-md-12"> <div class="job col-md-12">
<table class="table"> <table class="table">
<tbody> <%= form_tag apply_applies_path, method: :get do %>
<%- @jobs.each do |job|-%> <tbody>
<tr> <%- @jobs.each do |job|-%>
<td class="col-md-1 position-relative"> <tr>
<input type="radio" name="rbn-apply-job" class="mid-heigth"> <td class="col-md-1 position-relative">
</td> <%= radio_button_tag "job_id", job.id, false, class: "mid-heigth",
<td class="col-md-9"> disabled: user_has_applied?(job) ? true : false %>
<h4 class="mr0"><%= link_to job.name, job_path(job) %></h4> </td>
<p><%= "Loacation: #{job.company.location}" %></p> <td class="col-md-9">
<p><%= "Salary: #{job.salary}" %></p> <h4 class="mr0"><%= link_to job.name + "#{user_has_applied?(job) ? ' (APPLIED)' : ''}", job_path(job) %></h4>
</td> <p><strong>Description:</strong><%= strip_tags(job.description)[0...250] %>...</p>
<td class="col-md-2 position-relative"> <p>
<%= button_to "Remove", <span><%= "<strong>Loacation</strong>: #{job.company.location}".html_safe %></span>
unlike_job_favorites_path(job_id: job.id), <span class="navbar-right"><%= "<strong>Salary</strong>: #{job.salary}".html_safe %></span>
data: {confirm: "Are you sure you want to remove this job?"}, </p>
class: "btn btn-danger btn-lg mid-heigth" %> </td>
</td> <td class="col-md-2 position-relative">
</tr> <%= link_to "Remove",
<% end %> unlike_job_favorites_path(job_id: job.id),
</tbody> method: :post,
data: {confirm: "Are you sure you want to remove this job?"},
class: "btn btn-danger btn-lg mid-heigth" %>
</td>
</tr>
<% end %>
<tr>
<td></td>
<td>
<%= submit_tag "Applys", class: "btn btn-primary btn-lg btn-block", id: "apply", disabled: true %>
</td>
<td></td>
</tr>
</tbody>
<% end %>
</table> </table>
</div> </div>
<%= button_to "Apply", nil, class: "btn btn-primary" %>
</div> </div>
</div> </div>
</div> </div>
<div class="job-intro well mr0 mrBot20"> <div class="job-intro well mr0 mrBot20">
<h4 class="mr0"><%= link_to job.name, job_path(job) %></h4> <h4 class="mr0"><%= link_to job.name, job_path(job) %></h4>
<p><%= "Loacation: #{job.company.location}" %></p> <p><%= "Loacation: #{job.company.location}" %></p>
<p><%= strip_tags(job.description)[0...250] %>...</p>
<p><%= "Salary: #{job.salary}" %></p> <p><%= "Salary: #{job.salary}" %></p>
</div> </div>
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
</p> </p>
<div class="job-list"> <div class="job-list">
<p> <p>
<span><%= "1. Total: #{@jobs.count}" %></span> <span>1. Total: <%= "#{@jobs.count}" %></span>
<span><%= "Result for: #{@result}" %></span> <span>Result for: <%= "#{@result}" %></span>
</p> </p>
<div class="top-page"> <div class="top-page">
<div class="top-page-info"> <div class="top-page-info">
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
</div> </div>
<div class="col-md-2 favorite"> <div class="col-md-2 favorite">
<%= link_to "FAVORITE", "#", class: "btn btn-default" %> <%= button_to "Favorite",
job_favorites_path(job_id: job.id),
class: "btn btn-primary btn-lg btn-block" %>
</div> </div>
</div> </div>
<%- end -%> <%- end -%>
......
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
</ol> </ol>
</ol> </ol>
<div class="job"> <div class="job">
<% if user_has_applied?(@job) %>
<div class="alert alert-success" role="alert">
You have applied this job.
</div>
<% end %>
<div class="col-md-9"> <div class="col-md-9">
<h1>2.<%= @job.name %></h1> <h1>2.<%= @job.name %></h1>
<p>3.<%= link_to @job.company.name, company_jobs_path(@job.company) %></p> <p>3.<%= link_to @job.company.name, company_jobs_path(@job.company) %></p>
...@@ -33,18 +38,20 @@ ...@@ -33,18 +38,20 @@
</p> </p>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<%= link_to "Apply", apply_applies_path(job_id: @job.id), class: "btn btn-primary btn-lg" %> <%= link_to "Apply",
apply_applies_path(job_id: @job.id),
class: "btn btn-primary btn-lg #{user_has_applied?(@job) ? 'disabled' : ''} btn-block" %>
</div> </div>
<div class="action"> <div class="action">
<div class="col-md-6"> <div class="col-md-6">
<%= link_to "Apply", apply_applies_path(job_id: @job.id), class: "btn btn-primary btn-lg" %> <%= link_to "Apply",
apply_applies_path(job_id: @job.id),
class: "btn btn-primary btn-lg #{user_has_applied?(@job) ? 'disabled' : ''} btn-block" %>
</div> </div>
<div class="action"> <div class="col-md-6">
<div class="col-md-6"> <%= button_to "Favorite",
<%= button_to "Favorite", job_favorites_path(job_id: @job.id),
job_favorites_path(job_id: @job.id), class: "btn btn-primary btn-lg btn-block" %>
class: "btn btn-primary btn-lg" %>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
<!-- check an user is logged in or not --> <!-- check an user is logged in or not -->
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<%- if current_user -%> <%- if current_user -%>
<li><a href="#"><i class="fa fa-user" aria-hidden="true"></i> My Page</a></li> <li>
<%= link_to my_my_pages_path do %>
<i class="fa fa-user" aria-hidden="true"></i> My Page
<% end %>
</li>
<li> <li>
<%= link_to destroy_user_session_path, method: :delete do %> <%= link_to destroy_user_session_path, method: :delete do %>
<i class="fa fa-sign-out" aria-hidden="true"></i>Logout <i class="fa fa-sign-out" aria-hidden="true"></i>Logout
...@@ -17,13 +21,13 @@ ...@@ -17,13 +21,13 @@
</li> </li>
<%- else -%> <%- else -%>
<li> <li>
<%= link_to register_path(step: 1) do %> <%= link_to new_user_session_path do %>
<i class="fa fa-plus-circle" aria-hidden="true"></i> Register <i class="fa fa-sign-in" aria-hidden="true"></i> Login
<% end %> <% end %>
</li> </li>
<li> <li>
<%= link_to new_user_session_path do %> <%= link_to register_path(step: 1) do %>
<i class="fa fa-sign-in" aria-hidden="true"></i> Login <i class="fa fa-plus-circle" aria-hidden="true"></i> Register
<% end %> <% end %>
</li> </li>
<%- end -%> <%- end -%>
...@@ -32,7 +36,11 @@ ...@@ -32,7 +36,11 @@
<i class="fa fa-star" aria-hidden="true"></i> <i class="fa fa-star" aria-hidden="true"></i>
<% end %> <% end %>
</li> </li>
<li><a href="#"><i class="fa fa-history" aria-hidden="true"></i></span> History</a></li> <li>
<%= link_to history_my_pages_path do %>
<i class="fa fa-history" aria-hidden="true"></i> History
<% end %>
</li>
</ul> </ul>
</div> </div>
</nav> </nav>
<div class="row">
<div class="container">
<div class="jobs clearfix">
<div class="job col-md-12">
<h3>History</h3>
<table class="table">
<%= form_tag apply_applies_path, method: :get do %>
<tbody>
<%- @jobs.each do |job|-%>
<tr>
<td class="col-md-1 position-relative">
<%= radio_button_tag "job_id", job.id, false, class: "mid-heigth",
disabled: user_has_applied?(job) ? true : false %>
</td>
<td class="col-md-9">
<h4 class="mr0"><%= link_to job.name + "#{user_has_applied?(job) ? ' (APPLIED)' : ''}", job_path(job) %></h4>
<p><strong>Description:</strong><%= strip_tags(job.description)[0...250] %>...</p>
<p>
<span><%= "<strong>Loacation</strong>: #{job.company.location}".html_safe %></span>
<span class="navbar-right"><%= "<strong>Salary</strong>: #{job.salary}".html_safe %></span>
</p>
</td>
</tr>
<% end %>
<tr>
<td></td>
<td>
<%= submit_tag "Applys", class: "btn btn-primary btn-lg btn-block", id: "apply", disabled: true %>
</td>
<td></td>
</tr>
</tbody>
<% end %>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="container">
<div class="col-sm-6 col-md-offset-3 toppad" >
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">My Page</h3>
</div>
<div class="panel-body">
<div class="row">
<div class=" col-md-12">
<table class="table table-user-information">
<tbody>
<tr>
<td>Name:</td>
<td><%= @user.name %></td>
</tr>
<tr>
<td>email:</td>
<td><%= @user.email %></td>
</tr>
<tr>
<td>CV:</td>
<td>
<%= link_to @user.cv.file.filename, download_my_pages_path %>
</td>
</tr>
</tbody>
</table>
<div class="col-md-6">
<%= link_to "Update", edit_user_registration_path, class: "btn btn-primary navbar-right" %>
</div>
<div class="col-md-6">
<%= link_to "My jobs", jobs_my_pages_path, class: "btn btn-primary" %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="container">
<h2>Applied jobs</h2>
<div class="jobs clearfix">
<%- @jobs.each do |job|-%>
<div class="job">
<div class="col-md-10 job-detail well">
<p><h4 class="mr0"><%= link_to job.name, job_path(job) %></h4></p>
<p><%= strip_tags(job.description)[0...250] %>...</p>
<p>
<span><strong>Location:</strong> <%= "#{job.location}" %></span>
<span><strong>Salary:</strong> <%= job.salary %></span>
<span class="navbar-right"><strong>Applied at:</strong> <%= I18n.localize(job.created_at, format: :long) %></span>
</p>
</div>
</div>
<%- end -%>
</div>
</div>
</div>
<p>Dear <%= @resource.name %>!</p>
<p>You have a new password!</p>
<p>Your password for signing in to VenJOB was recently changed. If you made this change, then we're all set.</p>
<p>If you did not make this change, please reset your password to secure your account. Then reply to this email to notify us.</p>
<p>Either way, feel free to reach out with any questions you might have. We're here to help.</p>
<p>Best,</p>
<p>Hello <%= @resource.email %>!</p>
<p>We received a request to reset the password associated with this e-mail address. If you made this request, please follow the instructions below.</p>
<p>Click the link below to reset your password using our secure server:.</p>
<p><%= link_to 'Reset your password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you did not request to have your password reset you can safely ignore this email. Rest assured your account is safe.</p>
<p>Please also be noted that the above link is valid for 24 hours.</p>
<p>Best,</p>
<div class="row">
<div class="container">
<h2>Change your password</h2>
<%=form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<div class="form-inputs form-group">
<%= f.hidden_field :reset_password_token %>
</div>
<div class="form-inputs form-group">
<%= f.label :email, "Email" %><br />
<%= f.email_field :email, required: true, class: "form-control", disabled: true %>
</div>
<div class="form-inputs form-group">
<%= f.label :password, "New password" %><br />
<%= f.password_field :password,
class: 'form-control',
required: true,
autofocus: true,
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
</div>
<div class="form-inputs form-group">
<%= f.label :password, "Confirm password" %><br />
<%= f.password_field :password_confirmation, required: true, class: "form-control" %>
</div>
<div class="form-actions">
<%= submit_tag "Submit", class: "btn btn-danger form-control" %>
</div>
<% end %>
</div>
</div>
<div class="row">
<div class="container">
<h2>Forgot your password?</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<div class="form-inputs form-group">
<%= f.text_field :email, required: true, autofocus: true, class: "form-control" %>
</div>
<div class="form-actions form-group">
<%= submit_tag "Confirm", class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
...@@ -12,11 +12,14 @@ ...@@ -12,11 +12,14 @@
</div> </div>
<% if devise_mapping.rememberable? -%> <% if devise_mapping.rememberable? -%>
<div class="field form-group">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>
<div class="field form-group"> <div class="field form-group">
<%= f.check_box :remember_me %> <%= link_to "Forgot password?", forgot_password_path %>
<%= f.label :remember_me %>
</div> </div>
<% end -%>
<div class="actions form-group"> <div class="actions form-group">
<%= f.submit "Log in", class: "btn btn-default" %> <%= f.submit "Log in", class: "btn btn-default" %>
......
...@@ -47,7 +47,7 @@ Rails.application.configure do ...@@ -47,7 +47,7 @@ Rails.application.configure do
# Raises error for missing translations # Raises error for missing translations
# config.action_view.raise_on_missing_translations = true # config.action_view.raise_on_missing_translations = true
config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost:3000' }
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { address: 'localhost', config.action_mailer.smtp_settings = { address: 'localhost',
port: 1025 } port: 1025 }
......
...@@ -12,7 +12,7 @@ Devise.setup do |config| ...@@ -12,7 +12,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer, # Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class # note that it will be overwritten if you use your own mailer class
# with default "from" parameter. # with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com' config.mailer_sender = 'notify@venjob.com'
# Configure the class responsible to send e-mails. # Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer' # config.mailer = 'Devise::Mailer'
...@@ -114,7 +114,7 @@ Devise.setup do |config| ...@@ -114,7 +114,7 @@ Devise.setup do |config|
# config.send_email_changed_notification = false # config.send_email_changed_notification = false
# Send a notification email when the user's password is changed. # Send a notification email when the user's password is changed.
# config.send_password_change_notification = false config.send_password_change_notification = true
# ==> Configuration for :confirmable # ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without # A period that the user is allowed to access the website even without
......
...@@ -20,13 +20,13 @@ en: ...@@ -20,13 +20,13 @@ en:
confirmation_instructions: confirmation_instructions:
subject: "Confirmation instructions" subject: "Confirmation instructions"
reset_password_instructions: reset_password_instructions:
subject: "Reset password instructions" subject: "VeNJOB Password Assistance"
unlock_instructions: unlock_instructions:
subject: "Unlock instructions" subject: "Unlock instructions"
email_changed: email_changed:
subject: "Email Changed" subject: "Email Changed"
password_change: password_change:
subject: "Password Changed" subject: "VeNJOB Password Assistance: Your password has been reset"
omniauth_callbacks: omniauth_callbacks:
failure: "Could not authenticate you from %{kind} because \"%{reason}\"." failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
success: "Successfully authenticated from %{kind} account." success: "Successfully authenticated from %{kind} account."
......
...@@ -6,10 +6,12 @@ Rails.application.routes.draw do ...@@ -6,10 +6,12 @@ Rails.application.routes.draw do
root 'applies#index' root 'applies#index'
end end
root 'jobs#index' root 'jobs#index'
devise_for :users, :controllers => {:registrations => "registrations"} devise_for :users, controllers: { registrations: 'registrations', passwords: 'passwords' }
as :user do as :user do
get 'register/:step', to: 'registrations#new', as: :register get 'register/:step', to: 'registrations#new', as: :register
patch 'complete_registering' => 'registrations#complete_registering_user' patch 'complete_registering' => 'registrations#complete_registering_user'
get 'forgot_password' => 'passwords#new'
get 'reset_password' => 'password#edit'
end end
resources :cities, only: [:index, :show] resources :cities, only: [:index, :show]
resources :industries, only: [:index, :show] resources :industries, only: [:index, :show]
...@@ -21,12 +23,20 @@ Rails.application.routes.draw do ...@@ -21,12 +23,20 @@ Rails.application.routes.draw do
end end
resources :jobs do resources :jobs do
collection do collection do
get 'city/:city_id' => "jobs#city", as: :city get 'city/:city_id' => 'jobs#city', as: :city
get 'industry/:industry_id' => "jobs#industry", as: :industry get 'industry/:industry_id' => 'jobs#industry', as: :industry
get 'company/:company_id' => "jobs#company", as: :company get 'company/:company_id' => 'jobs#company', as: :company
end end
end end
resources :applies do resources :my_pages, path: '', only: [:index] do
collection do
get 'my' => 'my_pages#index'
get 'my/jobs' => 'my_pages#my_job', as: :jobs
get 'history' => 'my_pages#history', as: :history
get 'download' => 'my_pages#download_cv'
end
end
resources :applies, path: '', only: [] do
collection do collection do
get :apply get :apply
post :confirm post :confirm
......
...@@ -3,6 +3,7 @@ defaults: &defaults ...@@ -3,6 +3,7 @@ defaults: &defaults
job_per_page: 5 job_per_page: 5
industry_per_page: 9 industry_per_page: 9
city_per_page: 9 city_per_page: 9
job_per_history_page: 20
development: development:
<<: *defaults <<: *defaults
......
class CreateViewJobs < ActiveRecord::Migration[5.1]
def change
create_table :view_jobs do |t|
t.references :user, index: true
t.references :job, index: true
t.timestamps
end
end
end
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDl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AGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment