mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 19:54:13 +01:00
37 lines
No EOL
1.4 KiB
Cheetah
37 lines
No EOL
1.4 KiB
Cheetah
<div class="panel panel-radius" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
|
|
<p class="panel-header">
|
|
{{if .ReadmeExist}}
|
|
<i class="icon fa fa-book fa-lg"></i>
|
|
{{if .ReadmeInHome}}
|
|
<strong class="file-name">{{.FileName}}</strong>
|
|
{{else}}
|
|
<strong>{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
|
|
{{end}}
|
|
{{else}}
|
|
<i class="icon fa fa-file-text-o"></i>
|
|
<strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
|
|
{{end}}
|
|
</p>
|
|
<div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view" id="repo-code-view">
|
|
{{if .ReadmeExist}}
|
|
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
|
|
{{else if not .IsFileText}}
|
|
<div class="view-raw">
|
|
{{if .IsImageFile}}
|
|
<img src="{{.FileLink}}">
|
|
{{else}}
|
|
<a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">View Raw</a>
|
|
{{end}}
|
|
</div>
|
|
{{else if .FileSize}}
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td class="lines-num"></td>
|
|
<td class="lines-code"><pre class="prettyprint linenums {{if .FileExt}}lang-{{.FileExt}}{{end}}"><code>{{.FileContent}}</code></pre></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{{end}}
|
|
</div>
|
|
</div> |