b
This commit is contained in:
commit
6fd066773f
37 changed files with 1537 additions and 0 deletions
15
src/template.ml
Normal file
15
src/template.ml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
open Tyxml
|
||||
|
||||
let render ~page_title ~scripts content =
|
||||
let open Html in
|
||||
let head =
|
||||
head
|
||||
(title (txt page_title))
|
||||
( [ link ~rel:[ `Icon ] ~href:"/assets/img/favicon.png" ()
|
||||
; link ~rel:[ `Stylesheet ] ~href:"/assets/css/style.css" ()
|
||||
]
|
||||
@ scripts )
|
||||
in
|
||||
let body = body [ main [ content ] ] in
|
||||
let page = html head body in
|
||||
Format.asprintf "%a@." (pp ~indent:true ()) page
|
||||
Loading…
Add table
Add a link
Reference in a new issue