Improved ArticleView
This commit is contained in:
		
							parent
							
								
									18a395cdcf
								
							
						
					
					
						commit
						1af00d1e90
					
				|  | @ -1,22 +1,37 @@ | ||||||
| @page "/article/{id:guid}" | @page "/article/{id:guid}" | ||||||
| @using Microsoft.EntityFrameworkCore | @using Microsoft.EntityFrameworkCore | ||||||
| @using Wave.Data | @using Wave.Data | ||||||
|  | @using Humanizer | ||||||
|  | @using System.Globalization | ||||||
| 
 | 
 | ||||||
| @inject IDbContextFactory<ApplicationDbContext> ContextFactory; | @inject IDbContextFactory<ApplicationDbContext> ContextFactory; | ||||||
| 
 | 
 | ||||||
| <PageTitle>Wave - @Article.Title</PageTitle> | <PageTitle>Wave - @Article.Title</PageTitle> | ||||||
| 
 | 
 | ||||||
| <h1 class="text-3xl lg:text-5xl font-light mb-6">@Article.Title</h1> | <h1 class="text-3xl lg:text-5xl font-light">@Article.Title</h1> | ||||||
| <div class="flex gap-2 mb-6"> | <p class="mb-6"> | ||||||
|  |     <small class="text-sm text-neutral-content"> | ||||||
|  |         @Article.PublishDate.Humanize() | ||||||
|  |         @if (Article.LastModified is not null) { | ||||||
|  |             <text> (Modified @Article.LastModified.Humanize())</text> | ||||||
|  |         } | ||||||
|  |     </small> | ||||||
|  | </p> | ||||||
|  | 
 | ||||||
|  | <hr class="my-3" /> | ||||||
|  | 
 | ||||||
|  | <div class="prose mb-6"> | ||||||
|  |     @Content | ||||||
|  | </div> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | <div class="flex gap-2"> | ||||||
|     <ProfilePill Profile="Article.Author" RoleTag="Author" /> |     <ProfilePill Profile="Article.Author" RoleTag="Author" /> | ||||||
|     @if (Article.Reviewer is not null && Article.Reviewer.Id != Article.Author.Id) { |     @if (Article.Reviewer is not null && Article.Reviewer.Id != Article.Author.Id) { | ||||||
|         <ProfilePill Profile="Article.Reviewer" RoleTag="Reviewer" /> |         <ProfilePill Profile="Article.Reviewer" RoleTag="Reviewer" /> | ||||||
|     } |     } | ||||||
| </div> | </div> | ||||||
| 
 | 
 | ||||||
| <div class="prose"> |  | ||||||
|     @Content |  | ||||||
| </div> |  | ||||||
| 
 | 
 | ||||||
| @code { | @code { | ||||||
|     [Parameter] |     [Parameter] | ||||||
|  |  | ||||||
|  | @ -10,6 +10,9 @@ | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <PackageReference Include="Humanizer.Core" Version="2.14.1" /> | ||||||
|  |     <PackageReference Include="Humanizer.Core.de" Version="2.14.1" /> | ||||||
|  |     <PackageReference Include="Humanizer.Core.uk" Version="2.14.1" /> | ||||||
|     <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.5.0" /> |     <PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.5.0" /> | ||||||
|     <PackageReference Include="Markdig" Version="0.34.0" /> |     <PackageReference Include="Markdig" Version="0.34.0" /> | ||||||
|     <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" /> |     <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" /> | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								Wave/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Wave/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -7,6 +7,7 @@ | ||||||
|     "author": "Mia Rose Winter", |     "author": "Mia Rose Winter", | ||||||
|     "license": "MIT", |     "license": "MIT", | ||||||
|     "devDependencies": { |     "devDependencies": { | ||||||
|  |         "@tailwindcss/typography": "^0.5.10", | ||||||
|         "autoprefixer": "^10.4.16", |         "autoprefixer": "^10.4.16", | ||||||
|         "cssnano": "^6.0.3", |         "cssnano": "^6.0.3", | ||||||
|         "daisyui": "^4.6.0", |         "daisyui": "^4.6.0", | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ module.exports = { | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|     plugins: [require("daisyui")], |     plugins: [require("daisyui"), require('@tailwindcss/typography')], | ||||||
|     daisyui: { |     daisyui: { | ||||||
|         logs: false, |         logs: false, | ||||||
|         themes: [ |         themes: [ | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								Wave/wwwroot/css/main.min.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								Wave/wwwroot/css/main.min.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in a new issue