From 8174f9f6f6c1a1439182aa11a6bf3368a6fc1774 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 19 Dec 2021 22:50:03 +0000 Subject: [PATCH] Fiddling with html, padding, icons etc --- .../Areas/Identity/Pages/Account/Login.cshtml | 25 ++---- .../Account/Manage/ChangePassword.cshtml | 8 +- .../Account/Manage/DeletePersonalData.cshtml | 4 +- .../Pages/Account/Manage/Email.cshtml | 6 +- .../Account/Manage/EnableAuthenticator.cshtml | 4 +- .../Pages/Account/Manage/Index.cshtml | 6 +- .../Pages/Account/Manage/Lastfm.cshtml | 6 +- .../Pages/Account/Manage/ManageNavPages.cs | 2 +- .../Pages/Account/Manage/PersonalData.cshtml | 4 +- .../Pages/Account/Manage/SetPassword.cshtml | 6 +- .../Pages/Account/Manage/Spotify.cshtml | 13 ++- .../Pages/Account/Manage/Spotify.cshtml.cs | 4 + .../Pages/Account/Manage/_Layout.cshtml | 6 +- .../Pages/Account/Manage/_ManageNav.cshtml | 16 ++-- .../Identity/Pages/Account/Register.cshtml | 12 ++- Selector.Web/CSS/index.scss | 84 ++++++++++++++++++- Selector.Web/CSS/now.scss | 11 +-- Selector.Web/Pages/Index.cshtml | 4 + Selector.Web/Pages/Shared/_Layout.cshtml | 10 +-- .../Pages/Shared/_LoginPartial.cshtml | 4 +- Selector.Web/scripts/Now/Spotify.ts | 2 +- 21 files changed, 158 insertions(+), 79 deletions(-) diff --git a/Selector.Web/Areas/Identity/Pages/Account/Login.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Login.cshtml index a9e502f..a775569 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Login.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Login.cshtml @@ -10,20 +10,18 @@
-

Use a local account to log in.

-
-
+
-
+
-
+
-
+
-
+
-

Use another service to log in.

-
@{ if ((Model.ExternalLogins?.Count ?? 0) == 0) { -
-

- There are no external authentication services configured. See this article - for details on setting up this ASP.NET application to support logging in via external services. -

-
+ } else { diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/ChangePassword.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/ChangePassword.cshtml index 31a2ea5..2008940 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/ChangePassword.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/ChangePassword.cshtml @@ -11,22 +11,22 @@
-
+
-
+
-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml index c95ab92..af2fb13 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml @@ -18,13 +18,13 @@
@if (Model.RequirePassword) { -
+
} - +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml index 8ff8e39..8c034de 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Email.cshtml @@ -11,7 +11,7 @@
-
+
@if (Model.IsEmailConfirmed) { @@ -28,12 +28,12 @@ }
-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/EnableAuthenticator.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/EnableAuthenticator.cshtml index 6ea8510..eae747d 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/EnableAuthenticator.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/EnableAuthenticator.cshtml @@ -34,12 +34,12 @@
-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml index 2a18fdb..100a45c 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Index.cshtml @@ -11,16 +11,16 @@
-
+
-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Lastfm.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/Lastfm.cshtml index 1c2166b..e81e942 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Lastfm.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Lastfm.cshtml @@ -5,18 +5,18 @@ ViewData["ActivePage"] = ManageNavPages.LastFm; } -

@ViewData["Title"]

+

@ViewData["Title"]

-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/ManageNavPages.cs b/Selector.Web/Areas/Identity/Pages/Account/Manage/ManageNavPages.cs index 2fb4a76..ac005a6 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/ManageNavPages.cs +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/ManageNavPages.cs @@ -50,7 +50,7 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage { var activePage = viewContext.ViewData["ActivePage"] as string ?? System.IO.Path.GetFileNameWithoutExtension(viewContext.ActionDescriptor.DisplayName); - return string.Equals(activePage, page, StringComparison.OrdinalIgnoreCase) ? "active" : null; + return string.Equals(activePage, page, StringComparison.OrdinalIgnoreCase) ? "active" : "unselected"; } } } diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml index d64bd82..23c1831 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml @@ -13,11 +13,11 @@

Deleting this data will permanently remove your account, and this cannot be recovered.

-
+

- Delete + Delete

diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/SetPassword.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/SetPassword.cshtml index f1817aa..59ec4bb 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/SetPassword.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/SetPassword.cshtml @@ -15,17 +15,17 @@
-
+
-
+
- +
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml index 10e7a81..4d0904d 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml @@ -5,22 +5,29 @@ ViewData["ActivePage"] = ManageNavPages.Spotify; } -

@ViewData["Title"]

+

@ViewData["Title"]

+
@if (Model.SpotifyIsLinked) { - + } else { - + }
+@if (Model.SpotifyIsLinked) +{ +
+

Token last refreshed: @Model.LastRefresh

+
+} @section Scripts { diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml.cs b/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml.cs index 3bc9b3a..4ce193e 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml.cs +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/Spotify.cshtml.cs @@ -37,6 +37,9 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage [BindProperty] public bool SpotifyIsLinked { get; set; } + [BindProperty] + public DateTime LastRefresh { get; set; } + [TempData] public string StatusMessage { get; set; } @@ -49,6 +52,7 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage } SpotifyIsLinked = user.SpotifyIsLinked; + LastRefresh = user.SpotifyLastRefresh; return Page(); } diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/_Layout.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/_Layout.cshtml index 3d882cc..c477298 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/_Layout.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/_Layout.cshtml @@ -9,16 +9,14 @@ } } -

Manage your account

+

Manage

-

Change your account settings

-
-
+
@RenderBody()
diff --git a/Selector.Web/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml index 05e9f00..8e89fde 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml @@ -4,15 +4,15 @@ var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); } diff --git a/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml b/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml index e245c1d..e742ef7 100644 --- a/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml +++ b/Selector.Web/Areas/Identity/Pages/Account/Register.cshtml @@ -9,30 +9,28 @@
-

Create a new account.

-
-
+
-
+
-
+
-
+
- +
diff --git a/Selector.Web/CSS/index.scss b/Selector.Web/CSS/index.scss index 14133fa..39e42c5 100644 --- a/Selector.Web/CSS/index.scss +++ b/Selector.Web/CSS/index.scss @@ -1,5 +1,85 @@ @import "now.scss"; body { - background-color: #c6c6c6; -} \ No newline at end of file + background-color: #121212; + color: #efefef; +} + +.navbar-bg { + background-color: #232323; +} + +.form-element { + margin-top: 10px; + margin-bottom: 10px; +} + +.menu-icon { + vertical-align: middle; + float: right; +} + +.unselected img { + filter: brightness(0.4); +} + +.black-img { + filter: brightness(0); +} + +.central { + vertical-align: middle; +} + +.data-value { + color: grey; +} + +.separator-border { + border-bottom: 1px solid #191919; +} + +.dash-underline { + text-decoration: dotted; + text-decoration-line: underline; + text-decoration-thickness: 2px; + text-underline-offset: 5px; + + &:hover { + text-decoration: solid; + text-decoration-line: underline; + text-decoration-thickness: 1.5px; + } +} + +.dash-underline-lg { + font-size: 24px; + text-decoration: dotted; + text-decoration-line: underline; + text-decoration-thickness: 4px; + text-underline-offset: 5px; + + &:hover { + text-decoration: solid; + text-decoration-line: underline; + text-decoration-thickness: 3.4px; + } +} + +.link-dark { + color: #a3a3a3; + + &:hover { + color: #a3a3a3; + } +} + +input[type=text], input[type=email], input[type=tel], input[type=password] { + background-color: #444444 !important; + border-color: #545454; + color: $text-color; + + &:focus { + color: $text-color; + } +} diff --git a/Selector.Web/CSS/now.scss b/Selector.Web/CSS/now.scss index 1b57a6e..c697c0e 100644 --- a/Selector.Web/CSS/now.scss +++ b/Selector.Web/CSS/now.scss @@ -3,13 +3,14 @@ } $text-color: white; +$shadow-color: #1e1e1e; .card { - background-color: grey; + background-color: #333232; color: $text-color; margin: 5px; padding: 15px; - box-shadow: 4px 4px 2px #5e5e5e; + box-shadow: 4px 4px 2px $shadow-color; transition: box-shadow 0.5s; &:hover { @@ -21,10 +22,10 @@ $text-color: white; .now-playing-card { // max-width: 300px; - text-shadow: 2px 2px 2px #5e5e5e; + text-shadow: 2px 2px 2px $shadow-color; .cover-art { - box-shadow: 4px 4px 2px #5e5e5e; + box-shadow: 4px 4px 2px $shadow-color; margin-bottom: 15px; } @@ -85,7 +86,7 @@ $text-color: white; .popularity-progress { margin-top: 10px; margin-bottom: 20px; - box-shadow: 2px 2px 2px #5e5e5e; + box-shadow: 2px 2px 2px $shadow-color; } .subtle-link { diff --git a/Selector.Web/Pages/Index.cshtml b/Selector.Web/Pages/Index.cshtml index 70ebfeb..cda4653 100644 --- a/Selector.Web/Pages/Index.cshtml +++ b/Selector.Web/Pages/Index.cshtml @@ -6,4 +6,8 @@

Welcome

+ +

Selector is a tool for monitoring Spotify usage.

+ + Now Playing
\ No newline at end of file diff --git a/Selector.Web/Pages/Shared/_Layout.cshtml b/Selector.Web/Pages/Shared/_Layout.cshtml index da68f40..27d5f52 100644 --- a/Selector.Web/Pages/Shared/_Layout.cshtml +++ b/Selector.Web/Pages/Shared/_Layout.cshtml @@ -9,17 +9,13 @@
-