Browse Source

fixed

for-closed-social
slene 10 years ago
parent
commit
f90e37ade0
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      routers/repo/single.go
  2. +2
    -0
      templates/repo/single.tmpl

+ 1
- 0
routers/repo/single.go View File

@ -97,6 +97,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
}
if readmeFile != nil {
ctx.Data["ReadmeExist"] = true
// if file large than 1M not show it
if readmeFile.Size > 1024*1024 || readmeFile.Filemode != git.FileModeBlob {
ctx.Data["FileIsLarge"] = true

+ 2
- 0
templates/repo/single.tmpl View File

@ -83,6 +83,7 @@
</tbody>
</table>
</div>
{{if .ReadmeExist}}
<div class="panel panel-default file-content">
<div class="panel-heading file-head">
<i class="icon fa fa-book"></i> README.md
@ -97,6 +98,7 @@
</div>
{{end}}
</div>
{{end}}
</div>
</div>
{{template "base/footer" .}}

Loading…
Cancel
Save