posts.tx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <p class="title">
  2. <a title="RSS" class="rss" href="<: $route :>?format=rss"></a>
  3. <: $category :> (<: $date :>):
  4. </p>
  5. : for $posts -> $post {
  6. <hr>
  7. <h3 class='blogtitles'>
  8. <a href='<: $post.href :>'><: $post.title :></a>
  9. <a class='usericon <: $post.user :>' title='Posted by <: $post.user :>'></a>
  10. </h3>
  11. : if ( $post.is_video ) {
  12. <video class="responsive" controls poster="<: $post.preview :>" >
  13. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  14. Your browser does not support the video tag.
  15. </video>
  16. : }
  17. : if ( $post.is_audio ) {
  18. <audio controls>
  19. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  20. Your browser does not support the audio tag.
  21. </audio>
  22. : }
  23. : if ( $post.is_image ) {
  24. <img src="<: $post.href :>" alt="image" class="responsive" /><br />
  25. : }
  26. : $post.data | mark_raw;
  27. : if ( $can_edit ) {
  28. <br />
  29. <a style="display: inline-block;" onclick="switchMenu('<: $post.id :>');">[Edit]</a>
  30. <div id="<: $post.id :>" style="display:none;">
  31. : include $post.type ~ ".tx";
  32. <form class="Submissions" action="/post/delete" class="inline">
  33. <input type="hidden" name="id" value="<: $post.id :>"></input>
  34. <input class="coolbutton" type="submit" value="Delete"></input>
  35. </form>
  36. </div>
  37. : }
  38. : }