Improved group page layout

This commit is contained in:
Eduard Urbach 2018-11-22 17:16:39 +09:00
parent eb38a65f78
commit c9e8cf7829
4 changed files with 13 additions and 9 deletions

View File

@ -8,7 +8,7 @@ component Comments(parent arn.PostParent, user *arn.User)
else if parent.TypeName() != "Group" || parent.(*arn.Group).FindMember(user.ID) != nil else if parent.TypeName() != "Group" || parent.(*arn.Group).FindMember(user.ID) != nil
NewPostArea(parent, user, "Comment") NewPostArea(parent, user, "Comment")
if user == nil && parent.CountPosts() == 0 if parent.CountPosts() == 0
p.no-data.mountable No comments have been written yet. p.no-data.mountable No comments have been written yet.
else else
each post in parent.PostsRelevantFirst(5) each post in parent.PostsRelevantFirst(5)

View File

@ -1,7 +1,7 @@
.group-view .group-view
vertical vertical
width 100% width 100%
max-width 900px max-width 650px
margin 0 auto margin 0 auto
.group-feed .group-feed
@ -24,18 +24,17 @@
.group-header-intro .group-header-intro
vertical vertical
align-self center
align-items center align-items center
margin-top content-padding margin-top content-padding
> 800px > 900px
.group-header .group-header
horizontal horizontal
align-items stretch
.group-header-intro .group-header-intro
margin-top 0 margin-top 0
margin-left calc(content-padding * 2) margin-left calc(content-padding * 2)
align-self flex-start
align-items flex-start align-items flex-start
.group-page-name .group-page-name

View File

@ -29,6 +29,11 @@ component GroupHeader(group *arn.Group, member *arn.GroupMember, user *arn.User)
.profile-actions(data-api="/api" + group.Link()) .profile-actions(data-api="/api" + group.Link())
if member == nil if member == nil
if group.Restricted
button.profile-action.mountable.never-unmount
Icon("lock")
span Locked group
else
button.profile-action.action.mountable.never-unmount(data-action="join", data-trigger="click") button.profile-action.action.mountable.never-unmount(data-action="join", data-trigger="click")
Icon("user-plus") Icon("user-plus")
span Join group span Join group

View File

@ -6,5 +6,5 @@ component GroupTabs(group *arn.Group, member *arn.GroupMember, user *arn.User)
if member != nil && member.Role == "founder" if member != nil && member.Role == "founder"
Tab("Edit", "pencil", group.Link() + "/edit") Tab("Edit", "pencil", group.Link() + "/edit")
Tab("Edit image", "image", group.Link() + "/edit/image") Tab("Image", "image", group.Link() + "/edit/image")
Tab("History", "history", group.Link() + "/history") Tab("History", "history", group.Link() + "/history")