feat: create partial for spinner, register as handlebars template

This commit is contained in:
Oliver Booth 2023-08-11 02:06:31 +01:00
parent 06fab21cd5
commit 95b7ed0ae7
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61
3 changed files with 10 additions and 5 deletions

View File

@ -2,11 +2,7 @@
@model OliverBooth.Pages.Blog.Index
<div id="all-blog-posts">
<div id="blog-loading-spinner" class="d-flex justify-content-center">
<div class="spinner-border text-light" role="status">
<p class="text-center sr-only">Loading...</p>
</div>
</div>
@await Html.PartialAsync("_LoadingSpinner")
</div>
<script id="blog-post-template" type="text/x-handlebars-template">

View File

@ -74,6 +74,10 @@
<script src="~/js/prism.min.js" asp-append-version="true" data-manual></script>
<script src="~/js/app.min.js" asp-append-version="true"></script>
<script id="loading-spinner-template" type="text/x-handlebars-template">
@await Html.PartialAsync("_LoadingSpinner")
</script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

View File

@ -0,0 +1,5 @@
<div id="blog-loading-spinner" class="d-flex justify-content-center">
<div class="spinner-border text-light" role="status">
<p class="text-center sr-only">Loading...</p>
</div>
</div>