From 83bb76a5ebf05919d7ebcf130d079fa0c8e313ac Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 9 Nov 2021 22:47:49 +0000 Subject: [PATCH] sass compiling, added spotify and footer logo, sending currently playing on load --- .gitignore | 1 - Selector.Web/CSS/index.scss | 5 + Selector.Web/CSS/now.scss | 15 +- Selector.Web/Hubs/NowPlayingHub.cs | 5 + Selector.Web/Pages/Now.cshtml | 5 +- Selector.Web/Pages/Shared/_Layout.cshtml | 16 +- Selector.Web/package-lock.json | 3355 ++++++++++++++++- Selector.Web/package.json | 4 +- Selector.Web/scripts/NowPlayingCard.ts | 11 +- Selector.Web/scripts/now.ts | 9 +- Selector.Web/tsconfig.json | 3 +- Selector.Web/webpack.common.js | 12 + Selector.Web/wwwroot/.gitignore | 2 + .../wwwroot/Spotify_Icon_RGB_White.png | Bin 0 -> 14904 bytes Selector.Web/wwwroot/andy.png | Bin 0 -> 20963 bytes 15 files changed, 3422 insertions(+), 21 deletions(-) create mode 100644 Selector.Web/CSS/index.scss create mode 100644 Selector.Web/wwwroot/.gitignore create mode 100644 Selector.Web/wwwroot/Spotify_Icon_RGB_White.png create mode 100644 Selector.Web/wwwroot/andy.png diff --git a/.gitignore b/.gitignore index cc40328..dc4576f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore appsettings.Development.json -wwwroot # User-specific files *.rsuser diff --git a/Selector.Web/CSS/index.scss b/Selector.Web/CSS/index.scss new file mode 100644 index 0000000..14133fa --- /dev/null +++ b/Selector.Web/CSS/index.scss @@ -0,0 +1,5 @@ +@import "now.scss"; + +body { + background-color: #c6c6c6; +} \ No newline at end of file diff --git a/Selector.Web/CSS/now.scss b/Selector.Web/CSS/now.scss index ff8f550..25e23f7 100644 --- a/Selector.Web/CSS/now.scss +++ b/Selector.Web/CSS/now.scss @@ -1,8 +1,21 @@ .card { background-color: grey; + color: white; + + box-shadow: 4px 4px 2px #5e5e5e; } .now-playing-card { - max-width: 400px; + // max-width: 300px; + + text-shadow: 2px 2px 2px #5e5e5e; + + .cover-art { + box-shadow: 4px 4px 2px #5e5e5e; + } + + img { + margin: 15px; + } } \ No newline at end of file diff --git a/Selector.Web/Hubs/NowPlayingHub.cs b/Selector.Web/Hubs/NowPlayingHub.cs index 35e85e8..6c53ca4 100644 --- a/Selector.Web/Hubs/NowPlayingHub.cs +++ b/Selector.Web/Hubs/NowPlayingHub.cs @@ -23,6 +23,11 @@ namespace Selector.Web.Hubs Cache = cache; } + public async Task OnConnected() + { + await SendNewPlaying(); + } + public async Task SendNewPlaying() { var nowPlaying = await Cache.StringGetAsync(Key.CurrentlyPlaying(Context.UserIdentifier)); diff --git a/Selector.Web/Pages/Now.cshtml b/Selector.Web/Pages/Now.cshtml index 31dbd45..d0e7f86 100644 --- a/Selector.Web/Pages/Now.cshtml +++ b/Selector.Web/Pages/Now.cshtml @@ -6,9 +6,8 @@

Now

-
-

{{ count }}

- +
+
diff --git a/Selector.Web/Pages/Shared/_Layout.cshtml b/Selector.Web/Pages/Shared/_Layout.cshtml index b8d5726..da68f40 100644 --- a/Selector.Web/Pages/Shared/_Layout.cshtml +++ b/Selector.Web/Pages/Shared/_Layout.cshtml @@ -5,27 +5,22 @@ @ViewData["Title"] - Selector +