Skip to content

Commit

Permalink
Minimal mode: remove navbar and unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed May 5, 2023
1 parent 8133053 commit 6f055e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 3 additions & 2 deletions content/application/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bolero Application</title>
<base href="/">
<!-- //#if (!minimal) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">
<link rel="stylesheet" href="Bolero.Template.Client.styles.css">
<link rel="stylesheet" href="css/index.css">
<!-- //#endif -->
<link rel="stylesheet" href="Bolero.Template.Client.styles.css">
<!-- //#if (pwa) -->
<link href="manifest.json" rel="manifest" />
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
<!-- //#endif -->
</head>
<body>
<!-- //#if (!minimal) -->
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item has-text-weight-bold is-size-5" href="https://fsbolero.io">
Expand All @@ -23,6 +26,7 @@
</a>
</div>
</nav>
<!-- //#endif -->
<div id="main">Loading...</div>
<script src="_framework/blazor.webassembly.js"></script>
<!-- //#if (pwa) -->
Expand Down
6 changes: 5 additions & 1 deletion content/application/src/Bolero.Template.Server/Index.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -34,6 +37,7 @@ let page = doctypeHtml {
}
}
}
//#endif
div { attr.id "main"; comp<Client.Main.MyApp> }
boleroScript
//#if (pwa)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bolero Application</title>
<base href="/">
<!-- //#if (!minimal) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">
<link rel="stylesheet" href="Bolero.Template.Client.styles.css">
<link rel="stylesheet" href="css/index.css">
<!-- //#endif -->
<link rel="stylesheet" href="Bolero.Template.Client.styles.css">
<!-- //#if (pwa) -->
<link href="manifest.json" rel="manifest" />
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
<!-- //#endif -->
</head>
<body>
<!-- //#if (!minimal) -->
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item has-text-weight-bold is-size-5" href="https://fsbolero.io">
Expand All @@ -27,6 +30,7 @@
</a>
</div>
</nav>
<!-- //#endif -->
<div id="main">@(await Html.RenderComponentAsync<Bolero.Template.Client.Main.MyApp>(BoleroHostConfig))</div>
@Html.RenderBoleroScript(BoleroHostConfig)
<!-- //#if (pwa) -->
Expand Down

0 comments on commit 6f055e1

Please sign in to comment.