timeline.tmpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {{with .Data}}
  2. {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
  3. <div class="page-title-container">
  4. <span class="page-title"> {{.Title}} </span>
  5. <a class="page-refresh" href="{{$.Ctx.Referrer}}" accesskey="T" title="Refresh (T)">refresh</a>
  6. </div>
  7. {{if eq .Type "remote"}}
  8. <form class="search-form" action="/timeline/remote" method="GET">
  9. <span class="post-form-field">
  10. <label for="instance"> Instance </label>
  11. <input id="instance" name="instance" value="{{.Instance}}">
  12. </span>
  13. <button type="submit"> Submit </button>
  14. </form>
  15. {{if eq .Instance ""}}
  16. <a href="/timeline/tremote"> True remote timeline viewer </a>
  17. {{else}}
  18. {{end}}
  19. {{end}}
  20. {{if eq .Type "tremote"}}
  21. <form class="search-form" action="/timeline/tremote" method="GET">
  22. <span class="post-form-field">
  23. <label for="instance"> Instance </label>
  24. <input id="instance" name="instance" value="{{.Instance}}" placeholder="example.com:optional_param">
  25. <select id="instance_type" name="instance_type" title="Select instance type">
  26. <option value="mastodon-compatible" default>Mastodon compatible</option>
  27. <option value="misskey"{{if eq .InstanceType "misskey"}}selected{{end}}>Misskey</option>
  28. <option value="friendica"{{if eq .InstanceType "friendica"}}selected{{end}}>Friendica</option>
  29. </select>
  30. </span>
  31. <button type="submit"> Submit </button>
  32. </form>
  33. {{if eq .Instance ""}}
  34. <span>Possible params:<br>withFiles - show posts only with media<br>remote - try fetch their global timeline<br>You can combine params: withFile:remote:some_other_param</span>
  35. {{end}}
  36. {{end}}
  37. {{if eq .Type "tag"}}
  38. <form class="search-form" action="/timeline/tag" method="GET">
  39. <span class="post-form-field">
  40. <label for="tag"> Tag </label>
  41. <input id="tag" name="tag" value="">
  42. </span>
  43. <button type="submit"> Submit </button>
  44. </form>
  45. {{end}}
  46. {{range .Statuses}}
  47. {{template "status.tmpl" (WithContext . $.Ctx)}}
  48. {{end}}
  49. <div class="pagination">
  50. {{if .PrevLink}}
  51. <a href="{{.PrevLink}}">[prev]</a>
  52. {{end}}
  53. {{if .NextLink}}
  54. <a href="{{.NextLink}}">[next]</a>
  55. {{end}}
  56. </div>
  57. {{template "footer.tmpl"}}
  58. {{end}}