Initial Commit

This commit is contained in:
2026-05-29 14:17:46 -04:00
commit b7d0676d5b
498 changed files with 30308 additions and 0 deletions
+145
View File
@@ -0,0 +1,145 @@
@layout PageLayout
@inherits BasePage
@inject INoteService NoteService
@implements IDisposable
@inject IDataCollectionService DataCollectionService
@page "/notes"
@if (!NoteService.IsLoaded())
{
<LoadingComponent/>
}
else
{
<LayoutMediumContentComponent>
<WebsiteTitleComponent>Notes</WebsiteTitleComponent>
<PaperComponent>
@foreach (var noteSection in NoteService.NoteSectionModels)
{
<div class="noteSectionContainer">
<div class="noteSectionTitle">@noteSection.Name</div>
<div class="noteContentContainer">
@foreach (var noteContent in noteSection.NoteContentModels)
{
<NavLink class="noteContentLink" href="@noteContent.GetNoteLink()">
<div class="noteContentName">@noteContent.Name</div>
<div class="noteContentDescription">@noteContent.Description</div>
</NavLink>
}
</div>
</div>
}
</PaperComponent>
</LayoutMediumContentComponent>
}
<style>
.noteSectionContainer {
width: 100%;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;
padding-bottom: 64px;
}
.noteSectionTitle {
font-size: 3rem;
font-weight: bold;
text-align: center;
margin-bottom: 32px;
}
.noteContentContainer {
display: grid;
gap: 12px;
grid-template-columns: 1fr 1fr;
}
@@media only screen and (max-width: 1025px) {
.noteContentContainer {
grid-template-columns: 1fr;
}
}
.noteContentName {
font-weight: bold;
font-size: 1.6rem;
}
.noteContentDescription {
font-weight: normal;
}
.noteContentLink {
background-color: var(--paper);
border: 1px solid var(--paper-border);
border-radius: 2px;
padding-left: 12px;
padding-right: 12px;
padding-top: 24px;
padding-bottom: 24px;
color: white;
display: flex;
flex-direction: column;
gap: 12px;
text-align: center;
margin-left: 12px;
margin-right: 12px;
}
.noteContentLink:hover {
background-color: var(--paper-hover);
border-color: var(--paper-border-hover);
text-decoration: none;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
transform: translateY(-2px) scale(1.01);
}
</style>
@code {
[Parameter] public string? Href1 { get; set; }
[Parameter] public string? Href2 { get; set; }
[Parameter] public string? Href3 { get; set; }
[Parameter] public string? Href4 { get; set; }
[Parameter] public string? Href5 { get; set; }
private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? "";
string selectedSection = "All";
protected override void OnInitialized()
{
base.OnInitialized();
NoteService.Subscribe(StateHasChanged);
NoteService.Load();
}
void IDisposable.Dispose()
{
NoteService.Unsubscribe(StateHasChanged);
}
void OnSectionChanged(ChangeEventArgs e)
{
selectedSection = e.Value!.ToString()!;
StateHasChanged();
}
}
+121
View File
@@ -0,0 +1,121 @@
@layout PageLayout
@inherits BasePage
@inject INoteService NoteService
@implements IDisposable
@inject IDataCollectionService DataCollectionService
@page "/notes/{href1}/{href2?}/{href3?}/{href4?}/{href5?}"
@if (!NoteService.IsLoaded())
{
<LoadingComponent/>
}
else
{
<LayoutWithSidebarComponent>
<Sidebar>
<NoteNavComponent
Connections="NoteService.NoteConnectionModels"
Notes="NoteService.NoteContentModels"/>
</Sidebar>
<Content>
<PaperComponent>
@foreach (var note in NoteService.NoteContentModels)
{
if (!note.Href.Equals(Href))
{
continue;
}
<NoteComponent NoteContentModel="note"/>
}
</PaperComponent>
</Content>
</LayoutWithSidebarComponent>
}
<style>
pre code {
color: white;
}
h1 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
h2 {
display: block;
font-size: 1.5em;
margin-top: 0.83em;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
li {
display: list-item;
}
p {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
}
ul {
display: block;
list-style-type: disc;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
padding-left: 40px;
}
pre {
background: black;
padding: 2px;
}
</style>
@code {
[Parameter] public string? Href1 { get; set; }
[Parameter] public string? Href2 { get; set; }
[Parameter] public string? Href3 { get; set; }
[Parameter] public string? Href4 { get; set; }
[Parameter] public string? Href5 { get; set; }
private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? "";
protected override void OnInitialized()
{
base.OnInitialized();
NoteService.Subscribe(StateHasChanged);
NoteService.Load();
}
void IDisposable.Dispose()
{
NoteService.Unsubscribe(StateHasChanged);
}
}
@@ -0,0 +1,78 @@
@inject HttpClient httpClient
@if (content == null)
{
<LoadingComponent/>
}
else
{
<div class="note">
<div class="noteHeader">
<h1 class="noteTitle">@noteFrontMatter.Title</h1>
<div class="noteDates">
<div class="noteDateUpdated"><b>Updated</b>: @noteFrontMatter.UpdatedDate.ToString("MM/dd/yyyy")</div>
<div class="noteDateCreated"><b>Created</b>: @noteFrontMatter.CreatedDate.ToString("MM/dd/yyyy")</div>
</div>
</div>
<div class="noteContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
<div class="noteFooter">
<LinkButtonComponent Href="@GitUrl">
Edit on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
</LinkButtonComponent>
</div>
</div>
}
<style>
.noteTitle {
font-weight: bold;
}
.noteHeader {
display: flex;
justify-content: space-between;
}
.noteDates {
display: flex;
flex-direction: column;
}
.noteFooter {
display: flex;
justify-content: flex-end;
}
</style>
@code {
[Parameter] public NoteContentModel NoteContentModel { get; set; } = default!;
NoteFrontMatterModel noteFrontMatter = null!;
private string? content;
private string Filepath => $"content/notes/{NoteContentModel.Content}.md";
private string GitUrl => $"{Project.GitResourcesUrl}/{Filepath}";
private MarkdownPipeline Pipeline => MarkdownFiles.Pipeline;
private async Task<NoteFrontMatterModel> LoadContent()
{
content = await MarkdownFiles.LoadMarkdown(httpClient, Filepath);
return noteFrontMatter =
await MarkdownFiles.LoadFrontMatter<NoteFrontMatterModel>(httpClient, Filepath);
}
protected override async Task OnParametersSetAsync()
{
await LoadContent();
}
protected override async Task OnInitializedAsync()
{
await LoadContent();
}
}
@@ -0,0 +1,71 @@
@if (Note!.NoteContentModels.Count > 0)
{
<div class="noteInnerNavContainer">
@foreach (var innerNote in Note.NoteContentModels)
{
var linkStyle = $"noteInnerNavButton inner_{Layers}";
<NavLink class="@linkStyle" href="@innerNote.GetNoteLink()">@innerNote.Name</NavLink>
<NoteInnerNavComponent Note="@innerNote" Layers="@IncrementLayers()"/>
}
</div>
}
<style>
.noteInnerNavContainer {
display: flex;
flex-direction: column;
}
.noteInnerNavButton a {
color: white;
}
.noteInnerNavButton a:hover {
color: white;
}
.noteInnerNavButton {
padding: 8px;
margin-left: 8px;
color: white;
}
.noteInnerNavButton:hover {
}
.inner_1 {
margin-left: 8px;
}
.inner_2 {
margin-left: 16px;
}
.inner_3 {
margin-left: 24px;
}
</style>
@code {
[Parameter] public NoteContentModel? Note { get; set; }
[Parameter] public int Layers { get; set; } = 1;
public int IncrementLayers()
{
return Layers + 1;
}
private string GetLink(NoteContentModel note)
{
return $"notes/{note.Href}";
}
}
@@ -0,0 +1,42 @@
<div class="noteNavContainer">
@foreach (var note in Notes)
{
if (note.Parent == null)
{
<NavLink class="noteNavButton" href="@note.GetNoteLink()">@note.Name</NavLink>
<NoteInnerNavComponent Note="@note"/>
}
}
</div>
<style>
.noteNavContainer {
display: flex;
flex-direction: column;
gap: 8px;
}
.noteNavButton a {
color: white;
}
.noteNavButton a:hover {
color: white;
background-color: var(--primary-hover);
}
.noteNavButton {
padding: 8px;
color: white;
}
</style>
@code {
[Parameter] public List<NoteContentModel> Notes { get; set; } = default!;
[Parameter] public List<NoteConnectionModel> Connections { get; set; } = default!;
}