1
0
Fork 0

Install Viewer.js

This commit is contained in:
Alex Kotov 2018-12-02 18:20:22 +05:00
parent 277aa10ad3
commit a34941f515
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
5 changed files with 30 additions and 3 deletions

View file

@ -4,4 +4,12 @@
//= require jquery3
//= require popper
//= require bootstrap-sprockets
//= require viewerjs/dist/viewer
//= require jquery-viewer/dist/jquery-viewer
//= require_tree .
$(document).ready(function() {
$('#image').viewer({
inline: true,
})
})

View file

@ -1,3 +1,4 @@
@import 'bootstrap';
@import 'font-awesome-sprockets';
@import 'font-awesome';
@import 'viewerjs/dist/viewer';

View file

@ -139,7 +139,9 @@
<% @passport.image.try do |image| %>
<div class="col-md-8 col-lg-6">
<%= image_tag url_for(image), class: 'img-fluid' %>
<div>
<%= image_tag url_for(image), id: :image, class: 'img-fluid' %>
</div>
</div>
<% end %>
</div>

15
package-lock.json generated
View file

@ -1,4 +1,17 @@
{
"name": "partynest",
"lockfileVersion": 1
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"jquery-viewer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/jquery-viewer/-/jquery-viewer-1.0.0.tgz",
"integrity": "sha512-j1f7AKNU+wjywS8CwtHzDymyoroUznoXnrRp87WIRVuzZzMoFtJCrj54F/0BAi2DIEkDHx/1EZl9N725M6LiIA=="
},
"viewerjs": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.3.0.tgz",
"integrity": "sha512-Xt0Iy/j639MwuDV5xAKhdk9PKVj9FjMvh5CVH7T7KKGeKq4tXIlDDySs2uxkmG+GpFeM6997tt9dHdzHhUwd+g=="
}
}
}

View file

@ -1,5 +1,8 @@
{
"name": "partynest",
"private": true,
"dependencies": {}
"dependencies": {
"jquery-viewer": "^1.0.0",
"viewerjs": "^1.3.0"
}
}