28 lines
1.8 KiB
HTML
28 lines
1.8 KiB
HTML
<article class="gallery" ng-controller="galleryCtrlr" ng-init="getPiccys()">
|
|
<p class="emptyGallery" ng-if="state.content.gallery.length == 0">Be the first to submit an image!</p>
|
|
<section ng-show="!error" ng-repeat="piccy in state.content.gallery">
|
|
<span class="piccyTitle"><span class="minmax" ng-show="!showImage" ng-click="showImage = true">[+]</span>
|
|
<span class="minmax" ng-show="showImage" ng-click="showImage = false">[-]</span>
|
|
"{{piccy.Title}}"</span><span class="piccyBy"> by {{piccy.Author}},
|
|
{{piccy.Submitted}}.</span> <br />
|
|
<div ng-show="showImage" ng-init="showImage=true">
|
|
<img src="data:image/jpeg;base64,{{piccy.Image}}">
|
|
<p>Comments:
|
|
<span class="minmax" ng-show="!showComments" ng-click="showComments = true">[+]</span>
|
|
<span class="minmax" ng-show="showComments" ng-click="showComments = false">[-]</span></p>
|
|
<div ng-show="showComments" ng-init="showComments=true">
|
|
<span class="comment" ng-repeat="comment in piccy.Comments">"{{comment.Comment}}", <em>{{comment.Maker}}</em></span>
|
|
<form class="commentForm" name="commentForm" ng-submit="makeComment(piccy, comment.Text, comment.Maker)"
|
|
enctype="text/plain">
|
|
<input type="text" name="commentText" ng-model="comment.Text" placeholder="thoughts?" required />
|
|
<input type="text" name="commentMaker" ng-model="comment.Maker" placeholder="who by?" />
|
|
<input type="submit" name="commentSubmit" ng-model="comment.submit" value="Submit" />
|
|
<div ng-init="$parent.commentForm = commentForm"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section ng-show="error">
|
|
<p class="error">{{errorInfo}}</p>
|
|
</section>
|
|
</article> |