diff --git a/Gemfile b/Gemfile index 6759cea..57b9681 100644 --- a/Gemfile +++ b/Gemfile @@ -21,9 +21,6 @@ gem 'coffee-rails', '~> 4.0.0' # Use jquery as the JavaScript library gem 'jquery-rails' -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks' - # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 39b57a1..70c3160 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -152,8 +152,6 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - turbolinks (2.2.1) - coffee-rails tzinfo (0.3.39) uglifier (2.5.0) execjs (>= 0.3.0) @@ -181,5 +179,4 @@ DEPENDENCIES sdoc simple_form sqlite3 - turbolinks uglifier (>= 1.3.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d6925fa..79f3c35 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,5 +12,5 @@ // //= require jquery //= require jquery_ujs -//= require turbolinks //= require_tree . +//= require jquery.magnific-popup diff --git a/app/assets/javascripts/home.js b/app/assets/javascripts/home.js new file mode 100644 index 0000000..4532725 --- /dev/null +++ b/app/assets/javascripts/home.js @@ -0,0 +1,3 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. +// You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/home.js.coffee b/app/assets/javascripts/home.js.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/home.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/images.js b/app/assets/javascripts/images.js new file mode 100644 index 0000000..a12856c --- /dev/null +++ b/app/assets/javascripts/images.js @@ -0,0 +1,10 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. +// You can use CoffeeScript in this file: http://coffeescript.org/ + +$(function() { + $('.images a.image').magnificPopup({ + type: 'image', + gallery: { enabled: true } + }) +}) diff --git a/app/assets/javascripts/images.js.coffee b/app/assets/javascripts/images.js.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/images.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sessions.js b/app/assets/javascripts/sessions.js new file mode 100644 index 0000000..4532725 --- /dev/null +++ b/app/assets/javascripts/sessions.js @@ -0,0 +1,3 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. +// You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sessions.js.coffee b/app/assets/javascripts/sessions.js.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/sessions.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3192ec8..2660547 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -9,5 +9,6 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self + *= require magnific-popup *= require_tree . */ diff --git a/app/assets/stylesheets/home.css.scss b/app/assets/stylesheets/home.css.sass similarity index 51% rename from app/assets/stylesheets/home.css.scss rename to app/assets/stylesheets/home.css.sass index df56f89..747e487 100644 --- a/app/assets/stylesheets/home.css.scss +++ b/app/assets/stylesheets/home.css.sass @@ -2,16 +2,13 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ -html { - font-size: 100%; - font-family: 'Helvetica Neue', 'Arial', sans-serif; -} +html + font-size: 100% + font-family: 'Helvetica Neue', 'Arial', sans-serif -header, main { - max-width: 60rem; - margin: 0 auto; -} +header, main + max-width: 60rem + margin: 0 auto -header { - text-align: right; -} +header + text-align: right diff --git a/app/assets/stylesheets/images.css.sass b/app/assets/stylesheets/images.css.sass new file mode 100644 index 0000000..1713b5e --- /dev/null +++ b/app/assets/stylesheets/images.css.sass @@ -0,0 +1,24 @@ +// Place all the styles related to the images controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + +ul.images + list-style: none + padding-left: 0 + display: flex + flex-wrap: wrap + justify-content: space-between + + display: -webkit-flex + -webkit-flex-wrap: wrap + -webkit-justify-content: space-between + + li + outline: 1px solid red + margin-bottom: 1em + + img + max-width: 100px + width: 100% + border: 1px solid rgba(0, 0, 0, 0.2) + padding: 0.25rem diff --git a/app/assets/stylesheets/images.css.scss b/app/assets/stylesheets/images.css.scss deleted file mode 100644 index c55ef10..0000000 --- a/app/assets/stylesheets/images.css.scss +++ /dev/null @@ -1,11 +0,0 @@ -// Place all the styles related to the images controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ - -ul.images { - list-style: none; - padding-left: 0; - li { - display: inline-block; - } -} diff --git a/app/assets/stylesheets/sessions.css.scss b/app/assets/stylesheets/sessions.css.sass similarity index 100% rename from app/assets/stylesheets/sessions.css.scss rename to app/assets/stylesheets/sessions.css.sass diff --git a/app/views/images/index.html.erb b/app/views/images/index.html.erb index 18a92c7..427eda4 100644 --- a/app/views/images/index.html.erb +++ b/app/views/images/index.html.erb @@ -3,7 +3,7 @@