diff --git a/media/css/file_view_extra.css b/media/css/file_view_extra.css new file mode 100644 index 0000000000..7338ecfd2b --- /dev/null +++ b/media/css/file_view_extra.css @@ -0,0 +1,50 @@ +#main { + width:100%; +} +#view-hd, +#view-path-op, +#file-op, +#sf-commit-op { + width:950px; + margin:0 auto; +} +#file-op { + padding:0; + border:0; +} +#file-op .avatar, +#file-op .name, +#file-op .time, +#file-op span { + vertical-align:middle; +} +#file-op .time { + color:#666; + margin:0 2px 0 8px; +} +#file-op .file-diff { + font-size:100%; +} +#file-op .contributors { + margin-left:8px; +} +#file { + padding:0; + background:#fff; +} +#file-view { + padding:30px 0 10px; + min-height:400px; + background:#f4f4f4; + border:1px solid #ededed; + margin-top:12px; +} +#sf, +#md-view { + width:624px; + padding:40px 96px; + border:1px solid #ccc; + margin:0 auto; + box-shadow:0 0 6px #ccc; + min-height:400px; +} diff --git a/templates/repo_edit_file.html b/templates/repo_edit_file.html index 70aa85dbb5..96951f0a6f 100644 --- a/templates/repo_edit_file.html +++ b/templates/repo_edit_file.html @@ -40,14 +40,9 @@ background:#f4f4f4; border-top:1px solid #ededed; } -#md-view { - width:690px; -} -#sf { +#sf, #md-view { width:624px; padding:40px 96px; -} -#sf, #md-view { box-shadow:0 0 6px #ccc; min-height:400px; border:1px solid #ccc; @@ -61,7 +56,11 @@ z-index:1010;/*make seaf image show below path-op*/ } .CodeMirror { + {% if filetype == 'Markdown' %} + width:818px; + {% else %} width:950px; + {% endif %} margin:0 auto; box-shadow:0 0 6px #272822; } diff --git a/templates/repo_view_file.html b/templates/repo_view_file.html index 8695966690..617f166355 100644 --- a/templates/repo_view_file.html +++ b/templates/repo_view_file.html @@ -6,53 +6,8 @@ {% if filetype == 'Text' %} {% endif %} -{% if filetype == 'Sf' %} - +{% if filetype == 'Sf' or filetype == 'Markdown' %} + {% endif %} {% endblock %} @@ -84,7 +39,15 @@ {% endif %} + {% if filetype == 'Sf' or filetype == 'Markdown'%} + {% if view_history %} +
{% trans "Current Path: "%} @@ -130,12 +93,12 @@ {% endif %}
{% avatar latest_contributor 20 %} {{ latest_contributor|email2nickname }}{{ last_modified|translate_seahub_time}}{% trans "updated this file"%} - {% if filetype == 'Text' or filetype == 'Markdown' %} + {% if filetype == 'Text' %} {% if last_commit_id %} {% trans "Detail"%} {% endif %} @@ -161,9 +124,19 @@
{% trans "Loading..."%}
+ {% if filetype == 'Markdown' %} +{% trans "Loading..."%}
+{% trans "Loading..."%}
+ {% endif %} {% endif %}{{ err }}
').addClass('file-view-tip'); + $('#file-view').html('{{ err }}
{% trans "Shared by: " %}{{ username }}
+ {% endif %} + {% if filetype == 'Text' or filetype == 'Image' or filetype == 'SVG' or filetype == 'Markdown' %} {% endif %} +{% trans "Loading..." %}
+ {% if filetype == 'Markdown' %} +{% trans "Loading..."%}
+{% trans "Loading..." %}
+ {% endif %} {% endif %}