Added ordering to category badges
This commit is contained in:
parent
d7bc79d0bf
commit
6203f7accc
|
@ -30,7 +30,7 @@
|
|||
</p>
|
||||
@if (Article.Categories.Count > 0) {
|
||||
<p class="flex flex-wrap gap-2 my-3">
|
||||
@foreach (var category in Article.Categories) {
|
||||
@foreach (var category in Article.Categories.OrderBy(c => c.Color)) {
|
||||
<span class="badge badge-@CategoryUtilities.GetCssClassPostfixForColor(category.Color)">
|
||||
@category.Name
|
||||
</span>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<h2 class="text-2xl lg:text-4xl">
|
||||
@featured.Title
|
||||
<p class="flex flex-wrap gap-2">
|
||||
@foreach (var category in featured.Categories) {
|
||||
@foreach (var category in featured.Categories.OrderBy(c => c.Color)) {
|
||||
<span class="badge badge-@CategoryUtilities.GetCssClassPostfixForColor(category.Color)">
|
||||
@category.Name
|
||||
</span>
|
||||
|
|
Loading…
Reference in a new issue