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,14 +1,7 @@
<div class="top-row ps-3 navbar navbar-dark"> 
<div class="container-fluid"> <div class="bottom-bar">
<a class="navbar-brand" href="">Selector</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu"> <div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column"> <nav class="flex-column menu-items">
<div class="nav-item px-3"> <div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All"> <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home <span class="oi oi-home" aria-hidden="true"></span> Home
@ -27,6 +20,16 @@
</nav> </nav>
</div> </div>
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">Selector</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</div>
@code { @code {
private bool collapseNavMenu = true; private bool collapseNavMenu = true;

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;
@ -55,6 +65,16 @@
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;
}*/ }*/