File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed
Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 44
55<h2 class =" mb-4" >Latest Blogs</h2 >
66
7- <h4 class =" mb-4" >
8- @foreach( var tag in SiteMap .Pages .SelectMany (x => x .Tags ).Distinct ())
9- {
10- var route = $" /filtered-blogs?tag={tag }" ;
11- <a href =" @route" class =" text-info px-2" >#@tag </a >
12- }
13- </h4 >
147<div class =" row row-cols-1 row-cols-md-3 g-4 p-2" >
8+ <div class =" col col-md-12" >
9+ <h4 class =" d-flex flex-wrap" >
10+ @foreach ( var tag in SiteMap .Pages .SelectMany (x => x .Tags ).Distinct ())
11+ {
12+ var route = $" /filtered-blogs?tag={tag }" ;
13+ <a href =" @route" class =" text-info px-2" >#@tag </a >
14+ }
15+ </h4 >
16+ </div >
17+ </div >
1518
19+ <div class =" row row-cols-1 row-cols-md-3 g-4 p-2" >
1620 @{
17- foreach (var articlePage in SiteMap .Pages )
21+ foreach (var articlePage in SiteMap .Pages . OrderByDescending ( x => x . PublishedOn ) )
1822 {
1923 <div class =" col" >
2024 <Thumbnail ImageUrl =" @articlePage.ArticleImage" Title =" @articlePage.Header" Author =" Ajay kumar"
21- Date =" @articlePage.PublishedOn.ToLongDateString()" Category =" @articlePage.Tags"
22- BlogUrl =" @articlePage.RelativePath" />
25+ Date =" @articlePage.PublishedOn.ToLongDateString()" Category =" @articlePage.Tags"
26+ BlogUrl =" @articlePage.RelativePath" />
2327 </div >
2428 }
2529 }
Original file line number Diff line number Diff line change 1111<div class =" row row-cols-1 row-cols-md-3 g-4 p-2" >
1212
1313 @{
14- foreach (var articlePage in SiteMap .Pages .Where (x => Tag is null || x .Tags .Contains (Tag )).ToList ())
14+ foreach (var articlePage in SiteMap .Pages
15+ .Where (x => Tag is null || x .Tags .Contains (Tag ))
16+ .OrderByDescending (x => x .PublishedOn )
17+ .ToList ())
1518 {
1619 <div class =" col" >
1720 <Thumbnail ImageUrl =" @articlePage.ArticleImage" Title =" @articlePage.Header" Author =" Ajay kumar"
You can’t perform that action at this time.
0 commit comments