Skip to content

Commit

Permalink
Merge pull request #1376 from Artsdatabanken/revert/categoryBar
Browse files Browse the repository at this point in the history
Revert Merge pull request #1370 Kategoribar
  • Loading branch information
matssa authored Jan 3, 2024
2 parents fadd7ce + 3971e0d commit 6b5ebaf
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 156 deletions.
2 changes: 0 additions & 2 deletions Assessments.Frontend.Web/Models/PartialViewModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public class CategoryBarListElement

public class CategoryDescriptionViewModel
{
public AssessmentType AssessmentType { get; set; }

public string CategoryShort { get; set; }

public CategoryBarListElement[] CategoryBar { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

var categoryDescriptionViewModel = new CategoryDescriptionViewModel()
{
AssessmentType = Assessments.Frontend.Web.Infrastructure.Enums.AssessmentType.AlienSpecies2023,
CategoryShort = assessment.Category.ToString(),
CategoryBar = Enum.GetValues<AlienSpeciesAssessment2023Category>().Select(x => new CategoryBarListElement()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@

var categoryDescriptionViewModel = new CategoryDescriptionViewModel()
{
AssessmentType = Assessments.Frontend.Web.Infrastructure.Enums.AssessmentType.RedlistSpecies2021,
CategoryShort = Model.Category,
CategoryBar = new CategoryBarListElement[]
{
Expand Down Expand Up @@ -138,7 +137,7 @@
Name = "Ikke vurdert",
NameShort = "NE"
},
}.Reverse().ToArray(),
},
MethodUrl = "https://www.artsdatabanken.no/rodlisteforarter2021/Metode#316483"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,16 @@

<div class="page_section">
<div class="page_section">
<ul class="category_displayer @Model.AssessmentType.ToString()">
<ul class="category_displayer">
@foreach (var category in Model.CategoryBar)
{
<li class="@GetActiveElement(category.NameShort)">
<div class="category_item @category.NameShort">
@(GetActiveElement(category.NameShort) == active ? Model.CategoryShort : category.NameShort)
<span>@(GetActiveElement(category.NameShort) == active ? Model.CategoryShort : category.NameShort)</span>
</div>
<span class="tag">@category.Name</span>
</li>
@if(category.NameShort == "NR" || category.NameShort == "NA")
{
<li class="no-space"></li>
}
}
}
</ul>
</div>
<a href="@Model.MethodUrl" class="link-styled">
Expand Down
2 changes: 1 addition & 1 deletion Assessments.Frontend.Web/Views/Shared/_ListView.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<span class="list_cell categorytag">
<span class="@item.CategoryShort[..2] category_tag">
@item.CategoryShort
<span class="category_tag_label">@item.CategoryShort</span>
</span>
</span>
</a>
Expand Down
13 changes: 11 additions & 2 deletions Assessments.Frontend.Web/wwwroot/css/bnw.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
.highcontrast .LC,
.highcontrast .NA,
.highcontrast .NE,
.highcontrast .NR,
.highcontrast .NT {
color: white;
background: #262f31;
Expand Down Expand Up @@ -268,6 +267,12 @@ color: #FFF9F0;
border-color: #262f31;
}

/* WHITE BORDER */
.darktheme .category_displayer li.active .category_item,
.darktheme .category_displayer .notactive .category_item {
border-color: white;
}

/* ACTIVE BORDER */
.darktheme .see_all .habitat_element.active {
border-color: #f97474;
Expand Down Expand Up @@ -338,6 +343,10 @@ color: #FFF9F0;
border-bottom-color: #262f31;
}

.darktheme .category_displayer::before{
background:white;
}

.darktheme .list-search,
.darktheme hr {
border-color: #403d3d;
Expand Down Expand Up @@ -427,7 +436,7 @@ color: #FFF9F0;
border-color: #f9d754
}

.darktheme.highcontrast .category_displayer .active .category_item {
.darktheme.highcontrast .category_displayer .active .category_item span{
color: #262f31;
}

Expand Down
Loading

0 comments on commit 6b5ebaf

Please sign in to comment.