Commit 6f1dba8a by Tô Ngọc Ánh

Add fontawesome, edit route job, show page

parent cbf02c31
Pipeline #834 canceled with stages
in 0 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -30,4 +30,26 @@
width: 100px;
border-top: 2px solid $main-color
}
\ No newline at end of file
.vertical-divider {
position: relative;
padding: 0px 4px;
&::after {
content: '';
width: 1px;
height: 18px;
margin-left: 3px;
position: absolute;
border-right: 1px solid black;
top: 50%;
right: -3px;
transform: translateY(-50%);
}
&:last-child {
&::after {
display: none;
}
}
}
class JobsController < ApplicationController
def show
@job = Job.find(params[:id])
@job = Job.find_by(id: params[:id])
end
end
......@@ -8,15 +8,21 @@
</nav>
<div class="row">
<div class="col-10">
<h2 class="font-weight-bold"><%= @job.title %></h2>
<h3><%= @job.company.name %></h3>
<h5><strong>Work places: </strong>
<i><%= @job.locations.map(&:city).join(' | ') %></i>
<h2 class="font-weight-bold text-danger"><%= @job.title %></h2>
<h4 class="text-warning"><i class="fas fa-building"></i>
<%= link_to @job.company.name, '#', class: 'text-decoration-none text-warning' %>
</h4>
<h5><i class="fas fa-map-marker-alt"> </i>
<% @job.locations.each do |location| %>
<%= link_to location.city, '#', class: 'vertical-divider text-dark' %>
<% end %>
</h5>
<h5><strong>Industries: </strong>
<i><%= @job.industries.map(&:name).join(' | ') %></i>
<h5><i class="fas fa-briefcase"> </i>
<% @job.industries.each do |industry| %>
<%= link_to industry.name, '#', class: 'vertical-divider text-dark' %>
<% end %>
</h5>
<h5><strong>Salary: </strong><%= @job.salary %></h5>
<h5><i class="fas fa-wallet"></i> <%= @job.salary %></h5>
<hr>
<h3><strong>Description:</strong></h3>
<%= @job.description.html_safe %>
......
......@@ -2,6 +2,6 @@ Rails.application.routes.draw do
root to: 'home#index'
get 'cities', to: 'locations#index'
get 'industries', to: 'industries#index'
resources :jobs, only: :show
get 'detail/:id', to: 'jobs#show', as: :job
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
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