Discussion Tree View Improvements
This commit is contained in:
parent
8094a37aea
commit
955f7444f6
5 changed files with 48 additions and 16 deletions
|
@ -74,7 +74,7 @@ messageTreeW reply cReplies now t = go t
|
|||
go (Node mtn trees) = do
|
||||
messageW now mtn reply
|
||||
[whamlet|
|
||||
<div .#{cReplies}>
|
||||
<ul .#{cReplies}>
|
||||
$forall tree <- trees
|
||||
^{go tree}
|
||||
|]
|
||||
|
|
29
templates/discussion/widget/message.cassius
Normal file
29
templates/discussion/widget/message.cassius
Normal file
|
@ -0,0 +1,29 @@
|
|||
.message
|
||||
list-style-type: none
|
||||
background-color: #333
|
||||
border-radius: 10px
|
||||
margin-top: 1rem
|
||||
margin-bottom: 1rem
|
||||
margin-right: 0.25rem
|
||||
margin-left: -3rem
|
||||
padding: 1rem
|
||||
|
||||
.griddiv
|
||||
display: grid
|
||||
grid-template-columns: 1fr 1fr 1fr
|
||||
justify-items: stretch
|
||||
|
||||
.author
|
||||
grid-area: 1 / 1 / 1 / 1
|
||||
|
||||
.time
|
||||
grid-area: 1 / 3 / 1 / 3
|
||||
text-align: right
|
||||
|
||||
.content
|
||||
grid-area: 2 / 1 / 3 / 4
|
||||
text-align: left
|
||||
vertical-align: top
|
||||
|
||||
.reply
|
||||
grid-area: 4 / 1 / 4 / 1
|
|
@ -12,16 +12,19 @@ $# You should have received a copy of the CC0 Public Domain Dedication along
|
|||
$# with this software. If not, see
|
||||
$# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
^{actorLinkW author}
|
||||
<div>
|
||||
$case author
|
||||
$of MessageTreeNodeLocal lmid s
|
||||
<a href=@{MessageR (sharerIdent s) (encodeHid lmid)}>
|
||||
#{showTime $ messageCreated msg}
|
||||
$of MessageTreeNodeRemote h luMsg _luAuthor _mname
|
||||
<a href="#{renderObjURI $ ObjURI h luMsg}"}>
|
||||
#{showTime $ messageCreated msg}
|
||||
<div>
|
||||
^{showContent $ messageContent msg}
|
||||
<div>
|
||||
<a href=@{reply msgid}>reply
|
||||
<li .message>
|
||||
<div .griddiv>
|
||||
<span .author>
|
||||
^{actorLinkW author}
|
||||
<span .time>
|
||||
$case author
|
||||
$of MessageTreeNodeLocal lmid s
|
||||
<a href=@{MessageR (sharerIdent s) (encodeHid lmid)}>
|
||||
#{showTime $ messageCreated msg}
|
||||
$of MessageTreeNodeRemote h luMsg _luAuthor _mname
|
||||
<a href="#{renderObjURI $ ObjURI h luMsg}"}>
|
||||
#{showTime $ messageCreated msg}
|
||||
<span .content>
|
||||
^{showContent $ messageContent msg}
|
||||
<span .reply>
|
||||
<a href=@{reply msgid}>reply
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
*/
|
||||
|
||||
.#{cReplies}
|
||||
margin-left: 2em
|
||||
margin-left: 1em
|
||||
|
|
|
@ -15,6 +15,6 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|||
<div>
|
||||
<a href=@{topic}>new topic
|
||||
|
||||
<div>
|
||||
<ul .tree>
|
||||
$forall tree <- forest
|
||||
^{msgTree tree}
|
||||
|
|
Loading…
Reference in a new issue