From 05ea4501c05097e3c401c24f8c38d0d0db002e00 Mon Sep 17 00:00:00 2001 From: Joel Stålnacke Date: Sun, 3 Aug 2025 16:07:43 +0300 Subject: Add a base path /tj Fix deployment --- Aamukampa.Web/Aamukampa.Web.fsproj | 2 +- Aamukampa.Web/Modules/Index.fs | 2 +- Aamukampa.Web/Program.fs | 4 ++++ Aamukampa.Web/wwwroot/styles.css | 20 +++++++++----------- 4 files changed, 15 insertions(+), 13 deletions(-) (limited to 'Aamukampa.Web') diff --git a/Aamukampa.Web/Aamukampa.Web.fsproj b/Aamukampa.Web/Aamukampa.Web.fsproj index b9bf516..1e24cf4 100644 --- a/Aamukampa.Web/Aamukampa.Web.fsproj +++ b/Aamukampa.Web/Aamukampa.Web.fsproj @@ -21,7 +21,7 @@ diff --git a/Aamukampa.Web/Modules/Index.fs b/Aamukampa.Web/Modules/Index.fs index 2682028..b6aacb6 100644 --- a/Aamukampa.Web/Modules/Index.fs +++ b/Aamukampa.Web/Modules/Index.fs @@ -20,7 +20,7 @@ let get : HttpHandler = fun ctx -> let time = DateTime.Now let kontingent = kontingent 2 2025 - let timeLeft = Domain.getTimeLeft kontingent ThreeFourSeven time |> Option.get + let timeLeft = Domain.getTimeLeft kontingent TwoFiveFive time |> Option.get let completed = Domain.getTimeCompleted kontingent time |> Option.get view { diff --git a/Aamukampa.Web/Program.fs b/Aamukampa.Web/Program.fs index 92ff800..81ed098 100644 --- a/Aamukampa.Web/Program.fs +++ b/Aamukampa.Web/Program.fs @@ -2,6 +2,7 @@ open Microsoft.AspNetCore.Builder open Microsoft.Extensions.Hosting open Falco open Falco.Routing +open Aamukampa.Core open Aamukampa.Web.Modules let endpoints = [ @@ -15,6 +16,9 @@ let main args = app.MapStaticAssets() |> ignore + if (Config.pathBase.TrimEnd('/')) <> "" then + app.UsePathBase(Config.pathBase) |> ignore + app .UseRouting() .UseFalco(endpoints) diff --git a/Aamukampa.Web/wwwroot/styles.css b/Aamukampa.Web/wwwroot/styles.css index 66a6ef5..d492bd1 100644 --- a/Aamukampa.Web/wwwroot/styles.css +++ b/Aamukampa.Web/wwwroot/styles.css @@ -1,6 +1,5 @@ * { box-sizing: border-box; - max-width: none; } html { @@ -51,22 +50,21 @@ body { display: block; } -.progress-bar { - height: 25px; +.progress-bar_label { + display: inline-block; + width: 100%; + text-align: center; +} + +.progress-bar_bar { + height: 1.2rem; border-radius: 5px; border: 1px solid black; background-color: lightgrey; } .progress-bar_value { - color: white; + background-color: green; height: 100%; - display: flex; - padding: 0 10px; - justify-content: flex-end; - align-items: center; - white-space: nowrap; - text-align: center; border-radius: 5px; - min-width: 0; } -- cgit v1.2.3