In a JSON file, appsettings can be a nested heirachy, e.g.
{
"Top": {
"Second": {
"Key": "value"
}
}
| @* see DevOnly at https://gist.github.com/conficient/aca15e92931a15d76047cee598df2e0c *@ | |
| @* a small coloured badge appears on the top right of the screen to show the current Bootstrap 4.x | |
| screen breakpoint (see https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints) | |
| This component can be put into your `MainLayout.razor` template so it appears on every page. | |
| It's wrapped in a `<DevOnly>` component, so will only render in Debug mode. In production it won't appear. | |
| *@ | |
| <DevOnly> | |
| <div style="position:absolute; top: 10px; right: 10px;"> | |
| <span class="badge badge-primary d-none d-xl-inline">xl</span> | |
| <span class="badge badge-info d-none d-lg-inline d-xl-none">lg</span> |
| @using Microsoft.Extensions.Hosting | |
| @inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env | |
| @if (isDevelopment) | |
| { | |
| @ChildContent | |
| } | |
| @code { | |
| [Parameter] public RenderFragment ChildContent { get; set; } |
| using FlightFinder.Shared; | |
| using Microsoft.AspNetCore.Components; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net.Http; | |
| using System.Threading.Tasks; | |
| namespace FlightFinder.Client.Services | |
| { | |
| public class AppState |
| <button class="btn btn-primary" @onclick="@ModalShow">Show Dialog!</button> | |
| @if (showModal) | |
| { | |
| <div class="modal fade show" id="myModal" style="display:block" aria-modal="true" role="dialog"> | |
| <div class="modal-dialog"> | |
| <div class="modal-content"> | |
| <!-- Modal Header --> | |
| <div class="modal-header"> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="//cdn.tinymce.com/4/tinymce.min.js"></script> | |
| <script>tinymce.init({ selector:'textarea' });</script> | |
| </head> | |
| <body> | |
| <textarea>Easy (and free!) You should check out our premium features.</textarea> | |
| </body> | |
| </html> |
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; | |
| } | |
| .d0 { width: 100%; padding:0; margin:0 } |