Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
14b9c83f
Commit
14b9c83f
authored
Jul 26, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added lazy class to Blob Images + Diffs
parent
4eebd8e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
app/views/projects/blob/viewers/_image.html.haml
app/views/projects/blob/viewers/_image.html.haml
+1
-1
app/views/projects/diffs/viewers/_image.html.haml
app/views/projects/diffs/viewers/_image.html.haml
+7
-7
No files found.
app/views/projects/blob/viewers/_image.html.haml
View file @
14b9c83f
.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
}
app/views/projects/diffs/viewers/_image.html.haml
View file @
14b9c83f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment