Replace files icons with fontawesome
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Before Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 463 B |
Before Width: | Height: | Size: 812 B |
Before Width: | Height: | Size: 641 B |
|
@ -57,6 +57,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
color: $bg_primary;
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
position: relative;
|
position: relative;
|
||||||
top:-1px;
|
top:-1px;
|
||||||
|
|
|
@ -25,8 +25,13 @@ module TreeHelper
|
||||||
#
|
#
|
||||||
# type - String type of the tree item; either 'folder' or 'file'
|
# type - String type of the tree item; either 'folder' or 'file'
|
||||||
def tree_icon(type)
|
def tree_icon(type)
|
||||||
image = type == 'folder' ? 'file_dir.png' : 'file_txt.png'
|
icon_class = if type == 'folder'
|
||||||
image_tag(image, size: '16x16')
|
'icon-folder-close'
|
||||||
|
else
|
||||||
|
'icon-file-alt'
|
||||||
|
end
|
||||||
|
|
||||||
|
content_tag :i, nil, class: icon_class
|
||||||
end
|
end
|
||||||
|
|
||||||
def tree_hex_class(content)
|
def tree_hex_class(content)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- tree, commit = submodule_links(submodule_item)
|
- tree, commit = submodule_links(submodule_item)
|
||||||
%tr{ class: "tree-item" }
|
%tr{ class: "tree-item" }
|
||||||
%td.tree-item-file-name
|
%td.tree-item-file-name
|
||||||
= image_tag "submodule.png"
|
%i.icon-archive
|
||||||
%span
|
%span
|
||||||
= link_to truncate(submodule_item.name, length: 40), tree
|
= link_to truncate(submodule_item.name, length: 40), tree
|
||||||
@
|
@
|
||||||
|
|
|
@ -36,8 +36,7 @@
|
||||||
- if @path.present?
|
- if @path.present?
|
||||||
%tr.tree-item
|
%tr.tree-item
|
||||||
%td.tree-item-file-name
|
%td.tree-item-file-name
|
||||||
= image_tag "file_empty.png", size: '16x16'
|
= link_to "..", project_tree_path(@project, up_dir_path(tree)), class: 'prepend-left-10'
|
||||||
= link_to "..", project_tree_path(@project, up_dir_path(tree))
|
|
||||||
%td
|
%td
|
||||||
%td
|
%td
|
||||||
%td
|
%td
|
||||||
|
|