drame update

This commit is contained in:
Swrup 2024-12-27 18:50:01 +01:00
parent b5c70ed7dd
commit 1083ce3f2e
6 changed files with 22 additions and 17 deletions

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
let get request =

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
let contact_img = { name = "contact.png"; alt = { fr = ""; en = "" } }

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
let get request =

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
(* projects data is in data/projects.scfg

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
let services request =

View File

@ -1,5 +1,5 @@
open Drame
open Html
open Tyxml.Html
open Lang
(* wrap all elements of l wi a <li> to make a <ul> *)
@ -146,14 +146,19 @@ let render request ?title:title_txt ?(scripts = []) ?(styles = []) ~h1 content =
let lang = Format.asprintf "%a" Lang.pp (Lang.of_request request) in
html
~a:[ a_lang lang ]
head
(body
[ topbar
; main
[ Tyxml.Html.h1 ~a:[ a_class [ "hidden" ] ] [ txt_choice request h1 ]
; div [ content ]
]
; footer [ lang_choice ]
] )
let doc =
html
~a:[ a_lang lang ]
head
(body
[ topbar
; main
[ Tyxml.Html.h1
~a:[ a_class [ "hidden" ] ]
[ txt_choice request h1 ]
; div [ content ]
]
; footer [ lang_choice ]
] )
in
Html_doc.of_tyxml doc