aboutsummaryrefslogtreecommitdiff
path: root/Aamukampa.Core
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2025-08-03 16:07:43 +0300
committerJoel Stålnacke <joel@saker.fi>2025-08-03 16:07:43 +0300
commit05ea4501c05097e3c401c24f8c38d0d0db002e00 (patch)
tree3cca97eab1593d0d25fa5e60943330eb82a25c65 /Aamukampa.Core
parent83eb12a3f0f4a6764977ccbd9942f807cc7b2673 (diff)
Add a base path /tj
Fix deployment
Diffstat (limited to 'Aamukampa.Core')
-rw-r--r--Aamukampa.Core/Aamukampa.Core.fsproj1
-rw-r--r--Aamukampa.Core/Config.fs4
-rw-r--r--Aamukampa.Core/Views.fs29
3 files changed, 22 insertions, 12 deletions
diff --git a/Aamukampa.Core/Aamukampa.Core.fsproj b/Aamukampa.Core/Aamukampa.Core.fsproj
index bc6029f..c0afaae 100644
--- a/Aamukampa.Core/Aamukampa.Core.fsproj
+++ b/Aamukampa.Core/Aamukampa.Core.fsproj
@@ -7,6 +7,7 @@
<ItemGroup>
<Compile Include="Types.fs" />
+ <Compile Include="Config.fs" />
<Compile Include="Views.fs" />
<Compile Include="Library.fs" />
</ItemGroup>
diff --git a/Aamukampa.Core/Config.fs b/Aamukampa.Core/Config.fs
new file mode 100644
index 0000000..f960fb2
--- /dev/null
+++ b/Aamukampa.Core/Config.fs
@@ -0,0 +1,4 @@
+module Aamukampa.Core.Config
+
+[<Literal>]
+let pathBase = "/tj/"
diff --git a/Aamukampa.Core/Views.fs b/Aamukampa.Core/Views.fs
index 09bc236..a447688 100644
--- a/Aamukampa.Core/Views.fs
+++ b/Aamukampa.Core/Views.fs
@@ -1,10 +1,12 @@
-namespace TJLaskuri.Core.Views
+namespace Aamukampa.Core.Views
open System
+open System.IO
open Falco.Markup
open Elem
open Attr
open Text
+open Aamukampa.Core
module Document =
let view documentBody =
@@ -13,8 +15,8 @@ module Document =
meta [ charset "utf-8" ]
meta [ name "viewport"; content "width=device-width" ]
Elem.title [] [ raw "Aamukampa" ]
- script [ type' "module"; src "/js/app.js" ] []
- link [ rel "stylesheet"; href "/styles.css" ]
+ script [ type' "module"; src (Path.Combine(Config.pathBase, "js/app.js")) ] []
+ link [ rel "stylesheet"; href (Path.Combine(Config.pathBase, "styles.css")) ]
]
body [] [
documentBody
@@ -37,7 +39,7 @@ module Main =
enc (string <| Math.Ceiling model.TimeLeft.TotalDays)
]
Elem.span [ class' "counter_mornings" ] [
- raw " aamua"
+ raw "aamua"
]
]
@@ -45,20 +47,23 @@ module Main =
let p = 100.0 * (1.0 - model.TimeLeft / (model.TimeLeft + model.TimeCompleted))
let cssWidth = sprintf "%s%%" (p.ToString("F2"))
- div [
- class' "progress-bar_value"
- style <|
- sprintf "background-color: green; width: %s"
- cssWidth
- ] [
- span <| sprintf "%s %%" (p.ToString("F2"))
+ Elem.span [ class' "progress-bar_label" ] [
+ raw <| sprintf "%s %%" (p.ToString("F2"))
+ ]
+ div [ class' "progress-bar_bar" ] [
+ div [
+ class' "progress-bar_value"
+ style <|
+ sprintf "width: %s"
+ cssWidth
+ ] []
]
]
Elem.p [
style "text-align: center; font-size: 1.5rem;"
] [
- enc "2/25 347"
+ enc "2/25 255"
]
// div [] [