-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* RCL.Demo - Demos improved
- Loading branch information
Showing
9 changed files
with
190 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
BlazorBootstrap.Demo.RCL/Components/Shared/Enums/LanguageCode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
namespace BlazorBootstrap.Demo.RCL; | ||
|
||
/// <summary> | ||
/// <see href="https://prismjs.com/#supported-languages" /> | ||
/// </summary> | ||
public enum LanguageCode | ||
{ | ||
/// <summary> | ||
/// ASP.NET (C#) - aspnet | ||
/// </summary> | ||
AspNet, | ||
|
||
/// <summary> | ||
/// C# - csharp, cs, dotnet | ||
/// </summary> | ||
CSharp, | ||
|
||
/// <summary> | ||
/// CSS - css | ||
/// </summary> | ||
Css, | ||
|
||
/// <summary> | ||
/// HTML - html | ||
/// </summary> | ||
HTML, | ||
|
||
/// <summary> | ||
/// JavaScript - javascript, js | ||
/// </summary> | ||
JavaScript, | ||
|
||
/// <summary> | ||
/// JSON - json | ||
/// </summary> | ||
JSON, | ||
|
||
/// <summary> | ||
/// JSONP - jsonp | ||
/// </summary> | ||
JSONP, | ||
|
||
/// <summary> | ||
/// Markdown - md | ||
/// </summary> | ||
Markdown, | ||
|
||
/// <summary> | ||
/// PowerShell - powershell | ||
/// </summary> | ||
PowerShell, | ||
|
||
/// <summary> | ||
/// Razor C# - cshtml, razor | ||
/// </summary> | ||
Razor, | ||
|
||
/// <summary> | ||
/// Text - none | ||
/// </summary> | ||
Text, | ||
|
||
/// <summary> | ||
/// YAML - yaml, yml | ||
/// </summary> | ||
YAML | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
BlazorBootstrap.Demo.RCL/Components/Shared/Extensions/EnumExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace BlazorBootstrap.Demo.RCL; | ||
|
||
public static class EnumExtensions | ||
{ | ||
public static string? ToLanguageCssClass(this LanguageCode languageCode) => | ||
languageCode switch | ||
{ | ||
LanguageCode.AspNet => "language-aspnet", | ||
LanguageCode.CSharp => "language-csharp", | ||
LanguageCode.JavaScript => "language-js", | ||
LanguageCode.JSON => "language-json", | ||
LanguageCode.JSONP => "language-jsonp", | ||
LanguageCode.Markdown => "language-md", | ||
LanguageCode.PowerShell => "language-powershell", | ||
LanguageCode.Razor => "language-razor", | ||
LanguageCode.Text => "language-none", | ||
LanguageCode.YAML => "language-yaml", | ||
_ => null | ||
}; | ||
} |
Oops, something went wrong.