From 394f69c6e7eebb96ad05c4f45ba38703b0d05642 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Tue, 14 Mar 2023 20:24:11 +1300 Subject: [PATCH] Draft CatTrap integration (layout code). --- src/Main.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index 43b72b4..35155c9 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -28,7 +28,10 @@ import Stylist (cssPriorityAgent, cssPriorityUser, attrTest, elementPa import Stylist.Tree (treeFind) import Data.HTML2CSS (el2stylist) -import Graphics.Layout.CSS (CSSBox(..), finalizeCSS) +import Graphics.Layout.CSS (CSSBox(..), finalizeCSS') +import Graphics.Layout.CSS.Internal (placeholderFont) +import Graphics.Layout.Box (zeroBox, PaddedBox(..), Size(..)) +import Graphics.Layout (boxLayout) import Data.Maybe (fromMaybe) import System.Environment (getArgs) @@ -121,4 +124,8 @@ main = do let style = CSSTxt.resolve $ inlinePseudos' $ stylize css' $ el2stylist $ documentRoot $ html page + let outerbox = zeroBox -- FIXME: Parameterize! + let sysfont = placeholderFont -- FIXME: Parameterize! + let layout = boxLayout zeroBox (finalizeCSS' sysfont style) False + putStrLn "Hello, Haskell!" -- 2.30.2