Show name and post number in post intro
- still missing accurate links, timestamp
This commit is contained in:
parent
9269448477
commit
388c9a5b28
|
@ -26,9 +26,11 @@ intro :: Post -> View a
|
||||||
intro post = span_
|
intro post = span_
|
||||||
[ class_ "intro" ]
|
[ class_ "intro" ]
|
||||||
( subject ++
|
( subject ++
|
||||||
[ span_
|
[ " "
|
||||||
[ class_ "name" ][ "Anonymous" ]
|
, span_
|
||||||
|
[ class_ "name" ][ text name ]
|
||||||
-- TODO: Add flags (don't have that data in the db yet)
|
-- TODO: Add flags (don't have that data in the db yet)
|
||||||
|
, " "
|
||||||
, time_
|
, time_
|
||||||
[ textProp "datetime" "2024-01-19T11:53:33Z"
|
[ textProp "datetime" "2024-01-19T11:53:33Z"
|
||||||
, textProp "data-local" "true"
|
, textProp "data-local" "true"
|
||||||
|
@ -43,7 +45,7 @@ intro post = span_
|
||||||
, a_
|
, a_
|
||||||
[ class_ "post_no"
|
[ class_ "post_no"
|
||||||
, href_ "/leftypol/res/477700.html#q477700"
|
, href_ "/leftypol/res/477700.html#q477700"
|
||||||
][ "477700" ]
|
][ text $ toMisoString $ show $ Post.board_post_id post ]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -51,6 +53,9 @@ intro post = span_
|
||||||
subject :: [ View a ]
|
subject :: [ View a ]
|
||||||
subject = map (mkSubject . toMisoString) $ toList $ Post.subject post
|
subject = map (mkSubject . toMisoString) $ toList $ Post.subject post
|
||||||
|
|
||||||
|
name :: JSString
|
||||||
|
name = maybe "Anonymous" toMisoString $ Post.name post
|
||||||
|
|
||||||
mkSubject :: JSString -> View a
|
mkSubject :: JSString -> View a
|
||||||
mkSubject s = span_
|
mkSubject s = span_
|
||||||
[ class_ "subject" ]
|
[ class_ "subject" ]
|
||||||
|
|
|
@ -35,6 +35,7 @@ import qualified Network.BoardType as Board
|
||||||
import qualified Network.ThreadType as Thread
|
import qualified Network.ThreadType as Thread
|
||||||
import Component.Thread.Files (files)
|
import Component.Thread.Files (files)
|
||||||
import Component.Thread.Intro (intro)
|
import Component.Thread.Intro (intro)
|
||||||
|
import BodyParser
|
||||||
|
|
||||||
data Model = Model
|
data Model = Model
|
||||||
{ site :: Site
|
{ site :: Site
|
||||||
|
|
Loading…
Reference in New Issue