Kouhei Sutou
null+****@clear*****
Mon Feb 20 00:12:22 JST 2017
Kouhei Sutou 2017-02-20 00:12:22 +0900 (Mon, 20 Feb 2017) New Revision: 6d23b7196c32ebdd7a750a4eaf5df0a85a21d603 https://github.com/ranguba/ranguba-server/commit/6d23b7196c32ebdd7a750a4eaf5df0a85a21d603 Message: Use Bootstrap Added files: .dir-locals.el Removed files: app/assets/stylesheets/scaffolds.scss Modified files: Gemfile Gemfile.lock app/assets/javascripts/application.js app/views/layouts/application.html.erb config/routes.rb Renamed files: app/assets/stylesheets/application.scss (from app/assets/stylesheets/application.css) Added: .dir-locals.el (+4 -0) 100644 =================================================================== --- /dev/null +++ .dir-locals.el 2017-02-20 00:12:22 +0900 (b168118) @@ -0,0 +1,4 @@ +((scss-mode . ((indent-tabs-mode . nil) + (css-indent-offset . 2))) + (js-mode . ((indent-tabs-mode . nil) + (js-indent-level . 2)))) Modified: Gemfile (+5 -0) =================================================================== --- Gemfile 2017-02-19 23:40:10 +0900 (90b4cb7) +++ Gemfile 2017-02-20 00:12:22 +0900 (54d93ae) @@ -54,3 +54,8 @@ gem 'groonga-client-model' gem 'chupa-text', path: '../chupa-text' gem 'chupa-text-decomposer-html', path: '../chupa-text-decomposer-html' gem 'chupa-text-decomposer-mail', path: '../chupa-text-decomposer-mail' + +gem 'bootstrap' +source 'https://rails-assets.org' do + gem 'rails-assets-tether' +end Modified: Gemfile.lock (+9 -0) =================================================================== --- Gemfile.lock 2017-02-19 23:40:10 +0900 (1b7f6d3) +++ Gemfile.lock 2017-02-20 00:12:22 +0900 (fd73ded) @@ -19,6 +19,7 @@ PATH GEM remote: https://rubygems.org/ + remote: https://rails-assets.org/ specs: actioncable (5.0.1) actionpack (= 5.0.1) @@ -60,6 +61,11 @@ GEM addressable (2.5.0) public_suffix (~> 2.0, >= 2.0.2) arel (7.1.4) + autoprefixer-rails (6.7.3) + execjs + bootstrap (4.0.0.alpha6) + autoprefixer-rails (>= 6.0.3) + sass (>= 3.4.19) builder (3.2.3) byebug (9.0.6) capybara (2.11.0) @@ -149,6 +155,7 @@ GEM bundler (>= 1.3.0, < 2.0) railties (= 5.0.1) sprockets-rails (>= 2.0.0) + rails-assets-tether (1.3.8) rails-dom-testing (2.0.2) activesupport (>= 4.2.0, < 6.0) nokogiri (~> 1.6) @@ -227,6 +234,7 @@ PLATFORMS ruby DEPENDENCIES + bootstrap byebug chupa-text! chupa-text-decomposer-html! @@ -239,6 +247,7 @@ DEPENDENCIES listen (~> 3.0.5) puma (~> 3.0) rails (~> 5.0.1) + rails-assets-tether! sass-rails (~> 5.0) spring spring-watcher-listen (~> 2.0.0) Modified: app/assets/javascripts/application.js (+2 -0) =================================================================== --- app/assets/javascripts/application.js 2017-02-19 23:40:10 +0900 (105a4f1) +++ app/assets/javascripts/application.js 2017-02-20 00:12:22 +0900 (4420407) @@ -12,4 +12,6 @@ // //= require jquery //= require jquery_ujs +//= require tether +//= require bootstrap-sprockets //= require_tree . Renamed: app/assets/stylesheets/application.scss (+50 -2) 50% =================================================================== --- app/assets/stylesheets/application.css 2017-02-19 23:40:10 +0900 (0ebd7fe) +++ app/assets/stylesheets/application.scss 2017-02-20 00:12:22 +0900 (a63a2bd) @@ -10,6 +10,54 @@ * 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. * - *= require_tree . - *= require_self */ + + �� import "bootstrap"; + +nav.header { + @extend .navbar; + @extend .navbar-toggleable-md; + + a.home { + @extend .navbar-brand; + } +} + +div.content { + @extend .container; +} + +#notice { + color: green; +} + +.field_with_errors { + padding: 2px; + background-color: red; + display: table; +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; + + h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0; + background-color: #c00; + color: #fff; + } + + ul li { + font-size: 12px; + list-style: square; + } +} Deleted: app/assets/stylesheets/scaffolds.scss (+0 -89) 100644 =================================================================== --- app/assets/stylesheets/scaffolds.scss 2017-02-19 23:40:10 +0900 (4ce4266) +++ /dev/null @@ -1,89 +0,0 @@ -body { - background-color: #fff; - color: #333; - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; - margin: 33px; -} - -p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; - margin: 33px; -} - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; -} - -a { - color: #000; - - &:visited { - color: #666; - } - - &:hover { - color: #fff; - background-color: #000; - } -} - -th { - padding-bottom: 5px; -} - -td { - padding-bottom: 7px; - padding-left: 5px; - padding-right: 5px; -} - -div { - &.field, &.actions { - margin-bottom: 10px; - } -} - -#notice { - color: green; -} - -.field_with_errors { - padding: 2px; - background-color: red; - display: table; -} - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0; - background-color: #c00; - color: #fff; - } - - ul li { - font-size: 12px; - list-style: square; - } -} - -label { - display: block; -} Modified: app/views/layouts/application.html.erb (+10 -1) =================================================================== --- app/views/layouts/application.html.erb 2017-02-19 23:40:10 +0900 (8fd69e8) +++ app/views/layouts/application.html.erb 2017-02-20 00:12:22 +0900 (90d83b7) @@ -2,6 +2,9 @@ <html> <head> <title>Ranguba</title> + + <meta name="viewport" + content="width=device-width, initial-scale=1, shrink-to-fit=no"> <%= csrf_meta_tags %> <%= stylesheet_link_tag 'application', media: 'all' %> @@ -9,6 +12,12 @@ </head> <body> - <%= yield %> + <nav class="header"> + <%= link_to("Ranguba", root_path, class: "home") %> + </nav> + + <div class="content"> + <%= yield %> + </div> </body> </html> Modified: config/routes.rb (+4 -1) =================================================================== --- config/routes.rb 2017-02-19 23:40:10 +0900 (ffa876a) +++ config/routes.rb 2017-02-20 00:12:22 +0900 (827ca3e) @@ -1,5 +1,8 @@ Rails.application.routes.draw do + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + resource :scraping, only: ["create"] resources :entries - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + + root to: "entries#index" end -------------- next part -------------- HTML����������������������������...Download