bottom menu bar, fixing links, fixing header colour

This commit is contained in:
Andy Pack 2023-01-26 21:54:09 +00:00
parent 84a32a5cb2
commit 66209b7ec3
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
7 changed files with 71 additions and 42 deletions

View File

@ -6,7 +6,7 @@
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<Color x:Key="PageBackgroundColor">#512bdf</Color> <Color x:Key="PageBackgroundColor">#2b2b2b</Color>
<Color x:Key="PrimaryTextColor">White</Color> <Color x:Key="PrimaryTextColor">White</Color>
<Style TargetType="Label"> <Style TargetType="Label">

View File

@ -12,6 +12,7 @@
<NowPlayingCard Track="@nowCache.LastPlaying?.Track" Episode="@nowCache.LastPlaying?.Episode" /> <NowPlayingCard Track="@nowCache.LastPlaying?.Track" Episode="@nowCache.LastPlaying?.Episode" />
<PlayCountCard Track="@nowCache.LastPlaying?.Track" Count="@nowCache.LastPlayCount" Username="@nowCache.LastPlayCount?.Username" /> <PlayCountCard Track="@nowCache.LastPlaying?.Track" Count="@nowCache.LastPlayCount" Username="@nowCache.LastPlayCount?.Username" />
<div class="v-space"></div>
@code { @code {
[Inject] [Inject]

View File

@ -4,12 +4,6 @@
@inject SessionManager session @inject SessionManager session
<div class="page"> <div class="page">
@if (session.IsLoggedIn)
{
<div class="sidebar">
<NavMenu />
</div>
}
<main> <main>
<div class="top-row px-4"> <div class="top-row px-4">
<a href="https://sarsoo.xyz/posts/selector/" class="dash-underline-lg link-dark" target="_blank">About</a> <a href="https://sarsoo.xyz/posts/selector/" class="dash-underline-lg link-dark" target="_blank">About</a>
@ -19,6 +13,12 @@
@Body @Body
</article> </article>
</main> </main>
@if (session.IsLoggedIn)
{
<div class="sidebar">
<NavMenu />
</div>
}
</div> </div>
@*<footer class="footer text-muted"> @*<footer class="footer text-muted">

View File

@ -1,30 +1,33 @@
<div class="top-row ps-3 navbar navbar-dark"> 
<div class="container-fluid"> <div class="bottom-bar">
<a class="navbar-brand" href="">Selector</a> <div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu"> <nav class="flex-column menu-items">
<span class="navbar-toggler-icon"></span> <div class="nav-item px-3">
</button> <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="now">
<span class="oi oi-dashboard" aria-hidden="true"></span> Now
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="settings">
<span class="oi oi-cog" aria-hidden="true"></span> Settings
</NavLink>
</div>
</nav>
</div> </div>
</div>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu"> <div class="top-row ps-3 navbar navbar-dark">
<nav class="flex-column"> <div class="container-fluid">
<div class="nav-item px-3"> <a class="navbar-brand" href="">Selector</a>
<NavLink class="nav-link" href="" Match="NavLinkMatch.All"> <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="oi oi-home" aria-hidden="true"></span> Home <span class="navbar-toggler-icon"></span>
</NavLink> </button>
</div> </div>
<div class="nav-item px-3"> </div>
<NavLink class="nav-link" href="now">
<span class="oi oi-dashboard" aria-hidden="true"></span> Now
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="settings">
<span class="oi oi-cog" aria-hidden="true"></span> Settings
</NavLink>
</div>
</nav>
</div> </div>
@code { @code {

View File

@ -4,13 +4,17 @@
.top-row { .top-row {
height: 3.5rem; height: 3.5rem;
background-color: rgba(0,0,0,0.4); background-color: rgba(0,0,0,1);
} }
.navbar-brand { .navbar-brand {
font-size: 1.1rem; font-size: 1.1rem;
} }
.menu-items {
background-color: #3c3c3c;
}
.oi { .oi {
width: 2rem; width: 2rem;
font-size: 1.1rem; font-size: 1.1rem;
@ -18,6 +22,12 @@
top: -2px; top: -2px;
} }
.bottom-bar {
position: fixed;
bottom: 0px;
width: 100%;
}
.nav-item { .nav-item {
font-size: 0.9rem; font-size: 0.9rem;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
@ -40,21 +50,31 @@
line-height: 3rem; line-height: 3rem;
} }
.nav-item ::deep a.active { .nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25); background-color: rgba(255,255,255,0.25);
color: white; color: white;
} }
.nav-item ::deep a:hover { .nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.1);
color: white; color: white;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
.navbar-toggler { .navbar-toggler {
display: none; display: none;
} }
.menu-items {
background-color: rgb(0, 0, 0, 0);
}
.bottom-bar {
position: static;
bottom: 0px;
width: 100%;
}
.collapse { .collapse {
/* Never collapse the sidebar for wide screens */ /* Never collapse the sidebar for wide screens */
display: block; display: block;

View File

@ -58,8 +58,8 @@
[Parameter] [Parameter]
public string Username { get; set; } public string Username { get; set; }
private string trackLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Artists.First().Name}/_/${Track.Name}"; private string trackLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Artists.First().Name}/_/{Track.Name}";
private string albumLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Album.Artists.First().Name}/${Track.Album.Name}"; private string albumLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Album.Artists.First().Name}/{Track.Album.Name}";
private string artistLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Artists.First().Name}"; private string artistLink => $"https://www.last.fm/user/{Username}/library/music/{Track.Artists.First().Name}";
private string userLink => $"https://www.last.fm/user/{Username}"; private string userLink => $"https://www.last.fm/user/{Username}";

View File

@ -13,6 +13,11 @@ h1:focus {
outline: none; outline: none;
} }
.v-space {
height: 3.5rem;
display: block;
}
/*a, .btn-link { /*a, .btn-link {
color: #0071c1; color: #0071c1;
}*/ }*/