Browse Source

feat(Docs) Added FrontMatter and Git edit links

main
Jonathan McCaffrey 4 years ago
parent
commit
1939bbe70a
  1. 28
      Components/Inputs/EditLinkComponent.razor
  2. BIN
      IGP/Database.db
  3. 10
      IGP/IGP.csproj
  4. 6
      IGP/Pages/BuildCalculator/BuildCalculatorPage.razor
  5. 4
      IGP/Pages/BuildCalculator/Parts/ChartComponent.razor
  6. 4
      IGP/Pages/Comparision/ComparisionPage.razor
  7. 40
      IGP/Pages/Documentation/Parts/DocumentComponent.razor
  8. 3
      IGP/Pages/Documentation/Parts/DocumentNavComponent.razor
  9. 36
      IGP/Pages/Notes/Parts/NoteComponent.razor
  10. 5
      IGP/Pages/Notes/Parts/NoteNavComponent.razor
  11. 2
      IGP/Utils/Interval.cs
  12. 51
      IGP/Utils/Markdown.cs
  13. 6
      IGP/Utils/Project.cs
  14. 2
      IGP/_Imports.razor
  15. 7
      IGP/wwwroot/content/docs/cheat-sheet.md
  16. 17
      IGP/wwwroot/content/docs/project-data.md
  17. 8
      IGP/wwwroot/content/docs/setup.md
  18. 83
      IGP/wwwroot/content/notes/coop/holdout.md
  19. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/CoopBaseLarge.png
  20. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/DefendPoints.png
  21. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/EnemySpawns.png
  22. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/Multipliers.png
  23. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/OpenBases.png
  24. BIN
      IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/Pyre.png
  25. 2
      IGP/wwwroot/generated/GitChangeModels.json
  26. 2
      IGP/wwwroot/generated/GitPatchModels.json
  27. 90
      IGP/wwwroot/markdown/documentation/setup.md
  28. 54
      IGP/wwwroot/markdown/notes/coop.md
  29. 12
      Model/Doc/DocFrontMatterModel.cs
  30. 12
      Model/Notes/NoteFrontMatterModel.cs
  31. 41
      Services/Development/DocumentationService.cs

28
Components/Inputs/EditLinkComponent.razor

@ -0,0 +1,28 @@
<a href="@Href" class="editLinkButton">
Edit on GitHub
</a>
<style>
.editLinkButton {
color: white;
background-color: var(--info);
border: 1px solid var(--info-border);
padding: 16px;
border-radius: 3px;
display: block;
width: 180px;
text-align: center;
}
.editLinkButton:hover {
color: white;
background-color: var(--info-hover);
border: 2px solid var(--info-border-hover);
}
</style>
@code {
[Parameter]
public string Href { get; set; } = "";
}

BIN
IGP/Database.db

Binary file not shown.

10
IGP/IGP.csproj

@ -61,4 +61,14 @@
</Compile>
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="wwwroot\content\notes\coop\image\notes\map-lostprovince\Map_LostProvince.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\CoopBaseLarge.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\DefendPoints.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\EnemySpawns.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\Multipliers.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\OpenBases.png" />
<_ContentIncludedByDefault Remove="wwwroot\image\notes\coop-holdout\Pyre.png" />
</ItemGroup>
</Project>

6
IGP/Pages/BuildCalculator/BuildCalculatorPage.razor

@ -207,8 +207,7 @@
padding-left: 2px;
padding-right: 2px;
}
.gridItem {
padding: 0px;
border: 0px;
@ -264,12 +263,13 @@
var faction = filterService.GetFactionType();
var immortal = filterService.GetImmortalType();
var entity = EntityModel.GetFrom(hotkey, hotkeyGroup, isHoldSpace, faction, immortal);
EntityModel? entity = EntityModel.GetFrom(hotkey!, hotkeyGroup, isHoldSpace, faction, immortal);
if (entity == null)
{
return;
}
if (buildOrderService.Add(entity, economyService, toastService))
{
economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval());

4
IGP/Pages/BuildCalculator/Parts/ChartComponent.razor

@ -58,9 +58,7 @@
[Inject]
IBuildOrderService BuildOrderService { get; set; } = default!;
int height = 100;
readonly int width = 250;
private readonly int width = 250;
List<int> valueList = new();

4
IGP/Pages/Comparision/ComparisionPage.razor

@ -21,7 +21,7 @@ grid-template-areas: 'loader sand compare compare' ;">
<div style="grid-area: compare; border: 2px solid black; padding: 20px;">
Comparision Charts
<ComparisonChartsComponent></ComparisonChartsComponent>
</div>
@ -90,7 +90,7 @@ grid-template-areas: 'loader sand compare compare' ;">
return;
}
var entity = EntityModel.GetFrom(hotkey, hotkeyGroup, isHoldSpace, faction, immortal);
var entity = EntityModel.GetFrom(hotkey!, hotkeyGroup, isHoldSpace, faction, immortal);
if (entity == null)
{
return;

40
IGP/Pages/Documentation/Parts/DocumentComponent.razor

@ -1,4 +1,7 @@
@using System.Net.Http.Json
@using Markdig.Extensions.Yaml
@using Markdig.Syntax
@using YamlDotNet.Serialization
@inject HttpClient httpClient
@if (content == null)
@ -9,15 +12,17 @@ else
{
<div class="doc">
<div class="docHeader">
<div class="docTitle">@DocContentModel.Name</div>
<div class="docTitle">@docFrontMatter.Title</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 class="docDateUpdated"><b>Updated</b>: @docFrontMatter.UpdatedDate.ToString("MM/dd/yyyy")</div>
<div class="docDateCreated"><b>Created</b>: @docFrontMatter.CreatedDate.ToString("MM/dd/yyyy")</div>
</div>
</div>
<div class="docContent">@((MarkupString)Markdown.ToHtml(content, pipeline))</div>
<div class="docContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
<div class="docFooter"><EditLinkComponent Href="@GitUrl"></EditLinkComponent></div>
</div>
}
<style>
@ -35,6 +40,11 @@ else
flex-direction: column;
}
.docFooter {
display: flex;
justify-content: flex-end;
}
th {
padding: 8px;
border: 1px solid gray;
@ -46,12 +56,22 @@ else
</style>
@code {
[Parameter]
public DocContentModel DocContentModel { get; set; } = default!;
[Parameter] public DocContentModel DocContentModel { get; set; } = default!;
DocFrontMatterModel docFrontMatter = null!;
private string? content = null;
MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
string? content = null;
private async Task<string> LoadContent() => content = await httpClient.GetStringAsync($"content/docs/{DocContentModel.Content}.md");
private string Filepath => $"content/docs/{DocContentModel.Content}.md";
private string GitUrl => $"{Project.GitResourcesUrl}/{Filepath}";
private MarkdownPipeline Pipeline => MarkdownFiles.Pipeline;
private async Task<DocFrontMatterModel> LoadContent() {
content = await MarkdownFiles.LoadMarkdown(httpClient, Filepath);
return docFrontMatter =
await MarkdownFiles.LoadFrontMatter<DocFrontMatterModel>(httpClient, Filepath);
}
protected override async Task OnParametersSetAsync() => await LoadContent();
protected override async Task OnInitializedAsync() => await LoadContent();
}

3
IGP/Pages/Documentation/Parts/DocumentNavComponent.razor

@ -13,7 +13,8 @@
.docNavContainer {
display: flex;
flex-direction: column;
}
gap: 8px;
}
.docNavButton a {
color: white;

36
IGP/Pages/Notes/Parts/NoteComponent.razor

@ -8,14 +8,14 @@ else
{
<div class="note">
<div class="noteHeader">
<div class="noteTitle">@NoteContentModel.Name</div>
<div class="noteTitle">@noteFrontMatter.Title</div>
<div class="noteDates">
<div class="noteDateUpdated"><b>Updated</b>: @NoteContentModel.UpdatedDate.ToString("MM/dd/yyyy")</div>
<div class="noteDateCreated"><b>Created</b>: @NoteContentModel.CreatedDate.ToString("MM/dd/yyyy")</div>
<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="noteContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
<div class="noteFooter"><EditLinkComponent Href="@GitUrl"></EditLinkComponent></div>
</div>
}
@ -34,15 +34,31 @@ else
flex-direction: column;
}
.noteFooter {
display: flex;
justify-content: flex-end;
}
</style>
@code {
[Parameter]
public NoteContentModel NoteContentModel { get; set; } = default!;
[Parameter] public NoteContentModel NoteContentModel { get; set; } = default!;
NoteFrontMatterModel noteFrontMatter = null!;
private string? content = null;
string? content = null;
MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
private async Task<string> LoadContent() => content = await httpClient.GetStringAsync($"content/notes/{NoteContentModel.Content}.md");
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();

5
IGP/Pages/Notes/Parts/NoteNavComponent.razor

@ -11,8 +11,9 @@
<style>
.noteNavContainer {
display: flex;
flex-direction: column;
display: flex;
flex-direction: column;
gap: 8px;
}
.noteNavButton a {

2
Components/Utils/ProductionService.cs → IGP/Utils/Interval.cs

@ -1,4 +1,4 @@
namespace Components.Utils;
namespace IGP.Utils;
public static class Interval {
public static string ToTime(int interval) {

51
IGP/Utils/Markdown.cs

@ -0,0 +1,51 @@
using Markdig;
using Markdig.Extensions.Yaml;
using Markdig.Syntax;
using Model.Doc;
using YamlDotNet.Serialization;
namespace IGP.Utils;
public static class MarkdownFiles {
private static readonly IDeserializer YamlDeserializer =
new DeserializerBuilder()
.IgnoreUnmatchedProperties()
.Build();
public static readonly MarkdownPipeline Pipeline
= new MarkdownPipelineBuilder()
.UseYamlFrontMatter()
.UseAdvancedExtensions()
.Build();
public static async Task<string> LoadMarkdown(HttpClient httpClient, string filepath)
{
return await httpClient.GetStringAsync(filepath);
}
public static async Task<T> LoadFrontMatter<T>(HttpClient httpClient, string filepath) {
var markdown = await LoadMarkdown(httpClient, filepath);
var document = Markdown.Parse(markdown, Pipeline);
var block = document
.Descendants<YamlFrontMatterBlock>()
.FirstOrDefault();
if (block == null)
return default!;
var yaml =
block
.Lines
.Lines
.OrderByDescending(x => x.Line)
.Select(x => $"{x}\n")
.ToList()
.Select(x => x.Replace("---", string.Empty))
.Where(x => !string.IsNullOrWhiteSpace(x))
.Aggregate((s, agg) => agg + s);
return YamlDeserializer.Deserialize<T>(yaml);
}
}

6
IGP/Utils/Project.cs

@ -0,0 +1,6 @@
namespace IGP.Utils;
public static class Project {
public static string GitResourcesUrl => "https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/blob/develop/IGP/wwwroot/";
}

2
IGP/_Imports.razor

@ -6,7 +6,7 @@
@using Components.Layout
@using Components.Navigation
@using Components.Shared
@using Components.Utils
@using IGP.Utils
@using System.Globalization
@using IGP.Dialog
@using IGP.Pages

7
IGP/wwwroot/content/docs/cheat-sheet.md

@ -1,3 +1,10 @@
---
title: Cheat Sheet
summary: Handy links or quick information on this project.
created_date: 2022-04-11
updated_date: 2022-04-11
---
# Overview
This document will contain quick reference information on this project.

17
IGP/wwwroot/content/docs/project-data.md

@ -1,3 +1,10 @@
---
title: Project Data
summary: Using data in this project.
created_date: 2022-04-11
updated_date: 2022-04-11
---
# Overview
This document will contain general information on data in this project.
@ -87,12 +94,6 @@ Most text isn't using localized strings yet. And English is the only plan of sup
## 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.
Documents and Notes are markdown files located in the `wwwroot/content` folder.
Each of these pages will have one of those `edit on github` buttons.
Navigation to these pages is handled via the SQL data.

8
IGP/wwwroot/content/docs/setup.md

@ -1,3 +1,11 @@
---
title: Setup
summary: Get set up on developing this web project.
created_date: 3/30/2022
updated_date: 4/7/2022
---
# Overview
This document will contain general setup notes for the project.

83
IGP/wwwroot/content/notes/coop/holdout.md

@ -1,79 +1,46 @@
# Overview
---
title: Holdout
summary: First coop test map in pre-alpha.
created_date: 2/18/2022
updated_date: 2/18/2022
---
This document will contain general setup notes for the project.
Information contained in this note is based on this <a href="https://www.youtube.com/watch?v=XkAgOCIz3DE">YouTube, Reference Video</a>.
## Prerequisite
![Open Bases](./image/notes/coop-holdout/OpenBases.png)
To understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio.
**Open Bases**
- [GitHub Documentation](https://docs.github.com/en/get-started)
On 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.
- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/)
You 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.
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/)
![Enemy Spawns](./image/notes/coop-holdout/EnemySpawns.png)
Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal: Gates of Pyre".
**Enemy Spawn Areas**
- [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.
The first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and won't be a threat until the 15-minute mark.
## Installation
![Defend Points](./image/notes/coop-holdout/DefendPoints.png)
Download and install Visual Studio preview.
**Pyre Towers**
**Note:** Visual Studio Preview currently doesn't work on Mac for this project. Use a PC, or Rider.
You have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers.
[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/)
The 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.
When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | **.NET WebAssembly build tools**".
![Pyre](./image/notes/coop-holdout/Pyre.png)
## Download Project
**Pyre Camps**
Get this project from GitHub.
When 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.
```bash
git clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git
```
![Multipliers](./image/notes/coop-holdout/Multipliers.png)
## Project Tree
**Multipliers**
```
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
```
If 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's possible to go past the supply cap.
## 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).
But really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as possible.

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/CoopBaseLarge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/DefendPoints.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/EnemySpawns.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/Multipliers.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/OpenBases.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

BIN
IGP/wwwroot/content/notes/coop/image/notes/coop-holdout/Pyre.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

2
IGP/wwwroot/generated/GitChangeModels.json

File diff suppressed because one or more lines are too long

2
IGP/wwwroot/generated/GitPatchModels.json

@ -1 +1 @@
[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":26,"Name":"Notes/Docs Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":27,"Name":"Stream Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"}]
[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":26,"Name":"Notes/Docs Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":27,"Name":"Stream Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":28,"Name":"enterName","Date":"2022-05-10T00:00:00","GitChangeModels":[],"Important":"False"}]

90
IGP/wwwroot/markdown/documentation/setup.md

@ -1,90 +0,0 @@
# Setup
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.
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
│ └───markdown
│ └───documentation # Documentation files
├───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
**Important:** publishing new version of the website will not occur until
issue [39528](https://github.com/dotnet/aspnetcore/issues/39528) in dotnet/aspnetcore is resolved.
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 [IGP Fan Reference](https://discord.gg/uMq8bMGeeN) Discord.

54
IGP/wwwroot/markdown/notes/coop.md

@ -1,54 +0,0 @@
---
LastUpdated: 2022-02-18 Section: "Coop"
Name: "Coop Holdout, Some distant place (Nuath)"
IsPreAlpha: true
---
Information contained in this note is based on this <a href="https://www.youtube.com/watch?v=XkAgOCIz3DE">YouTube,
Reference Video</a>.
<img width="420" style="margin: auto; border:2px solid black;" src="image/notes/coop-holdout/OpenBases.png" />
<div style="margin: auto; text-align:center;"><b>Open Bases</b></div>
On 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.
You 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.
<img width="420" style="margin: auto; border:2px solid black;" src="image/notes/coop-holdout/EnemySpawns.png" />
<div style="margin: auto; text-align:center;"><b>Enemy Spawn Areas</b></div>
The first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and
won't be a threat until the 15-minute mark.
<img width="420" style="margin: auto; border:2px solid black;" src="image/notes/coop-holdout/DefendPoints.png" />
<div style="margin: auto; text-align:center;"><b>Pyre Towers</b></div>
You have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers.
The 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.
<img width="420" style="margin: auto; border:2px solid black;" src="image/notes/coop-holdout/Pyre.png" />
<div style="margin: auto; text-align:center;"><b>Pyre Camps</b></div>
When 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.
<img width="420" style="margin: auto; border:2px solid black;" src="image/notes/coop-holdout/Multipliers.png" />
<div style="margin: auto; text-align:center;"><b>Multipliers</b></div>
If 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's
possible to go past the supply cap.
But really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as
possible.

12
Model/Doc/DocFrontMatterModel.cs

@ -0,0 +1,12 @@
using System;
using YamlDotNet.Serialization;
namespace Model.Doc;
public class DocFrontMatterModel
{
[YamlMember(Alias = "title")] public string Title { get; set; }
[YamlMember(Alias = "summary")] public string Summary { get; set; }
[YamlMember(Alias = "created_date")] public DateTime CreatedDate { get; set; }
[YamlMember(Alias = "updated_date")] public DateTime UpdatedDate { get; set; }
}

12
Model/Notes/NoteFrontMatterModel.cs

@ -0,0 +1,12 @@
using System;
using YamlDotNet.Serialization;
namespace Model.Notes;
public class NoteFrontMatterModel
{
[YamlMember(Alias = "title")] public string Title { get; set; }
[YamlMember(Alias = "summary")] public string Summary { get; set; }
[YamlMember(Alias = "created_date")] public DateTime CreatedDate { get; set; }
[YamlMember(Alias = "updated_date")] public DateTime UpdatedDate { get; set; }
}

41
Services/Development/DocumentationService.cs

@ -54,13 +54,7 @@ public class DocumentationService : IDocumentationService
DocSectionModels =
(await httpClient.GetFromJsonAsync<DocSectionModel[]>("generated/DocSectionModels.json") ??
Array.Empty<DocSectionModel>()).ToList();
#if DEBUG
AddTestCode();
#endif
//TODO Until SQL work in production. Or, why even add SQL?
SortSql();
isLoaded = true;
@ -141,39 +135,6 @@ public class DocumentationService : IDocumentationService
}
private void AddTestCode()
{
DocContentModels.Add(new DocContentModel
{
Id = -110, Name = "Root Parent", Href = "root-parent", CreatedDate = DateTime.Now,
UpdatedDate = DateTime.Now, Content = "Example root parent"
});
DocContentModels.Add(new DocContentModel
{
Id = -109, Name = "Child Parent", Href = "child-parent", CreatedDate = DateTime.Now,
UpdatedDate = DateTime.Now, Content = "Example child parent"
});
DocContentModels.Add(new DocContentModel
{
Id = -108, Name = "Child Child 2", Href = "child-child", CreatedDate = DateTime.Now,
UpdatedDate = DateTime.Now, Content = "Example child child"
});
DocContentModels.Add(new DocContentModel
{
Id = -107, Name = "A", Href = "A", CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, Content = "A"
});
DocContentModels.Add(new DocContentModel
{
Id = -106, Name = "B", Href = "B", CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, Content = "B"
});
DocConnectionModels.Add(new DocConnectionModel { Id = -110, ParentId = -110, ChildId = -109 });
DocConnectionModels.Add(new DocConnectionModel { Id = -109, ParentId = -109, ChildId = -108 });
DocConnectionModels.Add(new DocConnectionModel { Id = -108, ParentId = -108, ChildId = -106 });
DocConnectionModels.Add(new DocConnectionModel { Id = -107, ParentId = -108, ChildId = -107 });
}
private void NotifyDataChanged()
{
OnChange?.Invoke();

Loading…
Cancel
Save