feat(Documents) Notes/Docs page improvements and warning cleanup
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<div class="doc">
|
||||
<div class="docHeader">
|
||||
<div class="docTitle">@DocContentModel.Name</div>
|
||||
|
||||
<div class="docDates">
|
||||
<div class="docDateUpdated"><b>Updated</b>: @DocContentModel.UpdatedDate.ToString("MM/dd/yyyy")</div>
|
||||
<div class="docDateCreated"><b>Created</b>: @DocContentModel.CreatedDate.ToString("MM/dd/yyyy")</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="docContent">@((MarkupString)Markdown.ToHtml(DocContentModel.Content))</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.docTitle {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.docHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.docDates {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public DocContentModel DocContentModel { get; set; } = default!;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
@if (Document!.DocumentationModels.Count > 0)
|
||||
{
|
||||
<div class="docInnerNavContainer">
|
||||
@foreach (var innerDoc in Document.DocumentationModels)
|
||||
{
|
||||
var linkStyle = $"docInnerNavButton inner_{Layers}";
|
||||
<NavLink class="@linkStyle" href="@innerDoc.GetDocLink()">@innerDoc.Name</NavLink>
|
||||
<DocumentInnerNavComponent Document="@innerDoc" Layers="@IncrementLayers()"/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<style>
|
||||
|
||||
.docInnerNavContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.docInnerNavButton a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.docInnerNavButton a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.docInnerNavButton {
|
||||
padding: 8px;
|
||||
margin-left: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.inner_1 {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.inner_2 {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.inner_3 {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public DocContentModel? Document { get; set; } = default!;
|
||||
|
||||
[Parameter]
|
||||
public int Layers { get; set; } = 1;
|
||||
|
||||
public int IncrementLayers()
|
||||
{
|
||||
return Layers + 1;
|
||||
}
|
||||
|
||||
|
||||
private string GetLink(DocContentModel doc)
|
||||
{
|
||||
return $"docs/{doc.Href}";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="docNavContainer">
|
||||
@foreach (var doc in Documents)
|
||||
{
|
||||
if (doc.Parent == null)
|
||||
{
|
||||
<NavLink class="docNavButton" href="@doc.GetDocLink()">@doc.Name</NavLink>
|
||||
<DocumentInnerNavComponent Document="@doc"/>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.docNavContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.docNavButton a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.docNavButton a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.docNavButton {
|
||||
padding: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public List<DocContentModel> Documents { get; set; } = default!;
|
||||
|
||||
[Parameter]
|
||||
public List<DocConnectionModel> Connections { get; set; } = default!;
|
||||
|
||||
private string GetLink(DocContentModel doc)
|
||||
{
|
||||
return $"docs/{doc.Href}";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user