You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. <div class="panel panel-radius" id="repo-readme">
  2. <p class="panel-header">
  3. {{if .ReadmeExist}}
  4. <i class="icon fa fa-book fa-lg"></i>
  5. {{if .ReadmeInHome}}
  6. <strong class="file-name">{{.FileName}}</strong>
  7. {{else}}
  8. <strong>{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
  9. {{end}}
  10. {{else}}
  11. <i class="icon fa fa-file-text-o"></i>
  12. <strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
  13. {{end}}
  14. </p>
  15. <div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view">
  16. {{if .ReadmeExist}}
  17. {{.FileContent | Str2html}}
  18. {{else if not .IsFileText}}
  19. <div class="view-raw">
  20. {{if .IsImageFile}}
  21. <img src="{{.FileLink}}">
  22. {{else}}
  23. <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">View Raw</a>
  24. {{end}}
  25. </div>
  26. {{else if .FileSize}}
  27. <table>
  28. <tbody>
  29. <tr>
  30. <td class="lines-num"></td>
  31. <td class="lines-code"><pre class="prettyprint linenums {{if .FileExt}}lang-{{.FileExt}}{{end}}"><code>{{.FileContent}}</code></pre></td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. {{end}}
  36. </div>
  37. </div>