file.tx 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. : include "post_tags.tx";
  17. : if ( $post.is_video ) {
  18. <video preload="none" 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. <div style="background-image:url(<: $post.href :>);" class="responsive preview"></div>
  31. : }
  32. : if( $post.data ) {
  33. : if ($post.is_video || $post.is_image) {
  34. <div class="postData" id="postData" class="responsive-text">
  35. : } else {
  36. <div class="postData" id="postData">
  37. : }
  38. : if ( $style != 'media' ) {
  39. <: render_it($post.data) | mark_raw :>
  40. : }
  41. </div>
  42. : }
  43. : }
  44. : }
  45. : if ( $can_edit ) {
  46. : include "edit_head.tx";
  47. <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
  48. Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
  49. File *<br /><input <: $post.href ? '' : 'required' :> class="cooltext" type="file" name="file" />
  50. : if ( $post.href ) {
  51. <input type="hidden" name="href" value="<: $post.href :>" />
  52. : }
  53. : include "preview.tx";
  54. : include "acls.tx";
  55. : include "tags.tx";
  56. : include "form_common.tx";
  57. </form>
  58. : include "edit_foot.tx";
  59. : }