Show communities on your home on desktop
This commit is contained in:
parent
d5c3121cb7
commit
ddd5bff147
|
@ -164,15 +164,17 @@ router.get(
|
|||
return res.render("index");
|
||||
}
|
||||
|
||||
const [posts, friends, secretMessages] = await Promise.all([
|
||||
const [posts, friends, secretMessages, communities] = await Promise.all([
|
||||
queries.getPosts(req.context.profile),
|
||||
queries.getFriends(req.context.profile),
|
||||
queries.getSecretMessages(req.context.profile),
|
||||
queries.getProfileCommunities(req.context.profile.id),
|
||||
]);
|
||||
res.render("home", {
|
||||
posts,
|
||||
friends,
|
||||
secretMessages,
|
||||
communities,
|
||||
profile: req.context.profile,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ nav {
|
|||
border: 1px solid #600;
|
||||
}
|
||||
|
||||
.friends-communities p {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.secret-chat {
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<p>You haven't joined any communities yet, explore some below to join</p>
|
||||
<% } %>
|
||||
<% participating.map(community => { %>
|
||||
<a href="/mobile/communities/<%= community %>" class="link-block">
|
||||
<a href="/communities/<%= community %>" class="link-block">
|
||||
#<%= community %>
|
||||
</a>
|
||||
<% }) %>
|
||||
|
@ -14,7 +14,7 @@
|
|||
<h1 style="margin-top: 40px; margin-bottom: 10px">Explore</h1>
|
||||
|
||||
<% communities.map(community => { %>
|
||||
<a href="/mobile/communities/<%= community %>" class="link-block">
|
||||
<a href="/communities/<%= community %>" class="link-block">
|
||||
#<%= community %>
|
||||
</a>
|
||||
<% }) %>
|
||||
|
|
|
@ -57,6 +57,16 @@
|
|||
<h2 style="margin-top: 30px">Requests Sent</h2>
|
||||
<%- include('_friends', { friends: friends.requestsSent }) %>
|
||||
<% } %>
|
||||
|
||||
<h2 style="margin-top: 30px">Communities</h2>
|
||||
<% communities.map(community => { %>
|
||||
<a href="/communities/<%= community %>" class="link-block">
|
||||
#<%= community %>
|
||||
</a>
|
||||
<% }) %>
|
||||
<% if (communities.length == 0) { %>
|
||||
<p>You haven't joined any communities yet</p>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue