-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* basic layout changes * improve layouts * index * using namespace * fix failing tests * fix failing tests * fix login display being visible on mobile view * sticky nav * upgrade to bootstrap 5.3 add theme toggling * test ThemeToggle * apply theme to password reset and reset request * add boostrap js to reset and reset request * remove debug code * add pages for explore, home, and about * custom scrollbar * remove unnecessary TODO
- Loading branch information
Showing
25 changed files
with
398 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@using HVZ.Web.Shared.Ui_Helpers | ||
|
||
@inherits Bunit.TestContext | ||
|
||
@code { | ||
|
||
[OneTimeSetUp] | ||
public void Setup() | ||
{ | ||
|
||
} | ||
|
||
[Test] | ||
public void Test_LightMode() | ||
{ | ||
JSInterop.Setup<string>("getThemePreference", _ => true).SetResult("light"); | ||
|
||
var cut = RenderComponent<ThemeToggle>(); | ||
|
||
cut.Render(); | ||
|
||
var icon = cut.Find("i"); | ||
var toggle = cut.Find("button"); | ||
icon.MarkupMatches(@<i class="fa-solid fa-sun"></i>); | ||
toggle.MarkupMatches(@<button diff:ignoreChildren class="btn btn-outline-dark"></button>); | ||
} | ||
|
||
[Test] | ||
public void Test_DarkMode() | ||
{ | ||
JSInterop.Setup<string>("getThemePreference", _ => true).SetResult("dark"); | ||
|
||
var cut = RenderComponent<ThemeToggle>(); | ||
|
||
cut.Render(); | ||
|
||
var icon = cut.Find("i"); | ||
var toggle = cut.Find("button"); | ||
icon.MarkupMatches(@<i class="fa-solid fa-moon"></i>); | ||
toggle.MarkupMatches(@<button diff:ignoreChildren class="btn btn-outline-light"></button>); | ||
} | ||
|
||
[Test] | ||
public void Test_ToggleTheme() | ||
{ | ||
JSInterop.Setup<String>("getThemePreference", _ => true).SetResult("light"); | ||
var savePref = JSInterop.SetupVoid("saveThemePreference", _ => true); | ||
var applyTheme = JSInterop.SetupVoid("applyTheme", _ => true); | ||
|
||
var cut = RenderComponent<ThemeToggle>(); | ||
|
||
cut.Render(); | ||
|
||
var toggle = cut.Find("button"); | ||
toggle.MarkupMatches( | ||
@<button class="btn btn-outline-dark"> | ||
<i class="fa-solid fa-sun"></i> | ||
</button>); | ||
|
||
toggle.Click(); | ||
savePref.SetVoidResult(); | ||
applyTheme.SetVoidResult(); | ||
|
||
toggle.MarkupMatches( | ||
@<button class="btn btn-outline-light"> | ||
<i class="fa-solid fa-moon"></i> | ||
</button>); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@using Microsoft.AspNetCore.Components.Authorization | ||
@using HVZ.Web.Services | ||
@inject NavigationManager Navigation | ||
@inject AuthenticationStateProvider AuthenticationStateProvider | ||
@inject EmailService Email | ||
@page "/about" | ||
|
||
<PageTitle>PlayHVZ</PageTitle> | ||
|
||
<div class="container"> | ||
<h1>Welcome to PlayHVZ.org</h1> | ||
@*This lives here for now until we create a settings page*@ | ||
<HVZ.Web.Shared.Ui_Helpers.ThemeToggle /> | ||
<p class="mb-3">PlayHVZ is a tool for managing games of Humans vs Zombies.</p> | ||
<CascadingAuthenticationState> | ||
|
||
<AuthorizeView> | ||
|
||
<Authorized> | ||
<p>Welcome back</p> | ||
</Authorized> | ||
<NotAuthorized> | ||
<div class="row d-flex justify-content-center"> | ||
<div class="col-auto text-center mb-3"> | ||
<h4>New to PlayHVZ?</h4> | ||
<a href="Account/Register" class="btn btn-primary btn-lg">Register</a> | ||
</div> | ||
<div class="col-auto text-center mb-3"> | ||
<h4>Returning user?</h4> | ||
<a href="Account/Login" class="btn btn-primary btn-lg">Login</a> | ||
</div> | ||
</div> | ||
</NotAuthorized> | ||
|
||
</AuthorizeView> | ||
|
||
</CascadingAuthenticationState> | ||
|
||
|
||
<h1>Features</h1> | ||
<ul> | ||
<li> | ||
Organization management | ||
</li> | ||
<li> | ||
OZs | ||
</li> | ||
<li> | ||
Discord integration | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,15 @@ | |
|
||
@{ | ||
} | ||
|
||
<html lang="en" data-bs-theme="dark"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap-dark.min.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<link href="HVZ.Web.styles.css" rel="stylesheet" /> | ||
<script src="https://kit.fontawesome.com/168d40dd96.js" crossorigin="anonymous"></script> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
|
||
|
@@ -64,7 +65,8 @@ | |
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<script src="js/theme.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script> | ||
</body> | ||
<script src="_framework/blazor.server.js"></script> | ||
<script src="_framework/blazor.server.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,15 @@ | |
@{ | ||
} | ||
|
||
<html lang="en" data-bs-theme="light"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap-dark.min.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<link href="HVZ.Web.styles.css" rel="stylesheet" /> | ||
<script src="https://kit.fontawesome.com/168d40dd96.js" crossorigin="anonymous"></script> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
|
||
|
@@ -71,5 +73,8 @@ | |
|
||
</div> | ||
</div> | ||
<script src="js/theme.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script> | ||
</body> | ||
<script src="_framework/blazor.server.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,10 @@ | |
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap-dark.min.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<link href="HVZ.Web.styles.css" rel="stylesheet" /> | ||
<script src="https://kit.fontawesome.com/168d40dd96.js" crossorigin="anonymous"></script> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
<title>Reset Password</title> | ||
|
@@ -55,7 +56,9 @@ | |
</div> | ||
} | ||
</div> | ||
<script src="js/theme.js"></script> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script> | ||
|
||
</body> | ||
<script src="_framework/blazor.server.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,10 @@ | |
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap-dark.min.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<link href="HVZ.Web.styles.css" rel="stylesheet" /> | ||
<script src="https://kit.fontawesome.com/168d40dd96.js" crossorigin="anonymous"></script> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
<title>Reset Password</title> | ||
|
@@ -45,7 +46,7 @@ | |
<h2 class="text-center">Success! Please check your email.</h2> | ||
} | ||
</div> | ||
|
||
|
||
<script src="js/theme.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script> | ||
</body> | ||
<script src="_framework/blazor.server.js"></script> | ||
<script src="_framework/blazor.server.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@page "/explore" | ||
|
||
<h1>Explore</h1> | ||
|
||
@code { | ||
|
||
} |
Oops, something went wrong.