1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <head>
- <title>image_share</title>
- </head>
- <body>
- {{> image_add_form }}
- <nav class="navbar navbar-default navbar-fixed-top">
- <div class="container">
- {{> loginButtons }}
- </div>
- </nav>
- <div class="container">
- <h1>Welcome to image share!</h1>
- {{> images}}
- </div>
- </body>
- <template name="image_add_form">
- <div class="modal fade" id="image_add_form">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <div class="modal-title"></div>
- </div>
- <div class="modal-body">
- <form class="js-add-image">
- <input type="text" name="img_src" />
- <br /><input type="text" name="img_alt" />
- <button class="btn btn-success">save</button>
- </form>
- </div>
- <div class="modal-footer">
- <button class="btn btn-warning" data-dismiss="modal">cancel</button>
- </div>
- </div>
- </div>
- </div>
- </template>
- <template name="images">
- <button class="btn btn-success js-show-image-form">add image</button>
- <div class="row">
- {{#each images}}
- <div class="col-xs-12 col-md-3" id="{{_id}}">
- <div class="thumbnail">
- <img class="thumbnail-img js-image" src="{{img_src}}" alt="{{img_alt}}" />
- <div class="caption">
- <h3>Rating: {{ rating }}</h3>
- <p>{{ img_alt }}</p>
- <p>{{> starsRating mutable=true class="js-rate-image" id=image_id }}</p>
- <button class="js-del-image btn btn-warning">delete</button>
- </div>
- </div>
- </div> <!-- / col -->
- {{/each}}
- </div> <!-- / row -->
- </template>
|