Commit faeb5274 by Ngô Trung Hưng

created ribbon

parent 3e5731d2
Pipeline #702 failed with stages
in 0 seconds
......@@ -1138,7 +1138,7 @@ $main-color: #23303D;
.box_detail_jobs {
width: 100%;
height: auto;
margin: 30px 0px 20px;
margin: 20px 0px 20px;
padding: 20px;
box-shadow: 0px 0px 5px 2px rgba($color: #000000, $alpha: 0.2);
}
......@@ -1150,6 +1150,7 @@ $main-color: #23303D;
width: 1px;
height: 20px;
top: 0;
right: -2px;
}
&:last-child {
&::after {
......
......@@ -48,18 +48,18 @@
bottom: 0;
left: 0;
right: 0;
transition: linear 0.3s;
transition: linear 0.2s;
background-color: rgba($color: #000000, $alpha: 0.5);
}
.overlay_login.show {
opacity: 1;
visibility: visible;
transition: linear 0.4s;
transition: linear 0.2s;
}
.modal_login {
position: absolute;
padding: 5px 0px;
overflow: hidden;
top: 50%;
left: 50%;
height: 300px;
......@@ -74,8 +74,10 @@
.icon_close_modal_login {
cursor: pointer;
float: right;
transform: translateX(-10px);
font-size: 22px;
color: rgb(60, 71, 121);
font-weight: 100;
color: rgba($color: #999, $alpha: 0.9);
span {
}
}
......@@ -89,7 +91,14 @@
}
}
.modal_login_header {
background-color: #e62958;
background-color: #eee;
height: 50px;
line-height: 50px;
text-align: center;
font-size: 18px;
color: #333;
font-weight: 600;
font-family: 'Raleway', sans-serif;
}
@media only screen and (max-width: 768px) {
.block_link_favorite.lg {
......@@ -115,6 +124,13 @@
width: 95vw;
font-size: 14px;
}
.modal_login_header {
font-size: 15px;
}
.icon_close_modal_login {
font-size: 15px;
}
}
@media only screen and (max-width: 576px) {
.pagination li a {
......
// Place all the styles related to the job controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.box_job_apply {
font-family: 'Raleway', sans-serif;
padding: 20px;
border-radius: 4px;
width: 100%;
height: auto;
background-color: #fff;
box-shadow: 0px 0px 5px 1px rgba($color: #999, $alpha: 0.5);
}
.span_first {
color: rgb(221, 82, 82);
font-weight: 600;
}
.ribbon_item {
position: relative;
text-align: center;
height: 40px;
line-height: 40px;
font-size: 18px;
color: #666;
z-index: 100;
}
.ribbon_item.active {
background-color: #3d82be;
color: #fff;
&::before {
content: '';
z-index: 101;
position: absolute;
right: 0;
box-sizing: border-box;
width: 40px;
height: 40px;
border-top: 20px solid white;
border-bottom: 20px solid white;
border-left: 25px solid #3d82be;
}
&::after {
content: '';
z-index: 101;
position: absolute;
left: 0;
box-sizing: border-box;
width: 40px;
height: 40px;
border-top: 20px solid #3d82be;
border-bottom: 20px solid #3d82be;
border-left: 25px solid #fff;
}
}
.custom_badges {
font-size: 20px !important;
background-color: #000;
color: #fff;
font-weight: 600;
padding: 0px 8px 2px;
border-radius: 20%;
}
.custom_badges.active {
background-color: white;
color: #666;
padding: 0px 8px !important;
}
\ No newline at end of file
......@@ -42,4 +42,17 @@ class JobController < ApplicationController
@fill_data = company.jobs.page(params[:page])
render 'result_data'
end
def new
url = request.url
job_id = url.scan(/[0-9]{1,8}$/).last.to_i
session[:job_id] = job_id
if Job.where(id: job_id).blank?
render 'errors/file_not_found'
else
@data_job = Job.find(job_id)
render 'apply_job'
end
end
end
<div class="overlay_login">
<div class="modal_login">
<div class="modal_login_header">
<span>Vui lòng đăng nhập để thực hiện chức năng này</span>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<span>VUI LÒNG ĐĂNG NHẬP ĐỂ THỰC HIỆN CHỨC NĂNG NÀY</span>
<span class="icon_close_modal_login">
<i class="far fa-times-circle"></i>
<i class="fas fa-times"></i>
</span>
</div>
<div class="container">
<div class="row">
<div class="col-lg 12">
<div class="modal_login_notice_text">
<span>Vui lòng đăng nhập để thực hiện chức năng này</span>
<span>ĐĂNG NHẬP</span>
</div>
</div>
</div>
......
<!-- <%=session[:job_id]%> -->
<div class="container">
<div class="box_job_apply">
<div class="ribbon">
<div class="ribbon_name_job">
<h5><span class="span_first">Ứng tuyển vị trí:</span> <%= @data_job.name %></h5>
<h6><%= @data_job.company.name %></h6>
</div>
<hr>
<div class="row">
<div class="col-lg-4 col-md-4">
<div class="ribbon_item active">
<span class="custom_badges active">1</span> Nhập thông tin
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="ribbon_item">
<span class="custom_badges">2</span> Xác nhận thông tin
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="ribbon_item">
<span class="custom_badges">3</span> Hoàn thành
</div>
</div>
</div>
<hr>
</div>
</div>
</div>
\ No newline at end of file
......@@ -24,7 +24,7 @@
</div>
<div class="col-lg-3 ">
<div class="btn_apply_job">
<%= link_to 'Nộp CV ngay', '#', class: "btn btn-apply_job" %>
<%= link_to 'Nộp CV ngay', "/apply?job_id=#{@job.id}", class: "btn btn-apply_job" %>
</div>
</div>
......@@ -34,7 +34,7 @@
<span><i class="fas fa-map-marker-alt"></i> Địa điểm làm việc: </span>
<% dt = [] %>
<% @job.cities.each do |x| %>
<%= link_to "&nbsp;#{x.name}&nbsp; ".html_safe , '#', class: "link_ct apply_job link_optimize"%>
<%= link_to "&nbsp;#{x.name}&nbsp;".html_safe , "/jobs/city/#{x.name}", class: "link_ct apply_job link_optimize"%>
<% end %>
</div>
<div class="box_detail_jobs_salary">
......
......@@ -14,7 +14,7 @@ default: &default
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password: '12345678'
password: '1'
socket: /var/run/mysqld/mysqld.sock
......
......@@ -2,9 +2,11 @@ Rails.application.routes.draw do
root 'home#index'
match "/404", to: "errors#file_not_found", via: :all
match "/422", to: "errors#unprocessable", via: :all
match "/500", to: "errors#internal_server_error", via: :all
match '/404', to: "errors#file_not_found", via: :all
match '/422', to: "errors#unprocessable", via: :all
match '/500', to: "errors#internal_server_error", via: :all
match 'apply', to: 'job#new', via: :get, constraints: { job_id: /.*/}
match 'detail/:id', to: 'job#detail', via: 'get'
match 'jobs/city/(:key_city)', to: 'job#find_data_by_city', via: 'get', constraints: { key_city: /.*/}
......
......@@ -8,3 +8,7 @@ every :day, at: "19:00pm"do
rake "csv:import_csv"
end
every :day, at: "16:30pm" do
rake "crawler:deletelog"
end
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -150,3 +150,12 @@ SocketError: getaddrinfo: Temporary failure in name resolution
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
rake aborted!
SyntaxError: /home/hungnt/hungnt_venjob/config/routes.rb:9: syntax error, unexpected tIDENTIFIER, expecting end
...tch 'apply?job_id=(:job_id)' to: 'job#new_apply', via: 'get'
... ^~
/home/hungnt/hungnt_venjob/config/environment.rb:5:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `load'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate => environment
(See full trace by running task with --trace)
......@@ -11,4 +11,8 @@ namespace :crawler do
f.puts "#{Time.now} - INFO: Crawler data don't have error!"
end
end
task deletelog: :environment do
File.open('cron.log','w') { |file| File.truncate(file,0) }
end
end
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