Last active
January 2, 2016 01:49
-
-
Save guinslym/8233045 to your computer and use it in GitHub Desktop.
I want to implement lightbox2 => http://lokeshdhakar.com/projects/lightbox2/ I have downloaded the files and add it to vendor/assets/javascript vendor/assets/stylesheets and vendor/assets/img ==> (that's a folder that comes with lightbox)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="image-row"> | |
<div class="image-set"> | |
<% Image.all.each do |i| %> | |
<a class="without-caption image-link" data-lightbox="image-1" rel="shadowbox" href="<%=i.image.to_s %>" title="<%= i.caption %>"> | |
<%= image_tag i.image.url(:thumb) %> | |
</a> | |
<% end %> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a manifest file that'll be compiled into application.css, which will include all the files | |
* listed below. | |
* | |
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. | |
* | |
* You're free to add application-wide styles to this file and they'll appear at the top of the | |
* compiled file, but it's generally better to create a new file per style scope. | |
* | |
*= require_self | |
*= require_tree . | |
*= require lightbox | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>Project</title> | |
<%= stylesheet_link_tag "styles", "lightbox", media: "all", "data-turbolinks-track" => true %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
<%= csrf_meta_tags %> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require jquery | |
//= require lightbox-2.6.min | |
//= require jquery_ujs | |
//= require turbolinks | |
//= require_tree . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment