page ID20

parent 8e8ffb2c
Pipeline #1382 failed with stages
in 0 seconds
@import "bootstrap"; @import "bootstrap";
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');
/* header */
#logo { #logo {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
...@@ -24,6 +23,7 @@ ...@@ -24,6 +23,7 @@
.container p { .container p {
font-weight: 400; font-weight: 400;
font-size: medium; font-size: medium;
text-align: justify;
} }
a { a {
color: rgb(14, 14, 14); color: rgb(14, 14, 14);
...@@ -58,3 +58,8 @@ ...@@ -58,3 +58,8 @@
} }
} }
.apply-job btn{
align-items: center;
justify-content: center;
}
class JobsController < ApplicationController class JobsController < ApplicationController
def show def index
if params[:city_slug].present? if params[:city_slug].present?
city = City.find_by(slug: params[:city_slug]) city = City.find_by(slug: params[:city_slug])
jobs = city.jobs jobs = city.jobs
...@@ -12,4 +12,8 @@ class JobsController < ApplicationController ...@@ -12,4 +12,8 @@ class JobsController < ApplicationController
@total = jobs.count @total = jobs.count
@jobs = jobs.latest_jobs.page(params[:page]) @jobs = jobs.latest_jobs.page(params[:page])
end end
def show
@job = Job.latest_jobs.find_by(id: params[:job_id])
end
end end
\ No newline at end of file
class TopController < ApplicationController class TopController < ApplicationController
def home def index
@jobs = Job.latest_jobs.limit(Job::LATEST_JOB_NUMBER) @jobs = Job.latest_jobs.limit(Job::LATEST_JOB_NUMBER)
@cities = City.top_cities @cities = City.top_cities
@industries = Industry.top_industries @industries = Industry.top_industries
......
nav.breadcrumb[style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb"]
ol.breadcrumb.py-3
li.breadcrumb-item
= link_to "Top", root_path
li.breadcrumb-item
- @job.cities.each do |city|
= link_to city.name, city_slug_path(city.slug)
li.breadcrumb-item
- @job.industries.each do |industry|
= link_to industry.name, industry_slug_path(industry.slug)
li.breadcrumb-item.active = link_to @job.title
\ No newline at end of file
- provide :title, 'Job List'
= render 'search'
.container
h5.fw-normal
| Total:
= pluralize(@total, 'job')
h5.fw-normal
| Result for:
= @result
h6.offset-md-4
= paginate @jobs, window: 1
.job-list
- @jobs.each do |job|
.row.bg-white
.col-10.p-3.border.card-body.text-dark
h5.mb-1
= link_to job.title, detail_path(job.id)
p.mb-1
= link_to job.company.name, "#"
p.mb-1
i.fas.fa-dollar-sign.m-1
| Lương:
= job.salary
p.mb-1
i.fas.fa-map-marker-alt.m-1
= link_to job.cities.map(&:name).uniq.join(' | '), "#"
p.mb-1
= truncate(job.overview, length: 250)
.col-sm-2.p-3.border.favourite
= link_to "Farourite", "#", class: "btn btn-outline-primary"
h6.offset-md-4.px-5
= page_entries_info @jobs
h6.offset-md-4
= paginate @jobs, window: 1
\ No newline at end of file
- provide :title, 'Job List' - provide :title, 'Job Detail'
= render 'search' = render 'breadcrumb'
.container .row.bg-white
h5.fw-normal .col-10.p-3.detail-job.text-dark
| Total: h1.mb-2
= pluralize(@total, 'job') = @job.title
h5.fw-normal h3.mb-2
| Result for: = link_to @job.company.name, "#"
= @result .row
h6.offset-md-4 .col
= paginate @jobs, window: 1 p.mb-2
.job-list | Lương:
- @jobs.each do |job| = @job.salary
.row.bg-white p.mb-2
.col-10.p-3.border.card-body.text-dark | Location:
h5.mb-1 - @job.cities.each do |city|
= link_to job.title, "#" = link_to city.name, city_slug_path(city.slug)
p.mb-1 p.mb-2
= link_to job.company.name, "#" | Job type:
p.mb-1 = @job.job_type
i.fas.fa-dollar-sign.m-1 .col
| Lương: p.mb-2
= job.salary | Level:
p.mb-1 = @job.level
i.fas.fa-map-marker-alt.m-1 p.mb-2
= link_to job.cities.map(&:name).uniq.join(' | '), "#" | Experience:
p.mb-1 = @job.experience
= truncate(job.overview, length: 250) p.mb-2
.col-sm-2.p-3.border.favourite | Expired at:
= link_to "Farourite", "#", class: "btn btn-outline-primary" = @job.expired_at.strftime("%d/%m/%Y")
h6.offset-md-4.px-5 h5.my-3
= page_entries_info @jobs | Benefits
h6.offset-md-4 p.mb-2
= paginate @jobs, window: 1 = @job.benefits
\ No newline at end of file h5.my-3
| Overview
p.mb-2
- @job.overview
h5.my-3
| Requirement
p.mb-2
= @job.requirement
h5.my-3
| Other requirement
p.mb-2
= @job.other_requirement
.col-sm-2.p-3.apply-job
= link_to "Apply this Job", "#", class: "btn btn-outline-primary btn-lg"
.row.bg-white.p-4
.col.text-end
= link_to "Apply this Job", "#", class: "btn btn-outline-primary btn-lg"
.col
= link_to "Favourite", "#", class: "btn btn-outline-primary btn-lg"
\ No newline at end of file
...@@ -11,7 +11,7 @@ h3.p-2 ...@@ -11,7 +11,7 @@ h3.p-2
.card.my-3 .card.my-3
.card-body.text-dark .card-body.text-dark
h5.mb-1 h5.mb-1
= link_to job.title, "#" = link_to job.title, detail_path(job.id)
p.mb-1 p.mb-1
= link_to job.company.name, "#" = link_to job.company.name, "#"
p.mb-1 p.mb-1
......
Rails.application.routes.draw do Rails.application.routes.draw do
root 'top#home' root 'top#index'
get 'cities', to: 'cities#show' get 'cities', to: 'cities#show'
get 'industries', to: 'industries#show' get 'industries', to: 'industries#show'
get 'jobs/city/:city_slug', to: 'jobs#show', as: 'city_slug' get 'jobs/city/:city_slug', to: 'jobs#index', as: 'city_slug'
get 'jobs/industry/:industry_slug', to: 'jobs#show', as: 'industry_slug' get 'jobs/industry/:industry_slug', to: 'jobs#index', as: 'industry_slug'
get 'detail/:job_id', to: 'jobs#show', as: 'detail'
end end
\ No newline at end of file
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