Skip to content

Instantly share code, notes, and snippets.

@kasuken
Created November 21, 2022 12:08
Show Gist options
  • Save kasuken/b36d9dbde5509705781cbd648eba1e98 to your computer and use it in GitHub Desktop.
Save kasuken/b36d9dbde5509705781cbd648eba1e98 to your computer and use it in GitHub Desktop.
Blazor - write in the console.log with styles
@code {
@inject IJSRuntime JSRuntime
protected override async Task OnInitializedAsync()
{
await JSRuntime.InvokeVoidAsync("console.log", "%cRed Origin 5.0.1 🚀", "color:#0dd8d8; background:#0b1021; font-size:1.5rem; padding:0.15rem 0.25rem; margin: 1rem auto; font-family: Rockwell; border: 2px solid #0dd8d8; border-radius: 4px;font-weight: bold; text-shadow: 1px 1px 1px #00af87bf;");
}
}
@kasuken
Copy link
Author

kasuken commented Nov 21, 2022

Result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment