juxtaposition-ui/src/webfiles/ctr/feed.ejs

74 lines
4.2 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3DS Testing</title>
<script src="/js/pjax.js"></script>
<script src="/js/juxt.js"></script>
<link rel="stylesheet" type="text/css" href="/css/juxt.css">
</head>
<body>
<div id="main">
<div class="top-screen">
<div class="header-description">
<p>
Here you can view posts and more from the users you follow.
</p>
</div>
<div id="headers-activity-feed-icon" class="header-icon"></div>
<h2 class="header-title">Activity Feed</h2>
</div>
<div class="bottom-screen">
<div class="community-page-posts-wrapper">
<div id="community-posts-inner-body">
<% if(posts.length === 0) {%>
<p class="no-posts-text">No Posts</p>
<%} else { %>
<button id="load-more-posts-button" onclick="loadFeedPosts()">Load More Posts</button>
<% posts.forEach(function(post) { %>
<div class="post-user-info-wrapper" id="<%= post.id %>">
<%if(post.verified) {%>
<img class="community-page-post-user-icon verified" src="<%= post.mii_face_url %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
<span class="community-page-verified-user-badge community-page-verified" style=""></span>
<%} else {%>
<img class="community-page-post-user-icon" src="<%= post.mii_face_url %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
<%}%>
<h2 class="community-page-post-username" data-pjax="/users/show?pid=<%= post.pid %>"><%= post.screen_name %></h2>
<h4 class="community-page-post-time-stamp"><%= moment(post.created_at).fromNow() %> - <a onclick="pjax.loadUrl('/communities/<%=communityMap.get(post.title_id + '-id')%>/new')"><%= communityMap.get(post.title_id) %></a></h4>
<div class="community-page-post-yeah-button-wrapper <%if(user.likes.indexOf(post.id) !== -1){ %> selected <%}%>">
<div class="community-page-post-yeah-button" onclick="yeah(this.parentNode, '<%= post.id %>')"></div>
</div>
<div id="yeah-<%= post.id %>" class="community-page-post-yeah-count"><%= post.empathy_count %> Yeahs</div>
</div>
<div class="community-page-post-wrapper">
<% if(post.body !== '' && post.painting === '' && post.screenshot === '' && !post.url) { %>
<h3><%= post.body %></h3>
<%} else { %>
<% if(post.screenshot !== '') { %>
<img id="<%= post.id %>" class="community-page-post-screenshot" src="data:image/png;base64,<%= post.screenshot %>">
<%}%>
<% if(post.painting !== '') { %>
<img id="<%= post.id%>" class="community-page-post-painting" src="<%= post.painting_uri %>">
<%}%>
<% if(post.url) { %>
<h3 style="font-weight: bolder; color: #4F279B">Video Playback is not yet supported on the 3DS</h3>
<%}%>
<% if(post.body) { %>
<div class="community-page-post-text-overlay">
<h3><%= post.body %></h3>
</div>
<%}%>
<%}%>
</div>
<% }); %>
<%}%>
</div>
</div>
<div class="toolbar-padding"></div>
</div>
<body onload="onStart()"></body>
</body>
</html>