image_share.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <head>
  2. <title>image_share</title>
  3. </head>
  4. <body>
  5. {{> image_add_form }}
  6. <nav class="navbar navbar-default navbar-fixed-top">
  7. <div class="container">
  8. {{> loginButtons }}
  9. </div>
  10. </nav>
  11. <div class="container">
  12. <h1>Welcome to image share!</h1>
  13. {{> images}}
  14. </div>
  15. </body>
  16. <template name="image_add_form">
  17. <div class="modal fade" id="image_add_form">
  18. <div class="modal-dialog">
  19. <div class="modal-content">
  20. <div class="modal-header">
  21. <div class="modal-title"></div>
  22. </div>
  23. <div class="modal-body">
  24. <form class="js-add-image">
  25. <input type="text" name="img_src" />
  26. <br /><input type="text" name="img_alt" />
  27. <button class="btn btn-success">save</button>
  28. </form>
  29. </div>
  30. <div class="modal-footer">
  31. <button class="btn btn-warning" data-dismiss="modal">cancel</button>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <template name="images">
  38. <button class="btn btn-success js-show-image-form">add image</button>
  39. <div class="row">
  40. {{#each images}}
  41. <div class="col-xs-12 col-md-3" id="{{_id}}">
  42. <div class="thumbnail">
  43. <img class="thumbnail-img js-image" src="{{img_src}}" alt="{{img_alt}}" />
  44. <div class="caption">
  45. <h3>Rating: {{ rating }}</h3>
  46. <p>{{ img_alt }}</p>
  47. <p>{{> starsRating mutable=true class="js-rate-image" id=image_id }}</p>
  48. <button class="js-del-image btn btn-warning">delete</button>
  49. </div>
  50. </div>
  51. </div> <!-- / col -->
  52. {{/each}}
  53. </div> <!-- / row -->
  54. </template>