index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Sakuin (索引)</title>
  6. <link rel="stylesheet" href="/assets/css/theme.css">
  7. </head>
  8. <body>
  9. <nav class="uk-navbar-container uk-margin" uk-navbar>
  10. <div class="uk-navbar-center">
  11. <a class="uk-navbar-item uk-logo" href="#">Sakuin (索引)</a>
  12. </div>
  13. </nav>
  14. <div class="uk-container">
  15. <ul class="uk-breadcrumb">
  16. <li><a href="/">Home</a></li>
  17. {{ range $index, $element := .Path }}
  18. <li><a href="{{ $element.Path }}">{{ $element.Name }}</a></li>
  19. {{ end }}
  20. </ul>
  21. <table class="uk-table uk-table-striped uk-table-hover uk-table-middle">
  22. <thead>
  23. <tr>
  24. <th>Name</th>
  25. <th class="uk-table-shrink uk-text-nowrap">Last Modified</th>
  26. <th class="uk-table-shrink uk-text-nowrap">Size</th>
  27. <th class="uk-table-shrink uk-text-nowrap">Action</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. {{ range .Files }}
  32. <tr>
  33. <td class="uk-text-truncate">
  34. <span uk-icon="icon: {{ if .IsDir }}folder{{ else }}file{{ end }}"></span>
  35. {{ if .IsDir }}
  36. <a href="{{ .Path }}">{{ .Name }}</a>
  37. {{ else }}
  38. {{ .Name }}
  39. {{ end }}
  40. </td>
  41. <td class="uk-text-nowrap">{{ .Date }}</td>
  42. <td class="uk-text-nowrap">{{ if .IsDir }} - {{ else }}{{ .Size }}{{ end }}</td>
  43. <td class="uk-text-nowrap">{{ if .IsDir }} - {{ else }}<a href="{{ .Path }}" class="uk-icon-button" uk-icon="icon: cloud-download"></a>{{ end }}</td>
  44. </tr>
  45. {{ end }}
  46. </tbody>
  47. </table>
  48. </div>
  49. <script src="/assets/bundle.js"></script>
  50. </body>
  51. </html>