From 96aea2535a85c615111496f6d077eb0e9c9fa644 Mon Sep 17 00:00:00 2001 From: Joel Stålnacke Date: Sun, 28 Sep 2025 14:28:50 +0300 Subject: Move HTML views from Core to Web Fable can't bundle Falco.Markup because it's a compiled library, so we can't have templates on the frontend. --- Aamukampa.Web/Views.fs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Aamukampa.Web/Views.fs (limited to 'Aamukampa.Web/Views.fs') diff --git a/Aamukampa.Web/Views.fs b/Aamukampa.Web/Views.fs new file mode 100644 index 0000000..94392eb --- /dev/null +++ b/Aamukampa.Web/Views.fs @@ -0,0 +1,23 @@ +namespace Aamukampa.Web.Views + +open System +open Falco.Markup +open Elem +open Attr +open Text +open Aamukampa.Core + +module Document = + let view documentBody = + html [ lang "fi" ] [ + head [] [ + meta [ charset "utf-8" ] + meta [ name "viewport"; content "width=device-width" ] + Elem.title [] [ raw "Aamukampa" ] + link [ rel "stylesheet"; href (sprintf "%s%s" Config.pathBase "styles.css") ] + script [ type' "module"; src (sprintf "%s%s" Config.pathBase "app.js") ] [] + ] + body [] [ + documentBody + ] + ] -- cgit v1.2.3