aboutsummaryrefslogtreecommitdiff
path: root/Aamukampa.Web/Views.fs
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2025-09-28 14:28:50 +0300
committerJoel Stålnacke <joel@saker.fi>2025-09-28 14:28:50 +0300
commit96aea2535a85c615111496f6d077eb0e9c9fa644 (patch)
treeaec23de7886fad7093e7a074befddc0bdd8ee348 /Aamukampa.Web/Views.fs
parent93fca308f19587a92715004c4ba83f3c0310625c (diff)
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.
Diffstat (limited to 'Aamukampa.Web/Views.fs')
-rw-r--r--Aamukampa.Web/Views.fs23
1 files changed, 23 insertions, 0 deletions
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
+ ]
+ ]