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.

50 lines
1.9 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. <div class="panel panel-default file-content">
  2. <div class="panel-heading file-head">
  3. {{if .ReadmeExist}}
  4. <i class="icon fa fa-book"></i>
  5. {{if .ReadmeInSingle}}
  6. {{.FileName}}
  7. {{else}}
  8. {{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
  9. {{end}}
  10. {{else}}
  11. <i class="icon fa fa-file-text-o"></i>
  12. {{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
  13. {{end}}
  14. {{if not .ReadmeInSingle}}
  15. <div class="btn-group pull-right">
  16. <a class="btn btn-default hidden" href="#">Edit</a>
  17. <a class="btn btn-default" href="{{.FileLink}}">Raw</a>
  18. <a class="btn btn-default hidden" href="#">Blame</a>
  19. <a class="btn btn-default hidden" href="#">History</a>
  20. <a class="btn btn-danger hidden" href="#">Delete</a>
  21. </div>
  22. {{end}}
  23. </div>
  24. {{if not .FileIsText}}
  25. <div class="panel-footer text-center">
  26. {{if .IsImageFile}}
  27. <img src="{{.FileLink}}">
  28. {{else}}
  29. <a href="{{.FileLink}}" class="btn btn-default">View Raw</a>
  30. {{end}}
  31. </div>
  32. {{else}}
  33. {{if .ReadmeExist}}
  34. <div class="panel-body file-body markdown">
  35. {{.FileContent|str2html}}
  36. </div>
  37. {{else}}
  38. <div class="panel-body file-body file-code code-view">
  39. <table>
  40. <tbody>
  41. <tr>
  42. <td class="lines-num"></td>
  43. <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. {{end}}
  49. {{end}}
  50. </div>