aboutsummaryrefslogtreecommitdiff
path: root/templates/repo
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/view_file.tmpl4
-rw-r--r--templates/repo/view_list.tmpl2
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 08d77c3f..77f47232 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -36,8 +36,8 @@
{{end}}
</h4>
<div class="ui attached table segment">
- <div class="file-view {{if .IsMarkdown}}markdown{{else if .IsTextFile}}code-view{{end}} has-emoji">
- {{if .IsMarkdown}}
+ <div class="file-view {{if .IsMarkdown}}markdown{{else if .ReadmeInList}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
+ {{if or .IsMarkdown .ReadmeInList}}
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
{{else if not .IsTextFile}}
<div class="view-raw ui center">
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 0881ce99..f532dd74 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -52,6 +52,6 @@
{{end}}
</tbody>
</table>
-{{if .ReadmeExist}}
+{{if and .ReadmeExist .IsTextFile}}
{{template "repo/view_file" .}}
{{end}}