From 6f055e1f7964e31b850e195e40e47eff93fe676d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Denuzi=C3=A8re?= Date: Fri, 5 May 2023 10:21:46 +0200 Subject: [PATCH] Minimal mode: remove navbar and unused files --- content/application/.template.config/template.json | 5 +++-- .../src/Bolero.Template.Client/wwwroot/index.html | 6 +++++- content/application/src/Bolero.Template.Server/Index.fs | 6 +++++- .../src/Bolero.Template.Server/Pages/_Host.cshtml | 6 +++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/content/application/.template.config/template.json b/content/application/.template.config/template.json index 3ba070f..5320d3c 100644 --- a/content/application/.template.config/template.json +++ b/content/application/.template.config/template.json @@ -128,9 +128,10 @@ { "condition": "(minimal)", "exclude": [ - "src/Bolero.Template.Server/data/books.json", "src/Bolero.Template.Server/BookService.fs", - "src/Bolero.Template.Client/wwwroot/main.html", + "src/Bolero.Template.Client/wwwroot/books.json", + "src/Bolero.Template.Client/wwwroot/favicon.ico", + "src/Bolero.Template.Client/wwwroot/css/*", "src/Bolero.Template.Client/Main.fs" ], "include": [ diff --git a/content/application/src/Bolero.Template.Client/wwwroot/index.html b/content/application/src/Bolero.Template.Client/wwwroot/index.html index 80e2d25..284267e 100644 --- a/content/application/src/Bolero.Template.Client/wwwroot/index.html +++ b/content/application/src/Bolero.Template.Client/wwwroot/index.html @@ -5,15 +5,18 @@ Bolero Application + - + + + +
Loading...
diff --git a/content/application/src/Bolero.Template.Server/Index.fs b/content/application/src/Bolero.Template.Server/Index.fs index c42b230..2f7f3ce 100644 --- a/content/application/src/Bolero.Template.Server/Index.fs +++ b/content/application/src/Bolero.Template.Server/Index.fs @@ -11,15 +11,18 @@ let page = doctypeHtml { meta { attr.name "viewport"; attr.content "width=device-width, initial-scale=1.0" } title { "Bolero Application" } ``base`` { attr.href "/" } +//#if (!minimal) link { attr.rel "stylesheet"; attr.href "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css" } - link { attr.rel "stylesheet"; attr.href "Bolero.Template.Client.styles.css" } link { attr.rel "stylesheet"; attr.href "css/index.css" } +//#endif + link { attr.rel "stylesheet"; attr.href "Bolero.Template.Client.styles.css" } //#if (pwa) link { attr.rel "manifest"; attr.href "manifest.json" } link { attr.rel "apple-touch-icon"; attr.sizes "512x512"; attr.href "icon-512.png" } //#endif } body { +//#if (!minimal) nav { attr.``class`` "navbar is-dark" "role" => "navigation" @@ -34,6 +37,7 @@ let page = doctypeHtml { } } } +//#endif div { attr.id "main"; comp } boleroScript //#if (pwa) diff --git a/content/application/src/Bolero.Template.Server/Pages/_Host.cshtml b/content/application/src/Bolero.Template.Server/Pages/_Host.cshtml index 51438c9..8f51bbe 100644 --- a/content/application/src/Bolero.Template.Server/Pages/_Host.cshtml +++ b/content/application/src/Bolero.Template.Server/Pages/_Host.cshtml @@ -9,15 +9,18 @@ Bolero Application + - + + + +
@(await Html.RenderComponentAsync(BoleroHostConfig))
@Html.RenderBoleroScript(BoleroHostConfig)