Added character comments

This commit is contained in:
Eduard Urbach 2018-11-01 15:06:04 +09:00
parent 5866683811
commit 942f45f04d
6 changed files with 19 additions and 7 deletions

View File

@ -14,6 +14,7 @@
"mixins/sidebar", "mixins/sidebar",
"mixins/anime-grid", "mixins/anime-grid",
"mixins/feature-card", "mixins/feature-card",
"mixins/comments",
"reset", "reset",
"base", "base",
"typography", "typography",

View File

@ -8,14 +8,14 @@ component Comments(parent arn.PostParent, user *arn.User)
Postable(post.ToPostable(), user, "", "") Postable(post.ToPostable(), user, "", "")
if user != nil if user != nil
if parent.IsLocked() if arn.IsLocked(parent)
footer.footer.mountable footer.footer.mountable
p.text-center= "This " + strings.ToLower(reflect.TypeOf(parent).Elem().Name()) + " is locked." p.text-center= "This " + strings.ToLower(reflect.TypeOf(parent).Elem().Name()) + " is locked."
else else
NewPostArea(user, "Comment") NewPostArea(user, "Comment")
.buttons .buttons
if !parent.IsLocked() if !arn.IsLocked(parent)
button.mountable.action(data-action="createPost", data-trigger="click", data-parent-type=reflect.TypeOf(parent).Elem().Name(), data-parent-id=parent.GetID()) button.mountable.action(data-action="createPost", data-trigger="click", data-parent-type=reflect.TypeOf(parent).Elem().Name(), data-parent-id=parent.GetID())
Icon("mail-reply") Icon("mail-reply")
span Reply span Reply

View File

@ -1,7 +1,3 @@
.anime-comments .anime-comments
[data-standalone-page="false"] [data-standalone-page="false"]
margin-top 1rem comments-left
.thread
max-width 600px
justify-content flex-start

View File

@ -60,6 +60,12 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
if mainQuote == nil || quote.ID != mainQuote.ID if mainQuote == nil || quote.ID != mainQuote.ID
Quote(quote, user) Quote(quote, user)
.character-section
h3.character-section-name.mountable Comments
.character-comments
Comments(character, user)
CharacterSidebar(character, friends, relevantCharacters, user) CharacterSidebar(character, friends, relevantCharacters, user)
component CharacterSidebar(character *arn.Character, friends []*arn.User, relevantCharacters []*arn.Character, user *arn.User) component CharacterSidebar(character *arn.Character, friends []*arn.User, relevantCharacters []*arn.Character, user *arn.User)

View File

@ -75,6 +75,9 @@
.character-section-name .character-section-name
font-weight bold font-weight bold
.character-comments
comments-left
> 1250px > 1250px
.character-page .character-page
horizontal horizontal

View File

@ -0,0 +1,6 @@
mixin comments-left
margin-top 1rem
.thread
max-width 600px
justify-content flex-start