diff --git a/app/lib/mobile-routes.js b/app/lib/mobile-routes.js index ac11b50..92adac5 100644 --- a/app/lib/mobile-routes.js +++ b/app/lib/mobile-routes.js @@ -90,10 +90,13 @@ module.exports.setupRoutes = (router) => { async (req, res) => { const name = req.params.name; - const posts = await queries.getCommunityPosts(name); + const [posts, members] = await Promise.all([ + queries.getCommunityPosts(name), + queries.getCommunityMembers(name), + ]); res.render("mobile/communities/community", { - community: { name }, + community: { name, members }, posts, layout: "mobile/_layout", }); diff --git a/app/public/mobile.css b/app/public/mobile.css index f1cb2f4..0b1a62f 100644 --- a/app/public/mobile.css +++ b/app/public/mobile.css @@ -196,3 +196,8 @@ a.compose-new-button { margin-top: 8px; border: 1px solid #bbb; } + +.link-block { + padding: 5px 0; + margin: 0; +} diff --git a/app/views/mobile/communities/community.ejs b/app/views/mobile/communities/community.ejs index 5534cda..fd6d859 100644 --- a/app/views/mobile/communities/community.ejs +++ b/app/views/mobile/communities/community.ejs @@ -8,13 +8,26 @@
+
-
- <% posts.map(post => { %> - " class="columns community-topic-link"> -
- <%= topicTitle(post.value) %> -
-
💬 <%= post.value.replies.length %> replies
-
- <% }) %> +
+ + +
+
+ +
\ No newline at end of file