new documentation changes
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig" Version="0.40.0" />
|
||||
<PackageReference Include="NetFlow.DocumentationHelper.Library" Version="1.1.2" />
|
||||
<PackageReference Include="MarkdigExtensions.SyntaxHighlighting" Version="1.0.3" />
|
||||
<PackageReference Include="NetFlow.DocumentationHelper.Library" Version="1.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
@* File: `OmegaLeo.HelperLib.Web/Views/Home/Library.cshtml` *@
|
||||
@using ColorCode.Styling
|
||||
@using GameDevLibrary.Extensions
|
||||
@using Markdig
|
||||
@model OmegaLeo.HelperLib.Web.Models.LibraryDocumentationViewModel
|
||||
@{
|
||||
ViewData["Title"] = Model.LibraryName;
|
||||
var groupedByNamespace = Model.Documentation.GroupBy(d => d.AssemblyName).OrderBy(g => g.Key);
|
||||
|
||||
var pipeline = new MarkdownPipelineBuilder()
|
||||
.UseAdvancedExtensions()
|
||||
.UseSyntaxHighlighting(StyleDictionary.DefaultDark)
|
||||
.Build();
|
||||
}
|
||||
|
||||
<div class="container-fluid mt-4">
|
||||
@@ -75,7 +83,14 @@
|
||||
{
|
||||
<tr>
|
||||
<td><code>@desc.Title</code></td>
|
||||
<td>@Html.Raw(desc.Description)</td>
|
||||
<td>@Html.Raw(desc.Description)<br/>
|
||||
@if (desc.CodeExample.IsNotNullOrEmpty())
|
||||
{
|
||||
<strong>Example:</strong><br/>
|
||||
<div class="example-code mb-2">
|
||||
@Html.Raw(Markdig.Markdown.ToHtml(desc.CodeExample, pipeline))
|
||||
</div>
|
||||
}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -34,6 +34,14 @@
|
||||
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Library" asp-route-id="game">Game Dev</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/omegaleo/HelperLib" target="_blank" rel="noopener noreferrer" aria-label="GitHub repository">
|
||||
<i class="bi bi-github" style="font-size:1.25rem;"></i> View on Github
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -42,12 +50,6 @@
|
||||
@RenderBody()
|
||||
</main>
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© @DateTime.Now.Year - OmegaLeo Helper Libraries
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user