Global message supports markdown using commonmark notation
global message is now input using a TextArea so multiple lines can be
used
This commit is contained in:
Tea 2024-04-16 18:51:22 +02:00
parent c53289b218
commit 53e5a0ac25
3 changed files with 13 additions and 3 deletions

View file

@ -7,10 +7,19 @@
} }
@if (GlobalStuffService.Message.Length >= 2) @if (GlobalStuffService.Message.Length >= 2)
{ {
<p style="font-size: 1.5em; color: limegreen;"> @GlobalStuffService.Message </p> <div class="global_message"> @((MarkupString)Markdig.Markdown.ToHtml(GlobalStuffService.Message)) </div>
} }
<style>
.global_message > * {
color: limegreen;
}
.global_message > p {
font-size: 1.5em;
}
</style>
@code{ @code{
protected override void OnInitialized() protected override void OnInitialized()
{ {

View file

@ -25,7 +25,7 @@
<h4>Global Message</h4> <h4>Global Message</h4>
<InputText @bind-Value=GlobalMessage id="Message" /> <InputTextArea @bind-Value=GlobalMessage id="Message" />
<button @onclick="SetGlobalMessage"> <button @onclick="SetGlobalMessage">
Confirm Message Confirm Message
</button> </button>

View file

@ -15,6 +15,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="8.0.2" /> <PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">