From abcaa85d44aaa8e6749f90b6beba6a767f11a473 Mon Sep 17 00:00:00 2001 From: Jonathan McCaffrey Date: Mon, 11 Apr 2022 12:15:20 -0400 Subject: [PATCH] doc(CheatSheet) Adding a quick reference document --- IGP/Database.db | Bin 278528 -> 278528 bytes .../Parts/DocumentComponent.razor | 15 ++++++++++++++- IGP/wwwroot/generated/DocContentModels.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/IGP/Database.db b/IGP/Database.db index 8e5f5171645e258278fd11a4f19cae083a99e1ae..567e44171f1981ad7f652a828767bbb229f2e302 100644 GIT binary patch delta 1535 zcmbVM%}>-o6yJ6iWEV_9qr?!yi<>AOwgq+#iC)CTphiAK5-*xCv{Say?bObc4WyAx zJix(&hC}t{#dw8q*u+HR)w6$qiGKkmhKnZn+I5iyA;hLL?VI_{`~1zTR=cXzt`|Kg z^NB=a1jlt8@Um}6%5ThEnrKa)?M~*~!r_b3>CHD2#$+a`Y$cRm%C@q#+2wvy)@E30 z?Z-~%v();#)Vc&6va*dD5`D@~WqY%$b2wSM_eFZ!(SmCi2uHhWP2j}O6%>-CRn;yqC~*`5~U)1y(wKM;8%4Ml46*pdJbh#4aG4 zzfvgR;V6p9dPs2ouI0@0eX#^E>3c5YG~DQs&xD_PUJKKknuol8#zt^l|hAh^DxIKSDT%Ti=UE$F!Np- zdbq1L(pbFxSHv(}n=M9;N9#75<0{;zc%@7r;Lr-p`j%}#iE!Y)u2XLMw!MgV&!&V^ zLxsA9f=1#>@IO?&iIs`(Be7$q?PcpBOii`^A1RN^rsLuo96RuhNq560OKds1s-slI zb>@P2f*SjqPz;Q44O$sYI8>-*OZOOOrciZO)~J*7xkg+UC+_0DhHTBn@@!-Y6=Vw9 zz<@T`KRCGilhdP)nB!4LyhR*i5$vcV0K)67v8f@3-+SfmmA0x}YpW)ASW7Q9+hVO_ IEBRyMH_fQC-2eap delta 300 zcmZo@5Nv1=oFL6>#K6Gd0>lnLtT<7_oY81wg1SE&lbATOF~@XAHAdmh3;a_8IGFgq zG4TK4|F&7M;1&PmgnX9fU+cI3TF=O(z{SY_8>pE=sx?SYpWm-4VCDHIgt zZ~uLtk>3C)T)?!wN{FdFR+z7vfsN-D6Mqx$CB9Ysa=ckQw}8^ec(@yRojDm8^&1VP zO{e>AX3m+uLX=UGGtG&Efl;y=D0XZ!v)gnHaYiXF6??G4c%b0PEzHeeh0|Lcm<&0K z9Du3~>%~o{XKY~(n!ePUMUpeg5h$je3KWyv!t6Ai*_K6;tHus!f@-5A(1fV1%+X*I erUfu@v~x5tZRcoU{-4jP0Q8Z@cAgK+U;F_Q>QgZQ diff --git a/IGP/Pages/Documentation/Parts/DocumentComponent.razor b/IGP/Pages/Documentation/Parts/DocumentComponent.razor index 9e3e52a..0117f3d 100644 --- a/IGP/Pages/Documentation/Parts/DocumentComponent.razor +++ b/IGP/Pages/Documentation/Parts/DocumentComponent.razor @@ -7,7 +7,7 @@
Created: @DocContentModel.CreatedDate.ToString("MM/dd/yyyy")
-
@((MarkupString)Markdown.ToHtml(DocContentModel.Content))
+
@((MarkupString)Markdown.ToHtml(DocContentModel.Content, pipeline))
@code { [Parameter] public DocContentModel DocContentModel { get; set; } = default!; + + MarkdownPipeline pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); } \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocContentModels.json b/IGP/wwwroot/generated/DocContentModels.json index 41e945c..30cb049 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"}] \ 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":"# 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