file.tx 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. :if ( !$post.addpost ) {
  2. :if ( $tiled ) {
  3. <a href="<: $post.local_href :>" class="tile">
  4. : if ($post.is_video) {
  5. <video preload="metadata" class="responsive" controls poster="<: $post.preview :>" >
  6. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  7. Your browser does not support the video tag.
  8. </video>
  9. : } else {
  10. <img src="<: $post.preview :>" class="responsive-img" />
  11. : }
  12. <p class="midtitle"><: $post.title :></p>
  13. </a>
  14. : } else {
  15. : include "post_title.tx";
  16. : include "post_tags.tx";
  17. : if ( $post.is_video ) {
  18. <video preload="metadata" class="responsive" controls poster="<: $post.preview :>" >
  19. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  20. Your browser does not support the video tag.
  21. </video>
  22. : }
  23. : if ( $post.is_audio ) {
  24. <audio controls>
  25. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  26. Your browser does not support the audio tag.
  27. </audio>
  28. : }
  29. : if ( $post.is_image ) {
  30. <img src="<: $post.preview :>" class="responsive-img" />
  31. : }
  32. : if( $post.data ) {
  33. <div class="postData" id="postData" class="responsive-text">
  34. : if ( $style != 'media' ) {
  35. <: render_it($post.data) | mark_raw :>
  36. : }
  37. </div>
  38. : }
  39. : }
  40. : }
  41. : if ( $can_edit ) {
  42. : include "edit_head.tx";
  43. <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
  44. Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
  45. File *<br /><input <: $post.href ? '' : 'required' :> class="cooltext" type="file" name="file" />
  46. : if ( $post.href ) {
  47. <input type="hidden" name="href" value="<: $post.href :>" />
  48. : }
  49. : include "preview.tx";
  50. : include "visibility.tx";
  51. : include "acls.tx";
  52. : include "tags.tx";
  53. : include "form_common.tx";
  54. </form>
  55. : include "edit_foot.tx";
  56. : }