Improved posts style
This commit is contained in:
parent
a0ee24e81e
commit
2074d81e69
@ -22,7 +22,8 @@
|
|||||||
"headers",
|
"headers",
|
||||||
"input",
|
"input",
|
||||||
"grid",
|
"grid",
|
||||||
"forum",
|
"post",
|
||||||
|
"thread",
|
||||||
"tabs",
|
"tabs",
|
||||||
"tags",
|
"tags",
|
||||||
"user",
|
"user",
|
||||||
|
@ -11,4 +11,4 @@ component Comments(parent arn.PostParent, user *arn.User)
|
|||||||
//- 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)
|
||||||
Postable(post, user, true, "", "")
|
Postable(post, user, true, "")
|
@ -1,13 +1,16 @@
|
|||||||
component Postable(post arn.Postable, user *arn.User, includeReplies bool, headerContent string, highlightAuthorID string)
|
component Postable(post arn.Postable, user *arn.User, includeReplies bool, highlightAuthorID string)
|
||||||
.post.mountable(id=strings.ToLower(post.TypeName()) + "-" + fmt.Sprint(post.GetID()), data-pro=post.Creator().IsPro(), data-api="/api/" + strings.ToLower(post.TypeName()) + "/" + post.GetID())
|
.post.mountable(id=strings.ToLower(post.TypeName()) + "-" + fmt.Sprint(post.GetID()), data-pro=post.Creator().IsPro(), data-api="/api/" + strings.ToLower(post.TypeName()) + "/" + post.GetID())
|
||||||
.post-parent
|
.post-parent
|
||||||
.post-author
|
.post-author
|
||||||
Avatar(post.Creator())
|
Avatar(post.Creator())
|
||||||
|
|
||||||
.post-content(data-highlight=post.Creator().ID == highlightAuthorID)
|
.post-content(data-highlight=post.Creator().ID == highlightAuthorID)
|
||||||
if headerContent != ""
|
.post-header
|
||||||
div!= headerContent
|
.post-creator
|
||||||
|
a(href=post.Creator().Link())= post.Creator().Nick
|
||||||
|
|
||||||
|
.post-date.utc-date(data-date=post.GetCreated())
|
||||||
|
|
||||||
div(id="render-" + post.GetID())!= post.HTML()
|
div(id="render-" + post.GetID())!= post.HTML()
|
||||||
|
|
||||||
if user != nil && user.ID == post.Creator().ID
|
if user != nil && user.ID == post.Creator().ID
|
||||||
@ -25,8 +28,6 @@ component Postable(post arn.Postable, user *arn.User, includeReplies bool, heade
|
|||||||
a.button.post-cancel-edit.action(data-action="editPost", data-trigger="click", data-id=post.GetID())
|
a.button.post-cancel-edit.action(data-action="editPost", data-trigger="click", data-id=post.GetID())
|
||||||
Icon("close")
|
Icon("close")
|
||||||
span Cancel
|
span Cancel
|
||||||
|
|
||||||
.post-date.utc-date.no-tip(data-date=post.GetCreated())
|
|
||||||
|
|
||||||
.post-toolbar(id="toolbar-" + post.GetID())
|
.post-toolbar(id="toolbar-" + post.GetID())
|
||||||
.spacer
|
.spacer
|
||||||
@ -59,4 +60,4 @@ component Postable(post arn.Postable, user *arn.User, includeReplies bool, heade
|
|||||||
.replies(id="replies-" + post.GetID())
|
.replies(id="replies-" + post.GetID())
|
||||||
if includeReplies
|
if includeReplies
|
||||||
each reply in post.Posts()
|
each reply in post.Posts()
|
||||||
Postable(reply, user, true, "", highlightAuthorID)
|
Postable(reply, user, true, highlightAuthorID)
|
||||||
|
@ -2,4 +2,4 @@ component PostableList(postables []arn.Postable, user *arn.User)
|
|||||||
.thread
|
.thread
|
||||||
.posts
|
.posts
|
||||||
each post in postables
|
each post in postables
|
||||||
Postable(post, user, false, "", "")
|
Postable(post, user, false, "")
|
||||||
|
@ -30,8 +30,8 @@ component Activity(activity arn.Activity, user *arn.User)
|
|||||||
.post-author
|
.post-author
|
||||||
Avatar(activity.Creator())
|
Avatar(activity.Creator())
|
||||||
.post-content
|
.post-content
|
||||||
.activity-header
|
.post-header
|
||||||
.activity-creator
|
.post-creator
|
||||||
a(href=activity.Creator().Link())= activity.Creator().Nick
|
a(href=activity.Creator().Link())= activity.Creator().Nick
|
||||||
|
|
||||||
if activity.TypeName() == "ActivityCreate"
|
if activity.TypeName() == "ActivityCreate"
|
||||||
@ -49,7 +49,7 @@ component Activity(activity arn.Activity, user *arn.User)
|
|||||||
button.activity-action.tip.action(data-action="deleteObject", data-trigger="click", aria-label="Delete", data-return-path="/activity", data-confirm-type="activity")
|
button.activity-action.tip.action(data-action="deleteObject", data-trigger="click", aria-label="Delete", data-return-path="/activity", data-confirm-type="activity")
|
||||||
RawIcon("trash")
|
RawIcon("trash")
|
||||||
|
|
||||||
.activity-date.utc-date(data-date=activity.GetCreated())
|
.post-date.utc-date(data-date=activity.GetCreated())
|
||||||
|
|
||||||
if activity.TypeName() == "ActivityCreate"
|
if activity.TypeName() == "ActivityCreate"
|
||||||
ActivityCreateText(activity.(*arn.ActivityCreate), user)
|
ActivityCreateText(activity.(*arn.ActivityCreate), user)
|
||||||
|
@ -9,19 +9,6 @@
|
|||||||
.activity-action
|
.activity-action
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
.activity-header
|
|
||||||
horizontal
|
|
||||||
horizontal-line-bottom
|
|
||||||
|
|
||||||
.activity-creator
|
|
||||||
flex 1
|
|
||||||
|
|
||||||
.activity-date
|
|
||||||
color hsla(text-color-h, text-color-s, text-color-l, 0.5)
|
|
||||||
|
|
||||||
.actvity-text-create
|
|
||||||
opacity 0.8
|
|
||||||
|
|
||||||
.activity-text-consume-anime
|
.activity-text-consume-anime
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
component Post(post *arn.Post, user *arn.User)
|
component Post(post *arn.Post, user *arn.User)
|
||||||
.thread
|
.thread
|
||||||
.posts
|
.posts
|
||||||
Postable(post, user, true, "", "")
|
Postable(post, user, true, "")
|
||||||
|
|
||||||
.side-note-container.mountable
|
.side-note-container.mountable
|
||||||
if user != nil && user.Role == "admin"
|
if user != nil && user.Role == "admin"
|
||||||
|
@ -3,7 +3,7 @@ component Thread(thread *arn.Thread, user *arn.User)
|
|||||||
|
|
||||||
#thread.thread(data-id=thread.ID)
|
#thread.thread(data-id=thread.ID)
|
||||||
.posts
|
.posts
|
||||||
Postable(thread, user, true, "", thread.Creator().ID)
|
Postable(thread, user, true, thread.Creator().ID)
|
||||||
|
|
||||||
//- Reply
|
//- Reply
|
||||||
if user != nil
|
if user != nil
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
post-content-padding-y = 0.75rem
|
post-content-padding-y = 0.75rem
|
||||||
|
|
||||||
.thread-link
|
.post-author
|
||||||
vertical
|
horizontal
|
||||||
margin 0.25rem 0
|
justify-content center
|
||||||
|
align-items flex-start
|
||||||
|
margin-right post-avatar-text-margin
|
||||||
|
|
||||||
.post-author
|
.post-header
|
||||||
margin-bottom 0.25rem
|
horizontal
|
||||||
|
horizontal-line-bottom
|
||||||
|
|
||||||
> 330px
|
.post-creator
|
||||||
.thread-link
|
flex 1
|
||||||
horizontal
|
|
||||||
|
|
||||||
.post-author
|
.post-date
|
||||||
margin-bottom 0
|
color hsla(text-color-h, text-color-s, text-color-l, 0.5)
|
||||||
|
white-space nowrap
|
||||||
.user-image
|
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
|
|
||||||
.post-content
|
.post-content
|
||||||
ui-element
|
ui-element
|
||||||
@ -49,40 +48,6 @@ post-content-padding-y = 0.75rem
|
|||||||
.post-toolbar
|
.post-toolbar
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
.post-date
|
|
||||||
opacity 0.25
|
|
||||||
|
|
||||||
.thread-content
|
|
||||||
horizontal
|
|
||||||
ui-element
|
|
||||||
padding 0.4rem 1rem
|
|
||||||
align-items center
|
|
||||||
|
|
||||||
.thread-icons,
|
|
||||||
.thread-reply-count
|
|
||||||
horizontal
|
|
||||||
align-items center
|
|
||||||
opacity 0.5
|
|
||||||
text-align right
|
|
||||||
font-size 0.9rem
|
|
||||||
|
|
||||||
.thread-reply-count
|
|
||||||
margin-right 0.5rem
|
|
||||||
|
|
||||||
.thread-content-container
|
|
||||||
flex 1
|
|
||||||
vertical
|
|
||||||
justify-content center
|
|
||||||
|
|
||||||
.thread-link-title
|
|
||||||
color text-color
|
|
||||||
|
|
||||||
.post-author
|
|
||||||
horizontal
|
|
||||||
justify-content center
|
|
||||||
align-items flex-start
|
|
||||||
margin-right post-avatar-text-margin
|
|
||||||
|
|
||||||
.new-post-actions
|
.new-post-actions
|
||||||
justify-content flex-end
|
justify-content flex-end
|
||||||
opacity 0
|
opacity 0
|
||||||
@ -102,8 +67,6 @@ post-content-padding-y = 0.75rem
|
|||||||
button
|
button
|
||||||
pointer-events all
|
pointer-events all
|
||||||
|
|
||||||
// Toolbar
|
|
||||||
|
|
||||||
.post-toolbar
|
.post-toolbar
|
||||||
horizontal
|
horizontal
|
||||||
opacity 0
|
opacity 0
|
||||||
@ -136,7 +99,7 @@ post-content-padding-y = 0.75rem
|
|||||||
color delete-color
|
color delete-color
|
||||||
|
|
||||||
.post-save
|
.post-save
|
||||||
//
|
// ...
|
||||||
|
|
||||||
.post-edit-interface
|
.post-edit-interface
|
||||||
vertical
|
vertical
|
||||||
@ -145,13 +108,4 @@ post-content-padding-y = 0.75rem
|
|||||||
margin-bottom post-content-padding-y
|
margin-bottom post-content-padding-y
|
||||||
|
|
||||||
.post-text-input
|
.post-text-input
|
||||||
min-height 200px
|
min-height 200px
|
||||||
|
|
||||||
.post-date
|
|
||||||
position absolute
|
|
||||||
right -1rem
|
|
||||||
top 0.25rem
|
|
||||||
white-space nowrap
|
|
||||||
opacity 0
|
|
||||||
transform translateX(100%)
|
|
||||||
default-transition
|
|
42
styles/thread.scarlet
Normal file
42
styles/thread.scarlet
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
.thread-link
|
||||||
|
vertical
|
||||||
|
margin 0.25rem 0
|
||||||
|
|
||||||
|
.post-author
|
||||||
|
margin-bottom 0.25rem
|
||||||
|
|
||||||
|
> 330px
|
||||||
|
.thread-link
|
||||||
|
horizontal
|
||||||
|
|
||||||
|
.post-author
|
||||||
|
margin-bottom 0
|
||||||
|
|
||||||
|
.user-image
|
||||||
|
width 42px
|
||||||
|
height 42px
|
||||||
|
|
||||||
|
.thread-content
|
||||||
|
horizontal
|
||||||
|
ui-element
|
||||||
|
padding 0.4rem 1rem
|
||||||
|
align-items center
|
||||||
|
|
||||||
|
.thread-icons,
|
||||||
|
.thread-reply-count
|
||||||
|
horizontal
|
||||||
|
align-items center
|
||||||
|
opacity 0.5
|
||||||
|
text-align right
|
||||||
|
font-size 0.9rem
|
||||||
|
|
||||||
|
.thread-reply-count
|
||||||
|
margin-right 0.5rem
|
||||||
|
|
||||||
|
.thread-content-container
|
||||||
|
flex 1
|
||||||
|
vertical
|
||||||
|
justify-content center
|
||||||
|
|
||||||
|
.thread-link-title
|
||||||
|
color text-color
|
Loading…
Reference in New Issue
Block a user