summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-07-26 13:13:52 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-07-27 15:01:27 +0200
commit14b9c83f41efeaa8f5468dcb81986d118e74d2d3 (patch)
tree259f6e84b0b0c2151b39c3d70a2edf37dd1ca927
parent4eebd8e1957a3fc3a3479331fde9f34aa8afa9d5 (diff)
downloadgitlab-ce-14b9c83f41efeaa8f5468dcb81986d118e74d2d3.tar.gz
Added lazy class to Blob Images + Diffs
-rw-r--r--app/views/projects/blob/viewers/_image.html.haml2
-rw-r--r--app/views/projects/diffs/viewers/_image.html.haml14
2 files changed, 8 insertions, 8 deletions
diff --git a/app/views/projects/blob/viewers/_image.html.haml b/app/views/projects/blob/viewers/_image.html.haml
index 1650aa8197f..82c1239147c 100644
--- a/app/views/projects/blob/viewers/_image.html.haml
+++ b/app/views/projects/blob/viewers/_image.html.haml
@@ -1,2 +1,2 @@
.file-content.image_file
- %img{ 'data-src': blob_raw_url, alt: viewer.blob.name }
+ %img.lazy{ 'data-src': blob_raw_url, alt: viewer.blob.name }
diff --git a/app/views/projects/diffs/viewers/_image.html.haml b/app/views/projects/diffs/viewers/_image.html.haml
index 05877ceed3d..3068916f4c3 100644
--- a/app/views/projects/diffs/viewers/_image.html.haml
+++ b/app/views/projects/diffs/viewers/_image.html.haml
@@ -8,7 +8,7 @@
.image
%span.wrap
.frame{ class: (diff_file.deleted_file? ? 'deleted' : 'added') }
- %img{ 'data-src': blob_raw_path, alt: diff_file.file_path }
+ %img.lazy{ 'data-src': blob_raw_path, alt: diff_file.file_path }
%p.image-info= number_to_human_size(blob.size)
- else
.image
@@ -16,7 +16,7 @@
%span.wrap
.frame.deleted
%a{ href: project_blob_path(@project, tree_join(diff_file.old_content_sha, diff_file.old_path)) }
- %img{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
+ %img.lazy{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
%p.image-info.hide
%span.meta-filesize= number_to_human_size(old_blob.size)
|
@@ -28,7 +28,7 @@
%span.wrap
.frame.added
%a{ href: project_blob_path(@project, tree_join(diff_file.content_sha, diff_file.new_path)) }
- %img{ 'data-src': blob_raw_path, alt: diff_file.new_path }
+ %img.lazy{ 'data-src': blob_raw_path, alt: diff_file.new_path }
%p.image-info.hide
%span.meta-filesize= number_to_human_size(blob.size)
|
@@ -41,10 +41,10 @@
.swipe.view.hide
.swipe-frame
.frame.deleted
- %img{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
+ %img.lazy{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
.swipe-wrap
.frame.added
- %img{ 'data-src': blob_raw_path, alt: diff_file.new_path }
+ %img.lazy{ 'data-src': blob_raw_path, alt: diff_file.new_path }
%span.swipe-bar
%span.top-handle
%span.bottom-handle
@@ -52,9 +52,9 @@
.onion-skin.view.hide
.onion-skin-frame
.frame.deleted
- %img{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
+ %img.lazy{ 'data-src': old_blob_raw_path, alt: diff_file.old_path }
.frame.added
- %img{ 'data-src': blob_raw_path, alt: diff_file.new_path }
+ %img.lazy{ 'data-src': blob_raw_path, alt: diff_file.new_path }
.controls
.transparent
.drag-track