From ddb63181865e9d4011d762fba917a3a78d88e7d8 Mon Sep 17 00:00:00 2001 From: Jonathan McCaffrey Date: Mon, 11 Apr 2022 20:23:55 -0400 Subject: [PATCH] feat(Docs) Notes and Docs are now Markdown. SQL is just for page Navigation --- .../Navigation/DesktopNavComponent.razor | 37 +++---- .../Navigation/MobileNavComponent.razor | 5 +- Components/Navigation/NavLinkComponent.razor | 11 +- .../Navigation/NavSectionComponent.razor | 1 + .../Navigation/TabletNavComponent.razor | 4 +- Components/_Imports.razor | 18 ++-- IGP/Database.db | Bin 278528 -> 278528 bytes IGP/IGP.csproj | 20 ++-- .../Documentation/DocumentationPage.razor | 2 - .../Parts/DocumentComponent.razor | 45 ++++---- .../Parts/DocumentNavComponent.razor | 8 +- IGP/Pages/Notes/NotesPage.razor | 51 ++++++++- IGP/Pages/Notes/Parts/NoteComponent.razor | 32 ++++-- IGP/wwwroot/content/docs/cheat-sheet.md | 24 +++++ IGP/wwwroot/content/docs/project-data.md | 98 ++++++++++++++++++ IGP/wwwroot/content/docs/setup.md | 79 ++++++++++++++ IGP/wwwroot/content/notes/coop/holdout.md | 79 ++++++++++++++ IGP/wwwroot/generated/AgileSprintModels.json | 2 +- IGP/wwwroot/generated/DocContentModels.json | 2 +- IGP/wwwroot/generated/NoteContentModels.json | 2 +- Services/Development/DocumentationService.cs | 7 -- 21 files changed, 429 insertions(+), 98 deletions(-) create mode 100644 IGP/wwwroot/content/docs/cheat-sheet.md create mode 100644 IGP/wwwroot/content/docs/project-data.md create mode 100644 IGP/wwwroot/content/docs/setup.md create mode 100644 IGP/wwwroot/content/notes/coop/holdout.md diff --git a/Components/Navigation/DesktopNavComponent.razor b/Components/Navigation/DesktopNavComponent.razor index af3cf08..4d4fc88 100644 --- a/Components/Navigation/DesktopNavComponent.razor +++ b/Components/Navigation/DesktopNavComponent.razor @@ -1,25 +1,20 @@ @inherits LayoutComponentBase -@inject INavigationService NavigationService -@using Services -@using Model.Website -@using Model.Website.Enums -@using Microsoft.EntityFrameworkCore +@inject INavigationService navigationService @implements IDisposable -
- @code { diff --git a/IGP/Pages/Notes/Parts/NoteComponent.razor b/IGP/Pages/Notes/Parts/NoteComponent.razor index 7413e23..ae27af8 100644 --- a/IGP/Pages/Notes/Parts/NoteComponent.razor +++ b/IGP/Pages/Notes/Parts/NoteComponent.razor @@ -1,14 +1,23 @@ -
-
-
@NoteContentModel.Name
+@inject HttpClient httpClient -
-
Updated: @NoteContentModel.UpdatedDate.ToString("MM/dd/yyyy")
-
Created: @NoteContentModel.CreatedDate.ToString("MM/dd/yyyy")
+@if (content == null) +{ + +} +else +{ +
+
+
@NoteContentModel.Name
+ +
+
Updated: @NoteContentModel.UpdatedDate.ToString("MM/dd/yyyy")
+
Created: @NoteContentModel.CreatedDate.ToString("MM/dd/yyyy")
+
+
@((MarkupString)Markdown.ToHtml(content, pipeline))
-
@((MarkupString)Markdown.ToHtml(NoteContentModel.Content))
-
+} @code { - [Parameter] public NoteContentModel NoteContentModel { get; set; } = default!; + + string? content = null; + MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); + private async Task LoadContent() => content = await httpClient.GetStringAsync($"content/notes/{NoteContentModel.Content}.md"); + protected override async Task OnParametersSetAsync() => await LoadContent(); + protected override async Task OnInitializedAsync() => await LoadContent(); } \ No newline at end of file diff --git a/IGP/wwwroot/content/docs/cheat-sheet.md b/IGP/wwwroot/content/docs/cheat-sheet.md new file mode 100644 index 0000000..2fa753e --- /dev/null +++ b/IGP/wwwroot/content/docs/cheat-sheet.md @@ -0,0 +1,24 @@ +# Overview + +This document will contain quick reference information on this project. + +## Dev Team + +| Name | Role | Discord | +|--------------------|------------|------------------------| +| Jonathan McCaffrey | Maintainer | JonathanMcCaffrey#3544 | + +## Project Links + +| Name | Purpose | Link | +|------------|-------------------------------------------------------------------|----------------------------------------------------------------| +| Production | Customer facing version of website. `main` branch. | https://www.igpfanreference.com/ | +| Develop | Development/testing version of website. `develop` branch. | https://calm-mud-04916b210.1.azurestaticapps.net/ | +| GitRepo | Where all the dev work goes. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference | +| CI | Deployment CI logs. See if a new build has successfully released. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/actions | + +## Educational Links + +| Name | Purpose | Link | +|--------|---------------------------------------|----------------------------------------------------------------| +| Blazor | Getting started information on Blazor | https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor | diff --git a/IGP/wwwroot/content/docs/project-data.md b/IGP/wwwroot/content/docs/project-data.md new file mode 100644 index 0000000..3b00e3f --- /dev/null +++ b/IGP/wwwroot/content/docs/project-data.md @@ -0,0 +1,98 @@ +# Overview + +This document will contain general information on data in this project. + +## General Note + +This project is a work in progress. As such, most of the data in the website doesn't follow the document. Ideally, this will be fixed over time. + +## SQL + +Relational data is stored in a local SQL database. + +This data is converted into JSON so it can be handled by Blazor WASM. + +Currently, Blazor WASM has a bug that prevents SQL from being used in production. Although, given SQL doesn't seem to provide much, aside from increased build times and load times, it might just be best to use the design principals of SQL, and it's interface, without using the actual technology in production. + +The data is then loaded in by a Service, via it's load method. + +```csharp +// Using Component +protected override async Task OnInitializedAsync() +{ + await AgileService.Load(); +} +``` + +```csharp +// Loading Service +public async Task Load() +{ + if (isLoaded) return; + AgileSprintModels = + (await httpClient.GetFromJsonAsync("generated/AgileSprintModels.json") + ?? Array.Empty()).ToList(); + AgileTaskModels = + (await httpClient.GetFromJsonAsync("generated/AgileTaskModels.json") + ?? Array.Empty()).ToList(); + SortSql(); + isLoaded = true; + NotifyDataChanged(); +} +``` + +We create a `SortSql()` method to handle adjusting the data to match what SQL would of given us. + +```csharp +private void SortSql() +{ + foreach (var agileTask in AgileTaskModels!) + { + if (agileTask.AgileSprintModelId != null) + { + SprintById(agileTask.AgileSprintModelId.Value)?.AgileTaskModels.Add(agileTask); + } + } +} +``` + +We could also create indexes, or whatever other functionality we lose by SQL not working in production. + +Then it's only a matter of using said data. + +```csharp +@if (!agileService.IsLoaded()) +{ + +} +else +{ + + Agile +
+ @foreach (var sprint in agileService.AgileSprintModels! + .OrderBy(e => e.EndDate).Reverse()) + { +
+ +
@sprint.Name
+``` + +## Localized Strings + +Localized strings are handled in the Localizations.resx file. + +Most text isn't using localized strings yet. And English is the only plan of support in the short term, and probably in the long term as well. + +## Markdown Files + +Documents are currently handled in the SQL database. But ideally, they will be markdown documents instead, with links to GitHub. + +Basically long term, this website will perhaps also act as a public wiki. Who knows? With GitHub as the public CMS. + +So if Blazor WASM doesn't support some markdown generation that is not cumbersome, then the `IGP_Convert` tool will need to be extended to convert Markup files to files Blazor WASM can use. + +And ideally, any generation systems we write will use any front-matter in the markdown documents. + +Each of these pages will have one of those `edit on github` buttons. diff --git a/IGP/wwwroot/content/docs/setup.md b/IGP/wwwroot/content/docs/setup.md new file mode 100644 index 0000000..2e8b8b4 --- /dev/null +++ b/IGP/wwwroot/content/docs/setup.md @@ -0,0 +1,79 @@ +# Overview + +This document will contain general setup notes for the project. + +## Prerequisite + +To understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio. + +- [GitHub Documentation](https://docs.github.com/en/get-started) + +- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/) + +To make updates to this website, it is recommended to understand HTML/CSS and C#. + +- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/) +- [Mozilla's HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started) +- [W3SCHOOLS' HTML Documentation](https://www.w3schools.com/html/) + +Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal: Gates of Pyre". + +- [IGP Website](https://gatesofpyre.com/) + - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access. + +## Installation + +Download and install Visual Studio preview. + +**Note:** Visual Studio Preview currently doesn't work on Mac for this project. Use a PC, or Rider. + +[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/) + +When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | **.NET WebAssembly build tools**". + +## Download Project + +Get this project from GitHub. + +```bash +git clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git +``` + +## Project Tree + +``` +C:. +├───.github +│ └───workflows # Workflows to deploy website +├───Components # Components used be website +├───Contexts +├───IGP +│ ├───Pages # Website pages +│ └───wwwroot +│ ├───css +│ ├───generated # Files generated by IGP_Convert. Do not edit +│ ├───image +│ └───javascript +├───IGP_Convert # Converts SQL into JSON for Blazor Wasm +├───Model # Data models +└───Services # Web services +``` + +## Running + +- Open `IGP/IGP.sln`. +- Click the green RUN button in Visual Studio. +- A local copy of the IGP Website should have launched on your machine. + +## Publishing + +Code committed to the `main` branch will automatically be deployed to [production](https://www.igpfanreference.com/). + +Code committed to the `develop` branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/). + +_This is handle via the files in `.github/workflow`. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works._ + +## Troubleshooting + + +Nothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [Discord](https://discord.gg/uMq8bMGeeN). \ No newline at end of file diff --git a/IGP/wwwroot/content/notes/coop/holdout.md b/IGP/wwwroot/content/notes/coop/holdout.md new file mode 100644 index 0000000..2e8b8b4 --- /dev/null +++ b/IGP/wwwroot/content/notes/coop/holdout.md @@ -0,0 +1,79 @@ +# Overview + +This document will contain general setup notes for the project. + +## Prerequisite + +To understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio. + +- [GitHub Documentation](https://docs.github.com/en/get-started) + +- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/) + +To make updates to this website, it is recommended to understand HTML/CSS and C#. + +- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/) +- [Mozilla's HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started) +- [W3SCHOOLS' HTML Documentation](https://www.w3schools.com/html/) + +Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal: Gates of Pyre". + +- [IGP Website](https://gatesofpyre.com/) + - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access. + +## Installation + +Download and install Visual Studio preview. + +**Note:** Visual Studio Preview currently doesn't work on Mac for this project. Use a PC, or Rider. + +[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/) + +When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | **.NET WebAssembly build tools**". + +## Download Project + +Get this project from GitHub. + +```bash +git clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git +``` + +## Project Tree + +``` +C:. +├───.github +│ └───workflows # Workflows to deploy website +├───Components # Components used be website +├───Contexts +├───IGP +│ ├───Pages # Website pages +│ └───wwwroot +│ ├───css +│ ├───generated # Files generated by IGP_Convert. Do not edit +│ ├───image +│ └───javascript +├───IGP_Convert # Converts SQL into JSON for Blazor Wasm +├───Model # Data models +└───Services # Web services +``` + +## Running + +- Open `IGP/IGP.sln`. +- Click the green RUN button in Visual Studio. +- A local copy of the IGP Website should have launched on your machine. + +## Publishing + +Code committed to the `main` branch will automatically be deployed to [production](https://www.igpfanreference.com/). + +Code committed to the `develop` branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/). + +_This is handle via the files in `.github/workflow`. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works._ + +## Troubleshooting + + +Nothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [Discord](https://discord.gg/uMq8bMGeeN). \ No newline at end of file diff --git a/IGP/wwwroot/generated/AgileSprintModels.json b/IGP/wwwroot/generated/AgileSprintModels.json index cdf5836..d5e881d 100644 --- a/IGP/wwwroot/generated/AgileSprintModels.json +++ b/IGP/wwwroot/generated/AgileSprintModels.json @@ -1 +1 @@ -[{"Id":1,"Name":"Agile Sprint","Description":"Changelogs and sprint views were going to be pushed till later, but I am feeling inspired by the IGP Content Creators\u0027 minimum weekly lifecycle requirement. So I am going to focus on agile-related tasks, and handle roadmap tasks after this initial sprint. All weekly sprints will release on Sunday, starting next Sunday.","StartDate":"2022-02-14T00:00:00","EndDate":"2022-02-20T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":2,"Name":"SQL Update","Description":"The SQL update is big enough to be a full sprint in of itself, and I spent less time this week for development. Will just extend sprint by 2 week, and remove all non SQL tasks from the sprint.","StartDate":"2022-02-20T00:00:00","EndDate":"2022-03-27T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":3,"Name":"Database Page","Description":"Improvements to the Database page","StartDate":"2022-03-27T00:00:00","EndDate":"2022-04-03T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":4,"Name":"Branding","Description":"Improve streaming branding around the website","StartDate":"2022-04-03T00:00:00","EndDate":"2022-04-10T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":5,"Name":"Calculators","Description":"Improve Calculators","StartDate":"2022-04-10T00:00:00","EndDate":"2022-04-24T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":6,"Name":"Infrastructure","Description":"Localization, Analytics, and Test Automation","StartDate":"2022-04-24T00:00:00","EndDate":"2022-05-08T00:00:00","Notes":null,"AgileTaskModels":[]}] \ No newline at end of file +[{"Id":1,"Name":"Agile Sprint","Description":"Changelogs and sprint views were going to be pushed till later, but I am feeling inspired by the IGP Content Creators\u0027 minimum weekly lifecycle requirement. So I am going to focus on agile-related tasks, and handle roadmap tasks after this initial sprint. All weekly sprints will release on Sunday, starting next Sunday.","StartDate":"2022-02-14T00:00:00","EndDate":"2022-02-20T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":2,"Name":"SQL Update","Description":"The SQL update is big enough to be a full sprint in of itself, and I spent less time this week for development. Will just extend sprint by 2 week, and remove all non SQL tasks from the sprint.","StartDate":"2022-02-20T00:00:00","EndDate":"2022-03-27T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":3,"Name":"Database Page","Description":"Improvements to the Database page","StartDate":"2022-03-27T00:00:00","EndDate":"2022-04-03T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":4,"Name":"Branding","Description":"Improve streaming branding around the website","StartDate":"2022-04-03T00:00:00","EndDate":"2022-04-10T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":5,"Name":"Calculators","Description":"Improve Calculators","StartDate":"2022-04-10T00:00:00","EndDate":"2022-04-24T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":6,"Name":"Infrastructure Misc","Description":"Localization, Analytics, and Test Automation","StartDate":"2022-04-24T00:00:00","EndDate":"2022-05-08T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":7,"Name":"Damage Calculator and Lists","Description":"Sort unit data by damage output. Select a attack and defense unit to see hits to kill.","StartDate":"2022-05-08T00:00:00","EndDate":"2022-05-22T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":8,"Name":"More Test Automation and CI","Description":"More test automation work. Integrate into CI","StartDate":"2022-05-22T00:00:00","EndDate":"2022-06-05T00:00:00","Notes":null,"AgileTaskModels":[]}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocContentModels.json b/IGP/wwwroot/generated/DocContentModels.json index 30cb049..ceb8c4f 100644 --- a/IGP/wwwroot/generated/DocContentModels.json +++ b/IGP/wwwroot/generated/DocContentModels.json @@ -1 +1 @@ -[{"Id":1,"ParentId":null,"DocSectionModelId":1,"Href":"setup","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-03-30T00:00:00","UpdatedDate":"2022-04-07T00:00:00","Name":"Development Setup","Description":"Get set up on developing this web project.","Content":"# Overview\n\nThis document will contain general setup notes for the project.\n\n## Prerequisite\n\nTo understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio.\n\n- [GitHub Documentation](https://docs.github.com/en/get-started)\n\n- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/)\n\nTo make updates to this website, it is recommended to understand HTML/CSS and C#.\n\n- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/)\n- [Mozilla\u0027s HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started)\n- [W3SCHOOLS\u0027 HTML Documentation](https://www.w3schools.com/html/)\n\nFurther, you should understand the product and clients this website is for. So it is recommended to play \u0022Immortal: Gates of Pyre\u0022.\n\n- [IGP Website](https://gatesofpyre.com/)\n - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access.\n\n## Installation\n\nDownload and install Visual Studio preview.\n\n**Note:** Visual Studio Preview currently doesn\u0027t work on Mac for this project. Use a PC, or Rider.\n\n[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/)\n\nWhen installing, ensure you have selected \u0022Workloads | **ASP.NET and web development**\u0022 and \u0022Individual components | **.NET WebAssembly build tools**\u0022.\n\n## Download Project\n\nGet this project from GitHub.\n\n\u0060\u0060\u0060bash\ngit clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git\n\u0060\u0060\u0060\n\n## Project Tree\n\n\u0060\u0060\u0060\nC:.\n\u251C\u2500\u2500\u2500.github\n\u2502 \u2514\u2500\u2500\u2500workflows # Workflows to deploy website\n\u251C\u2500\u2500\u2500Components # Components used be website\n\u251C\u2500\u2500\u2500Contexts\n\u251C\u2500\u2500\u2500IGP\n\u2502 \u251C\u2500\u2500\u2500Pages # Website pages\n\u2502 \u2514\u2500\u2500\u2500wwwroot\n\u2502 \u251C\u2500\u2500\u2500css\n\u2502 \u251C\u2500\u2500\u2500generated # Files generated by IGP_Convert. Do not edit\n\u2502 \u251C\u2500\u2500\u2500image\n\u2502 \u2514\u2500\u2500\u2500javascript\n\u251C\u2500\u2500\u2500IGP_Convert # Converts SQL into JSON for Blazor Wasm\n\u251C\u2500\u2500\u2500Model # Data models\n\u2514\u2500\u2500\u2500Services # Web services\n\u0060\u0060\u0060\n\n## Running\n\n- Open \u0060IGP/IGP.sln\u0060.\n- Click the green RUN button in Visual Studio.\n- A local copy of the IGP Website should have launched on your machine.\n\n## Publishing\n\nCode committed to the \u0060main\u0060 branch will automatically be deployed to [production](https://www.igpfanreference.com/).\n\nCode committed to the \u0060develop\u0060 branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/).\n\n_This is handle via the files in \u0060.github/workflow\u0060. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works._\n\n## Troubleshooting\n\n\nNothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [Discord](https://discord.gg/uMq8bMGeeN)."},{"Id":2,"ParentId":null,"DocSectionModelId":1,"Href":"data","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-04-11T00:00:00","UpdatedDate":"2022-04-11T00:00:00","Name":"Project Data","Description":"Using data in this project.","Content":"# Overview\n\nThis document will contain general information on data in this project.\n\n## General Note\n\nThis project is a work in progress. As such, most of the data in the website doesn\u0027t follow the document. Ideally, this will be fixed over time.\n\n## SQL\n\nRelational data is stored in a local SQL database.\n\nThis data is converted into JSON so it can be handled by Blazor WASM.\n\n\u003Ci\u003ECurrently, Blazor WASM has a bug that prevents SQL from being used in production. Although, given SQL doesn\u0027t seem to provide much, aside from increased build times and load times, it might just be best to use the design principals of SQL, and it\u0027s interface, without using the actual technology in production.\u003C/i\u003E\n\nThe data is then loaded in by a Service, via it\u0027s load method.\n\n\u0060\u0060\u0060csharp\n// Using Component\nprotected override async Task OnInitializedAsync()\n{\n await AgileService.Load();\n}\n\u0060\u0060\u0060\n\n\u0060\u0060\u0060csharp\n// Loading Service\npublic async Task Load()\n{\n if (isLoaded) return;\n AgileSprintModels =\n (await httpClient.GetFromJsonAsync\u003CAgileSprintModel[]\u003E(\u0022generated/AgileSprintModels.json\u0022)\n ?? Array.Empty\u003CAgileSprintModel\u003E()).ToList();\n AgileTaskModels =\n (await httpClient.GetFromJsonAsync\u003CAgileTaskModel[]\u003E(\u0022generated/AgileTaskModels.json\u0022)\n ?? Array.Empty\u003CAgileTaskModel\u003E()).ToList();\n SortSql();\n isLoaded = true;\n NotifyDataChanged();\n}\n\u0060\u0060\u0060\n\nWe create a \u0060SortSql()\u0060 method to handle adjusting the data to match what SQL would of given us.\n\n\u0060\u0060\u0060csharp\nprivate void SortSql()\n{\n foreach (var agileTask in AgileTaskModels!)\n {\n if (agileTask.AgileSprintModelId != null)\n {\n SprintById(agileTask.AgileSprintModelId.Value)?.AgileTaskModels.Add(agileTask);\n }\n }\n}\n\u0060\u0060\u0060\n\nWe could also create indexes, or whatever other functionality we lose by SQL not working in production.\n\nThen it\u0027s only a matter of using said data.\n\n\u0060\u0060\u0060csharp\n@if (!agileService.IsLoaded())\n{\n \u003CLoadingComponent/\u003E\n}\nelse\n{\n \u003CLayoutMediumContentComponent\u003E\n \u003CWebsiteTitleComponent\u003EAgile\u003C/WebsiteTitleComponent\u003E\n \u003Cdiv class=\u0022agileViewContainer\u0022\u003E\n @foreach (var sprint in agileService.AgileSprintModels!\n .OrderBy(e =\u003E e.EndDate).Reverse())\n {\n \u003Cdetails class=\u0022sprintDisplayContainer @sprint.GetSprintType().ToLower()\u0022\n open=\u0022@(sprint.GetSprintType() == SprintType.Current)\u0022\u003E\n \u003Csummary class=\u0022sprintSummary\u0022\u003E\n \u003Cdiv class=\u0022sprintTitle\u0022\u003E@sprint.Name\u003C/div\u003E\n\u0060\u0060\u0060\n\n## Localized Strings\n\nLocalized strings are handled in the Localizations.resx file.\n\nMost text isn\u0027t using localized strings yet. And English is the only plan of support in the short term, and probably in the long term as well.\n\n## Markdown Files\n\nDocuments are currently handled in the SQL database. But ideally, they will be markdown documents intead, with links to GitHub.\n\nBasically long term, this website will perhaps also act as a public wiki. Who knows? With GitHub as the public CMS.\n\nSo if Blazor WASM doesn\u0027t support some markdown generation that is not cumbersome, then the \u0060IGP_Convert\u0060 tool will need to be extended to convert Markup files to files Blazor WASM can use.\n\nAnd ideally, any generation systems we write will use any Frontmatter in the markdown documents.\n\nEach of these pages will have one of those \u0060edit on github\u0060 buttons.\n"},{"Id":3,"ParentId":null,"DocSectionModelId":1,"Href":"cheat-sheet","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-04-11T00:00:00","UpdatedDate":"2022-04-11T00:00:00","Name":"Cheat Sheet","Description":"Handy links or quick information on this project.","Content":"# Overview\n\nThis document will contain quick reference information on this project.\n\n## Dev Team\n\n| Name | Role | Discord |\n| ------------------ | ---------- | ---------------------- |\n| Jonathan McCaffrey | Maintainer | JonathanMcCaffrey#3544 |\n\n## Project Links\n\n| Name | Purpose | Link |\n| ---------- | ---------------------------------------------------------------- | -------------------------------------------------------------- |\n| Production | Customer facing version of website. \u0060main\u0060 branch. | https://www.igpfanreference.com/ |\n| Develop | Development/testing version of website. \u0060develop\u0060 branch. | https://calm-mud-04916b210.1.azurestaticapps.net/ |\n| GitRepo | Where all the dev work goes. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference |\n| CI | Deployment CI logs. See if a new build has succesfully released. | https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/actions |\n\n## Educational Links\n\n| Name | Purpose | Link |\n| ------ | ------------------------------------- | -------------------------------------------------------------- |\n| Blazor | Getting started information on Blazor | https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor |\n"}] \ No newline at end of file +[{"Id":1,"ParentId":null,"DocSectionModelId":1,"Href":"setup","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-03-30T00:00:00","UpdatedDate":"2022-04-07T00:00:00","Name":"Development Setup","Description":"Get set up on developing this web project.","Content":"setup"},{"Id":2,"ParentId":null,"DocSectionModelId":1,"Href":"project-data","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-04-11T00:00:00","UpdatedDate":"2022-04-11T00:00:00","Name":"Project Data","Description":"Using data in this project.","Content":"project-data"},{"Id":3,"ParentId":null,"DocSectionModelId":1,"Href":"cheat-sheet","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-04-11T00:00:00","UpdatedDate":"2022-04-11T00:00:00","Name":"Cheat Sheet","Description":"Handy links or quick information on this project.","Content":"cheat-sheet"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/NoteContentModels.json b/IGP/wwwroot/generated/NoteContentModels.json index f081d4c..2295351 100644 --- a/IGP/wwwroot/generated/NoteContentModels.json +++ b/IGP/wwwroot/generated/NoteContentModels.json @@ -1 +1 @@ -[{"Id":1,"ParentId":null,"NoteSectionModelId":1,"Href":"holdout","CreatedDate":"2022-02-18T00:00:00","UpdatedDate":"2022-02-18T00:00:00","Name":"Coop Holdout, Some distant place (Nuath)","Description":"First coop test map in pre-alpha.","Content":"Information contained in this note is based on this \u003Ca href=\u0022https://www.youtube.com/watch?v=XkAgOCIz3DE\u0022\u003EYouTube, Reference Video\u003C/a\u003E.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/OpenBases.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EOpen Bases\u003C/b\u003E\u003C/div\u003E\n\nOn this map, you start with around 500 alloy and 100 ether. You are probably going to want to expand to the bases in the marked order, given the density of defending enemies shown on the minimap.\n\nYou should know that these are all standard bases that will mine out in 10 minutes. Giving a total of 18,000 alloy and 7,200 ether. Plus an additional 6,000 alloy from the starting Bastion. In the late game, you will have zero income, aside from pyre.\n\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/EnemySpawns.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EEnemy Spawn Areas\u003C/b\u003E\u003C/div\u003E\n\nThe first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and won\u0027t be a threat until the 15-minute mark.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/DefendPoints.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Towers\u003C/b\u003E\u003C/div\u003E\n\nYou have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers.\n\nThe spawn size post the 15-minute mark does become rather large. You may be tempted to fall back and abandon forward bases, but the waves will stack if not dealt with. Eventually, more units than the game can handle, so ensure outer pyre towers are held. Try to take them back if you lose them.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Pyre.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Camps\u003C/b\u003E\u003C/div\u003E\n\nWhen you have the time you are also going to need to take the 4 pyre camps spread around the map. It will probably be ideal to split your army in half, to protect your two outer towers, and just have a small force of Ichors or Dervishes to clear the camps quickly.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Multipliers.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EMultipliers\u003C/b\u003E\u003C/div\u003E\n\nIf you have additional free time, you can take out the Altar of the Worthys on the edges of the map to double your current more multiplier: 2, 4, 8, to the max of 16. Amber Wombs will also spawn, with a pack of enemies to defend them. Killing an Amber Womb will increase your score, but also spawn random friendly and enemy units. With this spawning, it\u0027s possible to go past the supply cap.\n\n\nBut really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as possible.","IsHidden":"False","IsPreAlpha":"True","NoteContentModels":[],"Parent":null,"PageOrder":0}] \ No newline at end of file +[{"Id":1,"ParentId":null,"NoteSectionModelId":1,"Href":"holdout","CreatedDate":"2022-02-18T00:00:00","UpdatedDate":"2022-02-18T00:00:00","Name":"Coop Holdout, Some distant place (Nuath)","Description":"First coop test map in pre-alpha.","Content":"coop/holdout","IsHidden":"False","IsPreAlpha":"True","NoteContentModels":[],"Parent":null,"PageOrder":0}] \ No newline at end of file diff --git a/Services/Development/DocumentationService.cs b/Services/Development/DocumentationService.cs index a8a5d04..61cc0bf 100644 --- a/Services/Development/DocumentationService.cs +++ b/Services/Development/DocumentationService.cs @@ -1,13 +1,6 @@ using System.Net.Http.Json; using Model.Doc; -#if NO_SQL - -#else -using Contexts; -using Microsoft.EntityFrameworkCore; -#endif - namespace Services.Development; public class DocumentationService : IDocumentationService