@@ -75,7 +83,14 @@
{
@desc.Title |
- @Html.Raw(desc.Description) |
+ @Html.Raw(desc.Description)
+ @if (desc.CodeExample.IsNotNullOrEmpty())
+ {
+ Example:
+
+ @Html.Raw(Markdig.Markdown.ToHtml(desc.CodeExample, pipeline))
+
+ } |
}
diff --git a/OmegaLeo.HelperLib.Web/Views/Shared/_Layout.cshtml b/OmegaLeo.HelperLib.Web/Views/Shared/_Layout.cshtml
index d2eff25..3e42232 100644
--- a/OmegaLeo.HelperLib.Web/Views/Shared/_Layout.cshtml
+++ b/OmegaLeo.HelperLib.Web/Views/Shared/_Layout.cshtml
@@ -34,6 +34,14 @@
Game Dev
+
+
@@ -42,12 +50,6 @@
@RenderBody()
-
-
diff --git a/OmegaLeo.HelperLib.Web/wwwroot/css/site.css b/OmegaLeo.HelperLib.Web/wwwroot/css/site.css
index f8d98fc..9001678 100644
--- a/OmegaLeo.HelperLib.Web/wwwroot/css/site.css
+++ b/OmegaLeo.HelperLib.Web/wwwroot/css/site.css
@@ -19,4 +19,22 @@ html {
body {
margin-bottom: 60px;
+}
+
+pre {
+ overflow: auto;
+ padding: 1rem;
+ background-color: #495057;
+ position: relative;
+
+ color: #f2f2f2;
+}
+
+code {
+ background-color: transparent !important;
+}
+
+.example-code > div {
+ border-radius: 0.5rem !important;
+ background-color: #495057 !important;
}
\ No newline at end of file
diff --git a/OmegaLeo.HelperLib.sln.DotSettings.user b/OmegaLeo.HelperLib.sln.DotSettings.user
index fd5e489..b792ae4 100644
--- a/OmegaLeo.HelperLib.sln.DotSettings.user
+++ b/OmegaLeo.HelperLib.sln.DotSettings.user
@@ -1,4 +1,5 @@