Commit 030ef8f5 by thanhnd

installed bootstrap

parent 3ddf4fbe
...@@ -3,6 +3,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ...@@ -3,6 +3,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.0' ruby '2.7.0'
gem 'bootstrap', '~> 4.4.1'
gem 'jquery-rails'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.1' gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
# Use sqlite3 as the database for Active Record # Use sqlite3 as the database for Active Record
......
...@@ -58,9 +58,15 @@ GEM ...@@ -58,9 +58,15 @@ GEM
zeitwerk (~> 2.2) zeitwerk (~> 2.2)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.7.4)
execjs
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.4.5) bootsnap (1.4.5)
msgpack (~> 1.0) msgpack (~> 1.0)
bootstrap (4.4.1)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4) builder (3.2.4)
byebug (11.1.1) byebug (11.1.1)
capybara (3.31.0) capybara (3.31.0)
...@@ -75,6 +81,7 @@ GEM ...@@ -75,6 +81,7 @@ GEM
concurrent-ruby (1.1.6) concurrent-ruby (1.1.6)
crass (1.0.6) crass (1.0.6)
erubi (1.9.0) erubi (1.9.0)
execjs (2.7.0)
ffi (1.12.2) ffi (1.12.2)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
...@@ -82,6 +89,10 @@ GEM ...@@ -82,6 +89,10 @@ GEM
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jbuilder (2.10.0) jbuilder (2.10.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.1.5) listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
...@@ -103,6 +114,7 @@ GEM ...@@ -103,6 +114,7 @@ GEM
nio4r (2.5.2) nio4r (2.5.2)
nokogiri (1.10.8) nokogiri (1.10.8)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
popper_js (1.16.0)
public_suffix (4.0.3) public_suffix (4.0.3)
puma (4.3.1) puma (4.3.1)
nio4r (~> 2.0) nio4r (~> 2.0)
...@@ -202,9 +214,11 @@ PLATFORMS ...@@ -202,9 +214,11 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bootsnap (>= 1.4.2) bootsnap (>= 1.4.2)
bootstrap (~> 4.4.1)
byebug byebug
capybara (>= 2.15) capybara (>= 2.15)
jbuilder (~> 2.7) jbuilder (~> 2.7)
jquery-rails
listen (>= 3.0.5, < 3.2) listen (>= 3.0.5, < 3.2)
mysql2 mysql2
puma (~> 4.1) puma (~> 4.1)
......
...@@ -10,6 +10,5 @@ ...@@ -10,6 +10,5 @@
* files in this directory. Styles in this file should be added after the last require_* statement. * files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope. * It is generally better to create a new file per style scope.
* *
*= require_tree .
*= require_self
*/ */
@import "bootstrap";
// Place all the styles related to the toppage controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
class ToppageController < ApplicationController
def index
end
def new
end
end
module ToppageHelper
end
// sass variable overrides
$body-bg: aliceblue;
$body-color: #111;
@import "~bootstrap/scss/bootstrap.scss"
...@@ -7,6 +7,12 @@ require("@rails/ujs").start() ...@@ -7,6 +7,12 @@ require("@rails/ujs").start()
require("turbolinks").start() require("turbolinks").start()
require("@rails/activestorage").start() require("@rails/activestorage").start()
require("channels") require("channels")
import 'jquery'
import 'css/site'
import 'popper.js'
//= require jquery3
//= require popper
//= require bootstrap-sprockets
// Uncomment to copy all static images under ../images to the output folder and reference // Uncomment to copy all static images under ../images to the output folder and reference
......
...@@ -7,9 +7,132 @@ ...@@ -7,9 +7,132 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<!-- <%= stylesheet_pack_tag 'application', media: 'all' %>
<%= javascript_pack_tag 'application' %>
-->
</head> </head>
<body> <body>
<%= yield %> <!-- <%= yield %>-->
<div class="page-header__inner">
<nav class="pageMenu default-navbar">
<div class="container-fluid">
<div class="pageMenu__header">
<button class="pageMenu__toggle" data-target="#pageMenuToggle" data-toggle="collapse" type="button">
<div class="pageMenu__toggleContent">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</div>
</button>
<a class="pageMenu__logo" data-controller="utm-tracking" href="/"><img class="logo-itviec" alt="itviec" src="https://itviec.com/assets/logo-itviec-65afac80e92140efa459545bc1c042ff4275f8f197535f147ed7614c2000ab0f.png" width="108" height="42">
</a><div class="user-menu visible-xs">
<div class="pageMenu__headerItem">
<a class="pageMenu__headerLink" data-toggle="modal" data-target="#sign-in-modal" href="">Sign In</a>
</div>
</div>
</div>
<div class="pageMenu__body collapse" id="pageMenuToggle">
<ul class="pageMenu__itemList pageMenu__itemList--right pageMenu__not_signed_in">
<li class="pageMenu__item">
<a data-controller="utm-tracking" href="/it-jobs">All Jobs</a>
</li>
<li class="pageMenu__item hover-dropdown visible-xs">
<a data-controller="utm-tracking" href="/vietnam-best-it-companies-2020"><i class="fa fa-star"></i> Vietnam Best IT Companies 2020</a>
</li>
<li class="pageMenu__item visible-xs">
<a data-controller="utm-tracking" href="/companies/search-companies">Company Reviews</a>
</li>
<li class="pageMenu__item dropdown hidden-xs" id="companies-dropdown">
<a aria-expanded="false" class="dropdown-toggle" data-toggle="dropdown" href="" role="button">
IT Companies
<span class="caret dropdown-toggle__caret"></span>
</a>
<div class="dropdown-menu">
<div class="hover-dropdown__content--item dropdown-menu__item--desktop">
<a class="dropdown-menu__link--desktop" data-controller="utm-tracking" href="/vietnam-best-it-companies-2020"><i class="fa fa-star"></i> Vietnam Best IT Companies 2020</a>
</div>
<div class="hover-dropdown__content--item dropdown-menu__item--desktop">
<a class="dropdown-menu__link--desktop" data-controller="utm-tracking" href="/companies/search-companies">Company Reviews</a>
</div>
</div>
</li>
<li class="pageMenu__item">
<a target="_blank" href="https://itviec.com/blog/">Blog</a>
</li>
<li class="pageMenu__item hidden-xs">
<a class="pageMenu__link" data-toggle="modal" data-target="#sign-in-modal" rel="nofollow" href="">Sign In</a>
</li>
<li class="pageMenu__item pageMenu__language">
<div class="switch-toggle well">
<input checked="" id="en" name="language" type="radio">
<label class="change-language" for="en">EN</label>
<input id="vn" name="language" type="radio">
<label class="change-language" for="vn">VN</label>
<a class="btn btn-default"></a>
</div>
</li>
<li class="pageMenu__item">
<a href="/post_jobs">Employers</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<h1 class="slogan">
1,800 IT Jobs For Chất Developers
</h1>
<div class="search-form-wrapper clearfix">
<form id="search_form" class="search-form" action="/it-jobs" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓">
<div class="search_section_wrapper no_header">
<div class="search_text_wrapper">
<div class="ion-ios-search"></div>
<div class="search_field_wrapper">
<input type="text" name="query" id="search_text" value="" class="search_text hide" style="display: none;"><ul class="tagit ui-widget ui-widget-content ui-corner-all"><li class="tagit-new"><input type="text" class="ui-widget-content ui-autocomplete-input" placeholder="Keyword skill (Java, iOS...), Job Title, Company..." autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span></li></ul>
</div>
</div>
</div>
<div class="city_section_wrapper">
<div class="city_select_wrapper">
<div class="ion-ios-location-outline"></div>
<div class="city_field_wrapper">
<select name="city" id="city" class="search_city hide chzn-done" data-cities="{&quot;ho-chi-minh-hcm&quot;:&quot;Ho Chi Minh&quot;,&quot;ha-noi&quot;:&quot;Ha Noi&quot;,&quot;da-nang&quot;:&quot;Da Nang&quot;,&quot;others&quot;:&quot;Others&quot;}" data-preload="false" style="display: none;"><option value="">All Cities</option><option value="ho-chi-minh-hcm">Ho Chi Minh</option>
<option value="ha-noi">Ha Noi</option>
<option value="da-nang">Da Nang</option>
<option value="others">Others</option></select><div class="chzn-container chzn-container-single chzn-container-single-nosearch" style="width: 100%;" title="" id="city_chzn"><a href="javascript:void(0)" class="chzn-single" tabindex="-1"><span>Ho Chi Minh</span><div><b></b></div></a><div class="chzn-drop"><div class="chzn-search"><input type="text" autocomplete="off" readonly=""></div><ul class="chzn-results"></ul></div></div>
</div>
</div>
</div>
<div class="search_button_wrapper">
<input type="submit" name="commit" value="Search" class="search_button button-red left" data-disable-with="Search">
</div>
</form>
</div>
<div class="page-header__tag-list hidden-xs">
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/tester/ho-chi-minh-hcm">Tester</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/java/ho-chi-minh-hcm">Java</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/php/ho-chi-minh-hcm">PHP</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/android/ho-chi-minh-hcm">Android</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/.net/ho-chi-minh-hcm">.NET</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/ios/ho-chi-minh-hcm">iOS</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/business-analyst/ho-chi-minh-hcm">Business Analyst</a>
<a class="head no-border ilabel popular-keyword" data-controller="utm-tracking" href="https://itviec.com/it-jobs/qa-qc/ho-chi-minh-hcm">QA QC</a>
<a class="head no-border ilabel" href="/jobs-skill-index">All jobs by skill</a>
</div>
</body> </body>
</html> </html>
<h1>Toppage#index</h1>
<p>Find me in app/views/toppage/index.html.erb</p>
Rails.application.routes.draw do Rails.application.routes.draw do
root 'toppage#index'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
resources :toppage
end end
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
"@rails/activestorage": "^6.0.0", "@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0", "@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.2.2", "@rails/webpacker": "4.2.2",
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"popper.js": "^1.16.1",
"turbolinks": "^5.2.0" "turbolinks": "^5.2.0"
}, },
"version": "0.1.0", "version": "0.1.0",
......
require 'test_helper'
class ToppageControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get toppage_index_url
assert_response :success
end
end
...@@ -1386,6 +1386,11 @@ boolbase@^1.0.0, boolbase@~1.0.0: ...@@ -1386,6 +1386,11 @@ boolbase@^1.0.0, boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
bootstrap@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.4.1.tgz#8582960eea0c5cd2bede84d8b0baf3789c3e8b01"
integrity sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==
brace-expansion@^1.1.7: brace-expansion@^1.1.7:
version "1.1.11" version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
...@@ -3824,6 +3829,11 @@ jest-worker@^24.9.0: ...@@ -3824,6 +3829,11 @@ jest-worker@^24.9.0:
merge-stream "^2.0.0" merge-stream "^2.0.0"
supports-color "^6.1.0" supports-color "^6.1.0"
jquery@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==
js-base64@^2.1.8: js-base64@^2.1.8:
version "2.5.1" version "2.5.1"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
...@@ -5029,6 +5039,11 @@ pnp-webpack-plugin@^1.5.0: ...@@ -5029,6 +5039,11 @@ pnp-webpack-plugin@^1.5.0:
dependencies: dependencies:
ts-pnp "^1.1.2" ts-pnp "^1.1.2"
popper.js@^1.16.1:
version "1.16.1"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==
portfinder@^1.0.25: portfinder@^1.0.25:
version "1.0.25" version "1.0.25"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
......
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