Fix end of line and text indent

parent 3352db9d
Pipeline #785 failed with stages
in 0 seconds
$(document).ready(function(){
$("div.viet-nam").click(function(){
$(window).scrollTop($('.vietnam-area').offset().top);
});
$("div.international").click(function(){
$(window).scrollTop($('.international-area').offset().top);
});
});
.city-banner{
background: linear-gradient(to top, #33ccff 0%, #006600 100%);
font-size: 38px;
text-align: center;
color: white;
font-style: italic;
font-family: Bookman, URW Bookman L, serif;
}
.city-name {
margin: 10px;
padding: 10px;
text-align: center;
}
.remove-decoration {
&:hover{
a {
text-decoration: none;
}
}
}
.viet-nam, .international {
cursor: pointer;
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.float-right { .float-right {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 5%; right: 5%;
} }
.top-page{ .top-page{
text-align: center; text-align: center;
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
.row-table{ .row-table{
color: black; color: black;
padding: 15px; padding: 15px;
margin: 15px; margin: 15px;
text-align: center; text-align: center;
} }
.city-banner{ .city-banner{
......
class CitiesController < ApplicationController
def index
@cities_vietnam = City.all_city.where('location = 1')
@cities_international = City.all_city.where('location = 0')
end
end
class IndustriesController < ApplicationController
end
class City < ApplicationRecord class City < ApplicationRecord
has_many :city_jobs has_many :city_jobs
has_many :jobs, through: :city_jobs has_many :jobs, through: :city_jobs
def self.top_city def self.top_city
joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9) joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9)
end end
def self.all_city
joins(:jobs).group(:city_id).order('count(job_id) DESC')
end
end end
<% @cities_international.each do |city| %>
<div class="col-3 remove-decoration">
<%= link_to '#' do %>
<div class="border border-dark rounded city-name">
<div>
<strong><%= city.name %></strong>
</div>
<div>
<%= city.jobs.count %>
</div>
</div>
<% end %>
</div>
<% end %>
<% @cities_vietnam.each do |city| %>
<div class="col-3 remove-decoration">
<%= link_to '#' do %>
<div class="border border-dark rounded city-name">
<div>
<strong><%= city.name %></strong>
</div>
<div>
<%= city.jobs.count %>
</div>
</div>
<% end %>
</div>
<% end %>
<% provide(:title, 'All Cities') %>
<div class="container">
<div class="all-cities">
<div class="city-banner rounded">City list</div>
<div class="row">
<div class="col-6">
<div class="row-table border border-dark rounded viet-nam">Việt Nam</div>
</div>
<div class="col-6">
<div class="row-table border border-dark rounded international">International</div>
</div>
</div>
</div>
<div class="city-banner rounded vietnam-area">Việt Nam</div>
<div class="city-vietnam">
<div class="row">
<%= render 'cities/cities_vietnam' %>
</div>
</div>
<div class="city-banner rounded international-area">International</div>
<div class="city-international">
<div class="row">
<%= render 'cities/cities_international' %>
</div>
</div>
</div>
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
Copyright © ZIGExN VeNtura 2020 Copyright © ZIGExN VeNtura 2020
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
</nav> </nav>
</div> </div>
</div> </div>
</header> </header>
\ No newline at end of file
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
<button class="btn btn-primary" type="submit">Search</button> <button class="btn btn-primary" type="submit">Search</button>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<%= link_to '#' do %> <%= link_to '#' do %>
<div class="city-name"><strong><%= city.name %></strong></div> <div class="city-name"><strong><%= city.name %></strong></div>
<div class="count-job"><%= city.jobs.count %></div> <div class="count-job"><%= city.jobs.count %></div>
<% end %> <% end %>
</div> </div>
</div> </div>
<% end %> <% end %>
\ No newline at end of file
<% @jobs.each do |job| %> <% @jobs.each do |job| %>
<% if job.cities.present? %> <% if job.cities.present? %>
<div class="border border-dark rounded"> <div class="border border-dark rounded">
<div class="job-details"> <div class="job-details">
<div class="title"><strong><%= job.title %></strong></div> <div class="title"><strong><%= job.title %></strong></div>
<div><%= job.company_name %></div> <div><%= job.company_name %></div>
<div class="salary">Salary: <%= job.salary %></div> <div class="salary">Salary: <%= job.salary %></div>
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
</div> </div>
<br> <br>
<% end %> <% end %>
<% end %> <% end %>
\ No newline at end of file
<% provide(:title, 'Venjob') %> <% provide(:title, 'Venjob') %>
<div class="banner-ground"> <div class="banner-ground">
<div class="top-banner"> <div class="top-banner">
<div class="total-job">Having <%= @total_jobs %> jobs for you!</div> <div class="total-job">Having <%= @total_jobs %> jobs for you!</div>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<div class="search-bar"><%= render 'layouts/search_bar' %></div> <div class="search-bar"><%= render 'layouts/search_bar' %></div>
<div class="job-list"><%= render 'layouts/show_jobs' %></div> <div class="job-list"><%= render 'layouts/show_jobs' %></div>
<div class="city-banner rounded">City</div> <div class="city-banner rounded">City</div>
<div class="row"><%= render 'layouts/show_cities' %></div> <div class="row"><%= render 'layouts/show_cities' %></div>
<div class="all-city"> <div class="all-city">
<%= link_to '#' do %> <%= link_to '#' do %>
......
...@@ -2,5 +2,7 @@ Rails.application.routes.draw do ...@@ -2,5 +2,7 @@ Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
resources :jobs resources :jobs
resources :top_pages resources :top_pages
resources :industries
resources :cities
root to: "top_pages#index" root to: "top_pages#index"
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