-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
81 lines (79 loc) · 3.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html ng-app="GotChosenApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GotChosen Mock - Michael Henderson</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.1/angular.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/controllers.js"></script>
<link rel="stylesheet" href="css/main.css" />
</head>
<body>
<main ng-controller="GotChosenController">
<div class="container">
<section class="post">
<form id="form_newPost">
<section class="post-top-half">
<div class="post-creator cf">
<div class="creator-avatar left"><img ng-src="{{user.avatarSrc}}" /></div>
<div class="creator-info left">
<div class="creator-name">{{user.name}}</div>
</div>
</div>
<div class="post-new-content">
<input class="input-new-post" ng-model="newPost" name="form_newPost" placeholder="What's on your mind?" autofocus />
</div>
<div class="post-interaction"></div>
</section>
<section class="post-bottom-half cf">
<button class="button-new-post right" ng-click="submitPost()">Post</button>
</section>
</form>
</section>
<section class="post" ng-repeat="post in posts | orderBy:order">
<section class="post-top-half">
<div class="post-creator cf">
<div class="creator-avatar left"><img ng-src="{{user.avatarSrc}}" /></div>
<div class="creator-info left">
<div class="creator-name">{{user.name}}</div>
<div class="creator-post-time">Shared {{post.shareScope}} - {{post.timePosted | date: 'dd MMM yyyy'}}</div>
</div>
<div class="remove-post right" ng-click="removePost(post.id)">x</div>
</div>
<div class="post-content" ng-switch on="post.type">
<div ng-switch-when="text" class="post-text">{{post.content}}</div>
<div ng-switch-when="photo" class="post-photo">
<div class="photo-caption">{{post.photoCaption}}</div>
<img ng-src="{{post.content}}" />
</div>
<div ng-switch-default>{{post.content}}</div>
</div>
<div class="post-interaction cf">
<button class="button-like icomoon left" ng-click="likePost(post.id)">{{post.likeCount}}</button>
<button class="button-share icomoon left" ng-click="sharePost(post.id)">{{post.shareCount}}</button>
<div class="liked-by right">
<div class="liked-by-user"></div>
<div class="liked-by-user"></div>
<div class="liked-by-user"></div>
<div class="liked-by-user"></div>
</div>
</div>
</section>
<section class="post-bottom-half">
<div class="comments" ng-if="comments[post.id-1].commentList.length" ng-click="hideComments()">
<div class="comment-count icomoon">{{comments[post.id-1].commentList.length}} comment(s)</div>
<div class="comment cf" ng-repeat="entry in comments[post.id-1].commentList">
<div class="commenter-avatar left"></div>
<div class="commenter-entry left">
<div class="commenter-name">{{entry.name}} <span>{{entry.time}}</span></div>
<div class="commenter-comment">{{entry.comment}}</div>
</div>
</div>
</div>
</section>
</section>
</div>
</main>
</body>
</html>