diff options
| author | Joel Stålnacke <joel@saker.fi> | 2025-08-03 16:07:43 +0300 |
|---|---|---|
| committer | Joel Stålnacke <joel@saker.fi> | 2025-08-03 16:07:43 +0300 |
| commit | 05ea4501c05097e3c401c24f8c38d0d0db002e00 (patch) | |
| tree | 3cca97eab1593d0d25fa5e60943330eb82a25c65 /Aamukampa.Core/Views.fs | |
| parent | 83eb12a3f0f4a6764977ccbd9942f807cc7b2673 (diff) | |
Add a base path /tj
Fix deployment
Diffstat (limited to 'Aamukampa.Core/Views.fs')
| -rw-r--r-- | Aamukampa.Core/Views.fs | 29 |
1 files changed, 17 insertions, 12 deletions
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 [] [ |
