image_share.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <head>
  2. <title>image_share</title>
  3. </head>
  4. <body>
  5. </body>
  6. <template name="ApplicationLayout">
  7. {{> yield "navbar" }}
  8. {{> yield "main" }}
  9. </template>
  10. <template name="welcome">
  11. <div class="container">
  12. <div class="jumbotron">
  13. <h1>Welcome to image share {{ username }} !</h1>
  14. <a href="/images" class="btn btn-info">ENTER</a>
  15. </div>
  16. </div>
  17. </template>
  18. <template name="navbar">
  19. <nav class="navbar navbar-default navbar-fixed-top">
  20. <div class="container">
  21. {{> loginButtons }}
  22. </div>
  23. </nav>
  24. </template>
  25. <template name="image">
  26. <div class="container">
  27. <h2>{{ img_alt }}</h2>
  28. <a href="/images"><img src="{{ img_src }}" class="single-img" /></a>
  29. </div>
  30. </template>
  31. <template name="image_add_form">
  32. <div class="modal fade" id="image_add_form">
  33. <div class="modal-dialog">
  34. <div class="modal-content">
  35. <div class="modal-header">
  36. <div class="modal-title"></div>
  37. </div>
  38. <div class="modal-body">
  39. <form class="js-add-image">
  40. <input type="text" name="img_src" />
  41. <br /><input type="text" name="img_alt" />
  42. <button class="btn btn-success">save</button>
  43. </form>
  44. </div>
  45. <div class="modal-footer">
  46. <button class="btn btn-warning" data-dismiss="modal">cancel</button>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </template>
  52. <template name="images">
  53. <div class="container">
  54. {{> image_add_form }}
  55. {{#if currentUser }}
  56. <button class="btn btn-success js-show-image-form">add image</button>
  57. {{/if}}
  58. {{#if filtering_images }}
  59. <h2>Showing images by user {{ getFilterUser }}. <a href="#" class="js-unset-image-filter">Show all images</a></h2>
  60. {{/if}}
  61. <div class="row">
  62. {{#each images}}
  63. <div class="col-xs-12 col-md-3" id="{{_id}}">
  64. <div class="thumbnail">
  65. <a href="/image/{{ _id }}"><img class="thumbnail-img js-image" src="{{img_src}}" alt="{{img_alt}}" /></a>
  66. <div class="caption">
  67. <h3>Rating: {{ rating }}</h3>
  68. <p>{{ img_alt }}</p>
  69. <p>User: <a href="#" class="js-set-image-filter">{{ getUser createdBy }}</a></p>
  70. <p>{{> starsRating mutable=true class="js-rate-image" id=image_id }}</p>
  71. <button class="js-del-image btn btn-warning">delete</button>
  72. </div>
  73. </div>
  74. </div> <!-- / col -->
  75. {{/each}}
  76. </div> <!-- / row -->
  77. </div><!-- / div.container -->
  78. </template>