|
1 | | -# dev-arena |
| 1 | +This project is intended to be a static website representing a technical and software engineering blog. |
| 2 | + |
| 3 | +Project structure |
| 4 | +- Layout folder |
| 5 | + - It contains files and component to support overall them and layout of the site |
| 6 | +- wwwroot |
| 7 | + - This folder is responsible for custom theming and acts as a starter point for site startup |
| 8 | +- Pages |
| 9 | + - This folder can be ignored for now as its deprecated |
| 10 | +- Blog |
| 11 | + - This folder has main things going on. This folder has files and component that support in writing the blog content. |
| 12 | + - Steps on how to write a blog using the component inside the project |
| 13 | + - Blog started with defining the header of the blog using `TestArena.Blog.Common.Header` Component |
| 14 | + - It takes blog title, image, published on date and authors like below and created the content like in image below ![[Pasted image 20250316123234.png]] |
| 15 | + - Images will be stored and read taken from the wwwroot/images/blog/<BLOG_TOPIC>/<BLOG_CHAPTER> folder |
| 16 | + - After this, the blog starts normally with the content |
| 17 | + - The whole article will be placed under `TestArena.Blog.Common.Section` component like in below image ![[Pasted image 20250316124801.png]] |
| 18 | + - Anything that starts with a heading will be counted as a section and `TestArena.Blog.Common.Section` Component will be used for it. |
| 19 | + - This component will take the following details |
| 20 | + - Heading: It will be the heading of the section |
| 21 | + - Level: This will tell the impact/font weight of the heading. Will range from 1 to 6. 1 being largest and 6 being smallest. |
| 22 | + - All other details will go inside child component |
| 23 | + - An example of usage of Section component is given in image below |
| 24 | + - ![[Pasted image 20250316123152.png]] |
| 25 | + - The blog will have images as well in between |
| 26 | + - Each image will be rendered using `TestArena.Blog.Common.BlogImage` Component. It will take below params |
| 27 | + - Image path: Path of the image. Usually it will be `wwwroot/images/blog/<BLOG_TOPIC>/<BLOG_CHAPTER> folder` |
| 28 | + - Description: Description of the image |
| 29 | + - Number: This will be the number which will represent the image number based on where it is placed in the blog. While deciding this number, header image will not be taken into account. |
| 30 | + - Example usage: ![[Pasted image 20250316123639.png]] |
| 31 | + - Blog will also contain code snippets at places |
| 32 | + - Each code snippet will use the the component `TestArena.Blog.Common.GithubGistSnippet` Component. |
| 33 | + - To make this component work, we will have to create a github jist first for the code snippet and use its id inside it. |
| 34 | + - It will take the below params: |
| 35 | + - Title: This represent the purpose of the code piece |
| 36 | + - UserId: UserId of the use who has hosted the gist code |
| 37 | + - FileName: Id of the gist file. For automated conversions use the default gist id `d5a6faaf1e103a6f90c0e92bcc69a440` |
| 38 | + - Example usage: ![[Pasted image 20250316124241.png]] |
| 39 | + - Blog might also contain lists at some times |
| 40 | + - Use the `TestArena.Blog.Common.List` component for that. It will use the below params: |
| 41 | + - Heading: Heading of the list |
| 42 | + - HeadingLevel: This will tell the impact/font weight of the heading. Will range from 1 to 6. 1 being largest and 6 being smallest. |
| 43 | + - ChildContents: This would be of type `List<RenderFragment>`. Example list creation looks like in below image![[Pasted image 20250316124546.png]] |
| 44 | + - Example list usage looks like in image below ![[Pasted image 20250316124617.png]] |
| 45 | + - |
0 commit comments