Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
Venjob_HungNT
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ngô Trung Hưng
Venjob_HungNT
Commits
faeb5274
Commit
faeb5274
authored
Jul 27, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created ribbon
parent
3e5731d2
Pipeline
#702
failed with stages
in 0 seconds
Changes
13
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
164 additions
and
19 deletions
+164
-19
app/assets/stylesheets/custom.scss
+2
-1
app/assets/stylesheets/custom_btn.scss
+21
-5
app/assets/stylesheets/job.scss
+66
-0
app/controllers/job_controller.rb
+13
-0
app/views/job/_modal_login.html.erb
+5
-7
app/views/job/apply_job.html.erb
+32
-0
app/views/job/detail.html.erb
+2
-2
config/database.yml
+1
-1
config/routes.rb
+5
-3
config/schedule.rb
+4
-0
cron.log
+0
-0
error.log
+9
-0
lib/tasks/crawler.rake
+4
-0
No files found.
app/assets/stylesheets/custom.scss
View file @
faeb5274
...
@@ -1138,7 +1138,7 @@ $main-color: #23303D;
...
@@ -1138,7 +1138,7 @@ $main-color: #23303D;
.box_detail_jobs
{
.box_detail_jobs
{
width
:
100%
;
width
:
100%
;
height
:
auto
;
height
:
auto
;
margin
:
3
0px
0px
20px
;
margin
:
2
0px
0px
20px
;
padding
:
20px
;
padding
:
20px
;
box-shadow
:
0px
0px
5px
2px
rgba
(
$color
:
#000000
,
$alpha
:
0
.2
);
box-shadow
:
0px
0px
5px
2px
rgba
(
$color
:
#000000
,
$alpha
:
0
.2
);
}
}
...
@@ -1150,6 +1150,7 @@ $main-color: #23303D;
...
@@ -1150,6 +1150,7 @@ $main-color: #23303D;
width
:
1px
;
width
:
1px
;
height
:
20px
;
height
:
20px
;
top
:
0
;
top
:
0
;
right
:
-2px
;
}
}
&
:last-child
{
&
:last-child
{
&
:
:
after
{
&
:
:
after
{
...
...
app/assets/stylesheets/custom_btn.scss
View file @
faeb5274
...
@@ -48,18 +48,18 @@
...
@@ -48,18 +48,18 @@
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
transition
:
linear
0
.
3
s
;
transition
:
linear
0
.
2
s
;
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.5
);
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.5
);
}
}
.overlay_login.show
{
.overlay_login.show
{
opacity
:
1
;
opacity
:
1
;
visibility
:
visible
;
visibility
:
visible
;
transition
:
linear
0
.
4
s
;
transition
:
linear
0
.
2
s
;
}
}
.modal_login
{
.modal_login
{
position
:
absolute
;
position
:
absolute
;
padding
:
5px
0px
;
overflow
:
hidden
;
top
:
50%
;
top
:
50%
;
left
:
50%
;
left
:
50%
;
height
:
300px
;
height
:
300px
;
...
@@ -74,8 +74,10 @@
...
@@ -74,8 +74,10 @@
.icon_close_modal_login
{
.icon_close_modal_login
{
cursor
:
pointer
;
cursor
:
pointer
;
float
:
right
;
float
:
right
;
transform
:
translateX
(
-10px
);
font-size
:
22px
;
font-size
:
22px
;
color
:
rgb
(
60
,
71
,
121
);
font-weight
:
100
;
color
:
rgba
(
$color
:
#999
,
$alpha
:
0
.9
);
span
{
span
{
}
}
}
}
...
@@ -89,7 +91,14 @@
...
@@ -89,7 +91,14 @@
}
}
}
}
.modal_login_header
{
.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
)
{
@media
only
screen
and
(
max-width
:
768px
)
{
.block_link_favorite.lg
{
.block_link_favorite.lg
{
...
@@ -115,6 +124,13 @@
...
@@ -115,6 +124,13 @@
width
:
95vw
;
width
:
95vw
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.modal_login_header
{
font-size
:
15px
;
}
.icon_close_modal_login
{
font-size
:
15px
;
}
}
}
@media
only
screen
and
(
max-width
:
576px
)
{
@media
only
screen
and
(
max-width
:
576px
)
{
.pagination
li
a
{
.pagination
li
a
{
...
...
app/assets/stylesheets/job.scss
View file @
faeb5274
// Place all the styles related to the job controller here.
// Place all the styles related to the job controller here.
// They will automatically be included in application.css.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// 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
app/controllers/job_controller.rb
View file @
faeb5274
...
@@ -42,4 +42,17 @@ class JobController < ApplicationController
...
@@ -42,4 +42,17 @@ class JobController < ApplicationController
@fill_data
=
company
.
jobs
.
page
(
params
[
:page
])
@fill_data
=
company
.
jobs
.
page
(
params
[
:page
])
render
'result_data'
render
'result_data'
end
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
end
app/views/job/_modal_login.html.erb
View file @
faeb5274
<div
class=
"overlay_login"
>
<div
class=
"overlay_login"
>
<div
class=
"modal_login"
>
<div
class=
"modal_login"
>
<div
class=
"modal_login_header"
>
<div
class=
"modal_login_header"
>
<span>
Vui lòng đăng nhập để thực hiện chức năng này
</span>
<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
class=
"icon_close_modal_login"
>
<span
class=
"icon_close_modal_login"
>
<i
class=
"far fa-times-circle
"
></i>
<i
class=
"fas fa-times
"
></i>
</span>
</span>
</div>
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg 12"
>
<div
class=
"col-lg 12"
>
<div
class=
"modal_login_notice_text"
>
<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>
</div>
</div>
</div>
...
...
app/views/job/apply_job.html.erb
0 → 100644
View file @
faeb5274
<!--
<%=
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
app/views/job/detail.html.erb
View file @
faeb5274
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</div>
</div>
<div
class=
"col-lg-3 "
>
<div
class=
"col-lg-3 "
>
<div
class=
"btn_apply_job"
>
<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>
</div>
</div>
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<span><i
class=
"fas fa-map-marker-alt"
></i>
Địa điểm làm việc:
</span>
<span><i
class=
"fas fa-map-marker-alt"
></i>
Địa điểm làm việc:
</span>
<%
dt
=
[]
%>
<%
dt
=
[]
%>
<%
@job
.
cities
.
each
do
|
x
|
%>
<%
@job
.
cities
.
each
do
|
x
|
%>
<%=
link_to
"
#{
x
.
name
}
"
.
html_safe
,
'#'
,
class:
"link_ct apply_job link_optimize"
%>
<%=
link_to
"
#{
x
.
name
}
"
.
html_safe
,
"/jobs/city/
#{
x
.
name
}
"
,
class:
"link_ct apply_job link_optimize"
%>
<%
end
%>
<%
end
%>
</div>
</div>
<div
class=
"box_detail_jobs_salary"
>
<div
class=
"box_detail_jobs_salary"
>
...
...
config/database.yml
View file @
faeb5274
...
@@ -14,7 +14,7 @@ default: &default
...
@@ -14,7 +14,7 @@ default: &default
encoding
:
utf8
encoding
:
utf8
pool
:
<%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
pool
:
<%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username
:
root
username
:
root
password
:
'
1
2345678
'
password
:
'
1'
socket
:
/var/run/mysqld/mysqld.sock
socket
:
/var/run/mysqld/mysqld.sock
...
...
config/routes.rb
View file @
faeb5274
...
@@ -2,9 +2,11 @@ Rails.application.routes.draw do
...
@@ -2,9 +2,11 @@ Rails.application.routes.draw do
root
'home#index'
root
'home#index'
match
"/404"
,
to:
"errors#file_not_found"
,
via: :all
match
'/404'
,
to:
"errors#file_not_found"
,
via: :all
match
"/422"
,
to:
"errors#unprocessable"
,
via: :all
match
'/422'
,
to:
"errors#unprocessable"
,
via: :all
match
"/500"
,
to:
"errors#internal_server_error"
,
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
'detail/:id'
,
to:
'job#detail'
,
via:
'get'
match
'jobs/city/(:key_city)'
,
to:
'job#find_data_by_city'
,
via:
'get'
,
constraints:
{
key_city:
/.*/
}
match
'jobs/city/(:key_city)'
,
to:
'job#find_data_by_city'
,
via:
'get'
,
constraints:
{
key_city:
/.*/
}
...
...
config/schedule.rb
View file @
faeb5274
...
@@ -8,3 +8,7 @@ every :day, at: "19:00pm"do
...
@@ -8,3 +8,7 @@ every :day, at: "19:00pm"do
rake
"csv:import_csv"
rake
"csv:import_csv"
end
end
every
:day
,
at:
"16:30pm"
do
rake
"crawler:deletelog"
end
cron.log
View file @
faeb5274
This source diff could not be displayed because it is too large. You can
view the blob
instead.
error.log
View file @
faeb5274
...
@@ -150,3 +150,12 @@ SocketError: getaddrinfo: Temporary failure in name resolution
...
@@ -150,3 +150,12 @@ SocketError: getaddrinfo: Temporary failure in name resolution
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
/home/hungnt/.rbenv/versions/2.6.6/bin/bundle:23:in `<main>'
Tasks: TOP => crawler:populate
Tasks: TOP => crawler:populate
(See full trace by running task with --trace)
(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)
lib/tasks/crawler.rake
View file @
faeb5274
...
@@ -11,4 +11,8 @@ namespace :crawler do
...
@@ -11,4 +11,8 @@ namespace :crawler do
f
.
puts
"
#{
Time
.
now
}
- INFO: Crawler data don't have error!"
f
.
puts
"
#{
Time
.
now
}
- INFO: Crawler data don't have error!"
end
end
end
end
task
deletelog: :environment
do
File
.
open
(
'cron.log'
,
'w'
)
{
|
file
|
File
.
truncate
(
file
,
0
)
}
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment