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