Do a very lazy rendering of a "from" field in Golem

parent 93db0d32
......@@ -99,6 +99,12 @@
#:content-type #"application/activity+json")]
;; Return the html page
[else
(define (header-entry key content)
`(div (@ (class "feedish-header-entry"))
(b (@ (class "header-key"))
,(string-append key ": "))
(span (@ (class "header-content"))
,content)))
;; Render a collection, but only one item from that collection
;; TODO: move this to the templates section?
(define (preview-collection col-sym col-name col-handler)
......@@ -114,7 +120,10 @@
(store-get-json post-uri))
(define object
(store-get-json (hash-ref activity 'object)))
`(p ,(hash-ref object 'content))])))
`(div (@ (class "feedish-top-post feedish-post"))
(div (@ (class "feedish-header"))
,(header-entry "From" (hash-ref activity 'actor)))
(p ,(hash-ref object 'content)))])))
(render-ok
(generic-base-tmpl
`(div ,(post-note-form)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment