aboutsummaryrefslogtreecommitdiff
path: root/Aamukampa.Core/Views.fs
diff options
context:
space:
mode:
Diffstat (limited to 'Aamukampa.Core/Views.fs')
-rw-r--r--Aamukampa.Core/Views.fs29
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 [] [