file.tx 2.4 KB

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