Improve file type icons
@ -59,7 +59,7 @@ table {
|
||||
margin:8px 0 20px;
|
||||
}
|
||||
td, th {
|
||||
padding:4px 3px;
|
||||
padding:5px 3px;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
th { text-align:left; border-top:1px solid #f8f8f8; }
|
||||
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 498 B |
BIN
media/img/file/ms-excel.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
media/img/file/ms-ppt.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
media/img/file/ms-word.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1003 B After Width: | Height: | Size: 1003 B |
BIN
media/img/file/odf.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
media/img/file/pdf.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
media/img/file/txt.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
15
settings.py
@ -124,13 +124,16 @@ ACCOUNT_ACTIVATION_DAYS = 7
|
||||
# Icons will show in repo page.
|
||||
FILEEXT_ICON_MAP = {
|
||||
# pdf file
|
||||
'pdf' : 'pdf-icon-24.png',
|
||||
'pdf' : 'pdf.png',
|
||||
# document file
|
||||
'doc' : 'word-icon-24.png',
|
||||
'docx' : 'word-icon-24.png',
|
||||
# ppt file
|
||||
'ppt' : 'ppt-icon-24.png',
|
||||
'pptx' : 'ppt-icon-24.png',
|
||||
'doc' : 'ms-word.png',
|
||||
'docx' : 'ms-word.png',
|
||||
'ppt' : 'ms-ppt.png',
|
||||
'pptx' : 'ms-ppt.png',
|
||||
'xls' : 'ms-excel.png',
|
||||
'xlsx' : 'ms-excel.png',
|
||||
'txt' : 'txt.png',
|
||||
'odf' : 'odf.png',
|
||||
# music file
|
||||
'mp3' : 'music-icon-24.png',
|
||||
# picture file
|
||||
|
@ -151,7 +151,7 @@
|
||||
|
||||
{% for dirent in file_list %}
|
||||
<tr>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/{{ dirent.obj_name|file_icon_filter }}" alt="文件" /></td>
|
||||
<td class="icon-container"><img src="{{ MEDIA_URL }}img/file/{{ dirent.obj_name|file_icon_filter }}" alt="文件" /></td>
|
||||
{% if view_history %}
|
||||
<td><a class="op" href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/files/?obj_id={{ dirent.props.obj_id }}&commit_id={{ current_commit.id }}&p={{ path|urlencode }}{{ dirent.obj_name|urlencode }}">{{ dirent.props.obj_name }}</a></td>
|
||||
{% else %}
|
||||
|