fd8a40783d
Sketch 43 files are technically a zip file, so the JavaScript opens the zip file & locates a preview.png which is just a quick preview of the last sketch page edited. After that is loaded it simply places the image into the DOM
7 lines
461 B
Text
7 lines
461 B
Text
- content_for :page_specific_javascripts do
|
|
= page_specific_javascript_bundle_tag('common_vue')
|
|
= page_specific_javascript_bundle_tag('sketch_viewer')
|
|
|
|
.file-content#js-sketch-viewer{ data: { endpoint: namespace_project_raw_path(@project.namespace, @project, @id) } }
|
|
.js-loading-icon.text-center.prepend-top-default.append-bottom-default.js-loading-icon{ 'aria-label' => 'Loading Sketch preview' }
|
|
= icon('spinner spin 2x', 'aria-hidden' => 'true');
|