Skip to content

Commit

Permalink
Merge pull request #60 from simeneilevstjonn/develop
Browse files Browse the repository at this point in the history
HOTFIX v1.2.0
  • Loading branch information
simeneilevstjonn authored Apr 6, 2020
2 parents fcea76b + 76d4507 commit cf74be1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
54 changes: 25 additions & 29 deletions Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,40 +32,36 @@
</table>
</p>
</div>

@*Custom countdowns*@
@if (SignInManager.IsSignedIn(User))
</div>
@*Custom countdowns*@
@if (SignInManager.IsSignedIn(User))
{
Dictionary<string, string> ccdData = Startup._DbMaster.GetDictionaryFromSql($"SELECT TOP (10) [Id], [CountdownText] FROM [dbo].[CustomCountdowns] WHERE [Owner] = N'{User.FindFirstValue(ClaimTypes.NameIdentifier)}' ORDER BY [CountdownTime] DESC;");
@if (ccdData.Count > 0)
{
Dictionary<string, string> ccdData = Startup._DbMaster.GetDictionaryFromSql($"SELECT TOP (10) [Id], [CountdownText] FROM [dbo].[CustomCountdowns] WHERE [Owner] = N'{User.FindFirstValue(ClaimTypes.NameIdentifier)}' ORDER BY [CountdownTime] DESC;");
@if (ccdData.Count > 0)
{
<div class="col col-sm-12 col-md-6 p-2">
<div class="card p-2 h-100 mainpagecard">
<h2>Neste egendefinerte nedtellinger</h2>
@foreach (KeyValuePair<string, string> data in ccdData)
{
<a class="text-left" href="/Countdown/Custom/@data.Key">@data.Value</a>
}
</div>
<div class="col col-sm-12 col-md-6 p-2">
<div class="card p-2 h-100 mainpagecard">
<h2>Neste egendefinerte nedtellinger</h2>
@foreach (KeyValuePair<string, string> data in ccdData)
{
<a class="text-left" href="/Countdown/Custom/@data.Key">@data.Value</a>
}
</div>
}
</div>
}
}

@*WNE ad*@
<div class="col col-sm-12 col-md-6 p-2">
<div class="card p-2 h-100 mainpagecard">
<h2>Er du lei av lærere som bruker ukenumre?</h2>
<img class="mx-auto w-50" src="https://static.feriecountdown.com/resources/wne-logo.png" />
<br />
<p>
Last ned Week Number Extension for <a href="https://chrome.google.com/webstore/detail/week-number-extension/fclcmbgakeahonjplbpinljmghfgnfog">Chrome</a>
eller <a href="https://addons.mozilla.org/en-US/firefox/addon/week-number-extension/">Firefox</a>.
</p>
</div>
@*WNE ad*@
<div class="col col-sm-12 col-md-6 p-2">
<div class="card p-2 h-100 mainpagecard">
<h2>Er du lei av lærere som bruker ukenumre?</h2>
<img class="mx-auto w-50" src="https://static.feriecountdown.com/resources/wne-logo.png" />
<br />
<p>
Last ned Week Number Extension for <a href="https://chrome.google.com/webstore/detail/week-number-extension/fclcmbgakeahonjplbpinljmghfgnfog">Chrome</a>
eller <a href="https://addons.mozilla.org/en-US/firefox/addon/week-number-extension/">Firefox</a>.
</p>
</div>

</div>

</div>

</div>
2 changes: 1 addition & 1 deletion appsettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Logging": {
{ "Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
Expand Down

0 comments on commit cf74be1

Please sign in to comment.