Skip to content

Commit

Permalink
Added Sentiment
Browse files Browse the repository at this point in the history
+ Tamas' mainnav
  • Loading branch information
IvanLieckens committed Nov 28, 2024
1 parent cf05d98 commit 64298bf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion headapps/MvpSite/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageVersion Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
<PackageVersion Include="Okta.AspNetCore" Version="4.5.0" />
<PackageVersion Include="Mvp.Selections.Client" Version="4.14.0" />
<PackageVersion Include="Mvp.Selections.Client" Version="4.16.0" />
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageVersion Include="Markdig" Version="0.37.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
</div>
</div>
<div class="card-footer">
Final score: @totalScore (@((int)Math.Round(totalScore / percentageCalculationTotal * 100, 0))%)
@{ int percentScore = (int)Math.Round(totalScore / percentageCalculationTotal * 100, 0); }
Review score: <span style="color: @ScoreCardsModel.Color(percentScore)">@totalScore (@percentScore%)</span><br />
@if (review.Sentiment.HasValue)
{
<text>
Sentiment: <span class="badge @(review.Sentiment == ReviewSentiment.Yes ? "badge-success" : review.Sentiment == ReviewSentiment.Maybe ? "badge-warning" : review.Sentiment == ReviewSentiment.No ? "badge-danger" : "badge-dark")">@review.Sentiment</span>
</text>
}
</div>
</div>
<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<td>
@if (!string.IsNullOrWhiteSpace(card.Applicant?.ImageUri?.ToString()))
{
<img src="@card.Applicant.ImageUri" alt="@card.Applicant.Name" />
<img src="@card.Applicant.ImageUri" alt="@card.Applicant.Name" width="80" />
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,28 @@
<ul class="navbar-nav">
@foreach (MainNavItems link in Model.Items ?? [])
{
if ((link.Fields?.IncludeInMenu?.Value ?? false) &&
(!(link.Fields.RequiresAuthentication?.Value ?? false) || (link.Fields.RequiresAuthentication.Value && (User.Identity?.IsAuthenticated ?? false))))
if ((link.Fields?.IncludeInMenu?.Value ?? false) &&
(!(link.Fields.RequiresAuthentication?.Value ?? false) || (link.Fields.RequiresAuthentication.Value && (User.Identity?.IsAuthenticated ?? false))))
{
<li class="nav-item mx-2">
<a class="nav-link" href="@link.Url" asp-for="@link">@link.Fields.MenuTitle?.Value </a>
<a class="nav-link" href="@link.Url" asp-for="@link">@link.Fields.MenuTitle?.Value </a>
</li>
}
}
<li class="nav-item mx-2">
<a href="#otherSites" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="otherSites" class="nav-link" >our sites <span class="icon icon-chevron-down "></span></a>
<ul class="sub-menu collapse" id="otherSites">
<li> <a class="nav-item nav-link" target="_blank" href="https://developers.sitecore.com/">For Downloads <span class="icon icon-external"></span></a> </li>
<li><a class="nav-item nav-link" target="_blank" href="https://sitecore.stackexchange.com/">Stack Exchange <span class="icon icon-external"></span></a></li>
<li> <a class="nav-item nav-link" target="_blank" href="#https://community.sitecore.net/">Sitecore Community <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="https://www.youtube.com/c/discoversitecore">Discover Sitecore <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="#https://doc.sitecore.com/">Documentation <span class="icon icon-external"></span></a></li>
<li> <a class="nav-item nav-link" target="_blank" href="https://sitecore.chat/">Sitecore Chat/Slack <span class="icon icon-external"></span></a></li>
</ul>
</li>
<li class="nav-item mx-2">
<a href="#otherSites" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="otherSites" class="nav-link">Our sites <span class="icon icon-chevron-down"></span></a>
<ul class="sub-menu collapse" id="otherSites">
<li><a class="nav-item nav-link" target="_blank" href="https://community.sitecore.net/">Sitecore Community Portal <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="https://sitecore.chat/">Sitecore Community Chat <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="https://sitecore.stackexchange.com/">Sitecore StackExchange <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="https://www.youtube.com/c/discoversitecore">Discover Sitecore <span class="icon icon-external"></span></a></li>
<li><a class="nav-item nav-link" target="_blank" href="https://developers.sitecore.com/">Developer Portal <span class="icon icon-external"></span></a> </li>
<li><a class="nav-item nav-link" target="_blank" href="https://doc.sitecore.com/">Documentation <span class="icon icon-external"></span></a></li>
</ul>
</li>
</ul>
</div>
<sc-placeholder name="nav-signin"></sc-placeholder>
</nav>
</div>
</div>

0 comments on commit 64298bf

Please sign in to comment.