diff --git a/Gemfile b/Gemfile index 0447f70941..31cfa85e4f 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ gem 'jbuilder', '~> 2.5' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development - +gem 'bootstrap-sass' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platform: :mri diff --git a/Gemfile.lock b/Gemfile.lock index b69882a8dc..d2e6965ad2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,160 +1,169 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.0) - actionpack (= 5.0.0) - nio4r (~> 1.2) + actioncable (5.0.7.2) + actionpack (= 5.0.7.2) + nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.0) - actionpack (= 5.0.0) - actionview (= 5.0.0) - activejob (= 5.0.0) + actionmailer (5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.0) - actionview (= 5.0.0) - activesupport (= 5.0.0) + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.0) - activesupport (= 5.0.0) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (5.0.0) - activesupport (= 5.0.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.0.7.2) + activesupport (= 5.0.7.2) globalid (>= 0.3.6) - activemodel (5.0.0) - activesupport (= 5.0.0) - activerecord (5.0.0) - activemodel (= 5.0.0) - activesupport (= 5.0.0) + activemodel (5.0.7.2) + activesupport (= 5.0.7.2) + activerecord (5.0.7.2) + activemodel (= 5.0.7.2) + activesupport (= 5.0.7.2) arel (~> 7.0) - activesupport (5.0.0) + activesupport (5.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) + i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - arel (7.1.0) - builder (3.2.2) - byebug (9.0.5) - coffee-rails (4.2.1) + arel (7.1.4) + autoprefixer-rails (10.0.3.0) + execjs + bindex (0.8.1) + bootstrap-sass (3.4.1) + autoprefixer-rails (>= 5.2.1) + sassc (>= 2.0.0) + builder (3.2.4) + byebug (11.1.3) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.2.x) + railties (>= 4.0.0) coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) - concurrent-ruby (1.0.2) - debug_inspector (0.0.2) + coffee-script-source (1.12.2) + concurrent-ruby (1.1.7) + crass (1.0.6) erubis (2.7.0) execjs (2.7.0) - ffi (1.9.14) - globalid (0.3.6) - activesupport (>= 4.1.0) - i18n (0.7.0) - jbuilder (2.5.0) - activesupport (>= 3.0.0, < 5.1) - multi_json (~> 1.2) - jquery-rails (4.1.1) + ffi (1.13.1) + globalid (0.4.2) + activesupport (>= 4.2.0) + i18n (1.8.5) + concurrent-ruby (~> 1.0) + jbuilder (2.10.1) + activesupport (>= 5.0.0) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.0.3) + loofah (2.8.0) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.4) - mime-types (>= 1.16, < 4) - method_source (0.8.2) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.1.0) - minitest (5.9.0) - multi_json (1.12.1) - nio4r (1.2.1) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - pkg-config (1.1.7) - puma (3.5.2) - rack (2.0.1) + mail (2.7.1) + mini_mime (>= 0.1.1) + method_source (1.0.0) + mini_mime (1.0.2) + mini_portile2 (2.4.0) + minitest (5.14.2) + nio4r (2.5.4) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + puma (3.12.6) + rack (2.2.3) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.0) - actioncable (= 5.0.0) - actionmailer (= 5.0.0) - actionpack (= 5.0.0) - actionview (= 5.0.0) - activejob (= 5.0.0) - activemodel (= 5.0.0) - activerecord (= 5.0.0) - activesupport (= 5.0.0) - bundler (>= 1.3.0, < 2.0) - railties (= 5.0.0) + rails (5.0.7.2) + actioncable (= 5.0.7.2) + actionmailer (= 5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) + activemodel (= 5.0.7.2) + activerecord (= 5.0.7.2) + activesupport (= 5.0.7.2) + bundler (>= 1.3.0) + railties (= 5.0.7.2) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.1) - activesupport (>= 4.2.0, < 6.0) - nokogiri (~> 1.6.0) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (5.0.0) - actionpack (= 5.0.0) - activesupport (= 5.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (11.2.2) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - sass (3.4.22) - sass-rails (5.0.5) + rake (13.0.1) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) + ffi (~> 1.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - spring (1.7.2) - spring-watcher-listen (2.0.0) + sassc (2.4.0) + ffi (~> 1.9) + spring (2.1.1) + spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) - spring (~> 1.2) - sprockets (3.6.3) + spring (>= 1.2, < 3.0) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.1.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.11) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - turbolinks (5.0.0) - turbolinks-source (~> 5) - turbolinks-source (5.0.0) - tzinfo (1.2.2) + sqlite3 (1.4.2) + thor (1.0.1) + thread_safe (0.3.6) + tilt (2.0.10) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.8) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - web-console (3.3.1) + web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) - debug_inspector + bindex (>= 0.4.0) railties (>= 5.0) - websocket-driver (0.6.4) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) + websocket-extensions (0.1.5) PLATFORMS ruby DEPENDENCIES + bootstrap-sass byebug coffee-rails (~> 4.2) jbuilder (~> 2.5) @@ -172,4 +181,4 @@ DEPENDENCIES web-console BUNDLED WITH - 1.12.5 + 1.17.3 diff --git a/README.md b/README.md index 7db80e4ca1..4c0fbc22de 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,3 @@ # README -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... +第一周作业 diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.scss similarity index 93% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.scss index 0ebd7fe829..461e0e7763 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.scss @@ -13,3 +13,6 @@ *= require_tree . *= require_self */ + + @import "bootstrap-sprockets"; + @import "bootstrap"; diff --git a/app/views/common/_footer.html.erb b/app/views/common/_footer.html.erb new file mode 100644 index 0000000000..3e33190871 --- /dev/null +++ b/app/views/common/_footer.html.erb @@ -0,0 +1,6 @@ + diff --git a/app/views/common/_navbar.html.erb b/app/views/common/_navbar.html.erb new file mode 100644 index 0000000000..09fc42cfbc --- /dev/null +++ b/app/views/common/_navbar.html.erb @@ -0,0 +1,19 @@ + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 659576bca5..44b71f27b8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1,21 @@ -
-