Fan website of IMMORTAL: Gates of Pyre.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
9.6 KiB

[{"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"}]