mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
add initial bottom bar
+ use a hacky grid to position bottom bar for chrome compatibility
This commit is contained in:
committed by
Mungai Njoroge
parent
d5bf60f93d
commit
56749ddfd9
@@ -1,20 +1,17 @@
|
|||||||
#app-grid {
|
#app-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content 1fr 29rem;
|
grid-template-columns: min-content 1fr 29rem;
|
||||||
grid-template-rows: 42px 1fr max-content;
|
grid-template-rows: 43px calc(100vh - (8.5rem + 13px)) max-content;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"l-sidebar nav search-input"
|
"l-sidebar nav search-input"
|
||||||
"l-sidebar content r-sidebar"
|
"l-sidebar content r-sidebar"
|
||||||
"l-sidebar content r-sidebar"
|
|
||||||
"bottombar bottombar bottombar";
|
"bottombar bottombar bottombar";
|
||||||
height: calc(100vh);
|
height: 100%;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: $small 0;
|
padding: $small 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: -$small;
|
margin-top: -$small;
|
||||||
max-width: 1720px;
|
max-width: 1720px;
|
||||||
// padding-right: $medium;
|
|
||||||
// border-right: solid 1px $gray4;
|
|
||||||
padding-top: $small;
|
padding-top: $small;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +31,6 @@
|
|||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"l-sidebar nav"
|
"l-sidebar nav"
|
||||||
"l-sidebar content"
|
"l-sidebar content"
|
||||||
"l-sidebar content"
|
|
||||||
"l-sidebar content";
|
"l-sidebar content";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +39,6 @@
|
|||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"l-sidebar nav"
|
"l-sidebar nav"
|
||||||
"l-sidebar content"
|
"l-sidebar content"
|
||||||
"l-sidebar content"
|
|
||||||
"l-sidebar bottombar";
|
"l-sidebar bottombar";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,15 +48,17 @@
|
|||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"l-sidebar nav"
|
"l-sidebar nav"
|
||||||
"l-sidebar content"
|
"l-sidebar content"
|
||||||
"l-sidebar content"
|
|
||||||
"l-sidebar content";
|
"l-sidebar content";
|
||||||
}
|
}
|
||||||
|
|
||||||
#acontent {
|
#acontent {
|
||||||
grid-area: content;
|
grid-area: content;
|
||||||
overflow: hidden auto;
|
// overflow: hidden;
|
||||||
margin-right: calc(0rem - ($medium + 2px));
|
margin-right: calc(0rem - ($medium + 2px));
|
||||||
padding-right: calc($medium);
|
padding-right: calc($medium);
|
||||||
|
height: 100%;
|
||||||
|
// outline: solid;
|
||||||
|
// margin-top: -$small;
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
margin: $small;
|
margin: $small;
|
||||||
@@ -92,6 +89,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#gsearch-input {
|
#gsearch-input {
|
||||||
|
// display: none !important;
|
||||||
grid-area: search-input;
|
grid-area: search-input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ body {
|
|||||||
|
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "SFCompactDisplay";
|
font-family: "SFCompactDisplay";
|
||||||
src: url("../googlesans.ttf");
|
src: url("../sf-compact.woff") format("woff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +1,73 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="b-bar bg-primary pad-medium noscroll" v-if="settings.show_alt_np">
|
<div class="b-bar">
|
||||||
<div class="info">
|
<div class="centered">
|
||||||
<img
|
<div class="inner">
|
||||||
:src="paths.images.thumb.large + queue.currenttrack?.image"
|
<RouterLink
|
||||||
alt=""
|
title="go to album"
|
||||||
class="rounded shadow-lg"
|
:to="{
|
||||||
/>
|
name: Routes.album,
|
||||||
<div class="tags">
|
params: {
|
||||||
<div class="np-artist ellip">
|
hash: queue.currenttrack.albumhash,
|
||||||
<span
|
},
|
||||||
v-for="artist in putCommas(
|
}"
|
||||||
queue.currenttrack?.artist || ['♥ Hello ♥']
|
|
||||||
)"
|
|
||||||
>
|
>
|
||||||
{{ artist }}
|
<img
|
||||||
|
class="rounded-sm"
|
||||||
|
:src="paths.images.thumb.small + queue.currenttrack.image"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</RouterLink>
|
||||||
|
|
||||||
|
<div class="info">
|
||||||
|
<div class="with-title">
|
||||||
|
<div class="time time-current">
|
||||||
|
<span>
|
||||||
|
{{ formatSeconds(queue.duration.current) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="np-title ellip">
|
<div class="tags">
|
||||||
{{ queue.currenttrack?.title || "Play something"}}
|
<div class="title ellip">
|
||||||
</div>
|
{{ queue.currenttrack.title }}
|
||||||
|
</div>
|
||||||
|
<ArtistName
|
||||||
|
:artists="queue.currenttrack.artist"
|
||||||
|
:albumartist="queue.currenttrack.albumartist"
|
||||||
|
class="artist"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="time time-full">
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
formatSeconds(
|
||||||
|
queue.currenttrack ? queue.currenttrack.duration : 0
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Progress />
|
<Progress />
|
||||||
<div class="time">
|
</div>
|
||||||
<span class="current">{{ formatSeconds(queue.duration.current) }}</span>
|
<div class="buttons">
|
||||||
<HotKeys />
|
<HotKeys />
|
||||||
<span class="full">{{
|
</div>
|
||||||
formatSeconds(queue.currenttrack ? queue.currenttrack.duration : 0)
|
</div>
|
||||||
}}</span>
|
<div class=""></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import "@/assets/scss/BottomBar/BottomBar.scss";
|
|
||||||
import useSettingsStore from "@/stores/settings";
|
|
||||||
import { formatSeconds, putCommas } from "@/utils";
|
|
||||||
import HotKeys from "../LeftSidebar/NP/HotKeys.vue";
|
|
||||||
import Progress from "../LeftSidebar/NP/Progress.vue";
|
|
||||||
|
|
||||||
import { paths } from "@/config";
|
import { paths } from "@/config";
|
||||||
import useQStore from "@/stores/queue";
|
import useQStore from "@/stores/queue";
|
||||||
|
import { formatSeconds } from "@/utils";
|
||||||
|
|
||||||
|
import { Routes } from "@/composables/enums";
|
||||||
|
import useSettingsStore from "@/stores/settings";
|
||||||
|
|
||||||
|
import ArtistName from "../shared/ArtistName.vue";
|
||||||
|
import HotKeys from "../LeftSidebar/NP/HotKeys.vue";
|
||||||
|
import Progress from "../LeftSidebar/NP/Progress.vue";
|
||||||
|
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
const settings = useSettingsStore();
|
const settings = useSettingsStore();
|
||||||
@@ -48,51 +75,126 @@ const settings = useSettingsStore();
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.b-bar {
|
.b-bar {
|
||||||
|
height: 65px;
|
||||||
|
background-color: rgb(22, 22, 22);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr max-content;
|
align-items: center;
|
||||||
gap: 1rem;
|
z-index: 1;
|
||||||
// padding: 1rem;
|
border-top: solid 1px $gray3;
|
||||||
padding-bottom: 1rem;
|
|
||||||
position: relative;
|
|
||||||
height: 55px;
|
|
||||||
// width: 100%;
|
|
||||||
|
|
||||||
.time {
|
.centered {
|
||||||
|
width: 50rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.full {
|
.inner {
|
||||||
text-align: end;
|
display: grid;
|
||||||
|
height: 3rem;
|
||||||
|
grid-template-columns: max-content 1fr max-content;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// background-color: $gray5;
|
||||||
|
width: max-content;
|
||||||
|
padding: $small $medium;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 2.75rem;
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
object-fit: cover;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
display: grid;
|
width: 30rem;
|
||||||
grid-template-columns: max-content 1fr;
|
// width: 100%;
|
||||||
gap: 1rem;
|
|
||||||
|
|
||||||
img {
|
.with-title {
|
||||||
height: 6rem;
|
display: grid;
|
||||||
width: auto;
|
grid-template-columns: max-content 1fr max-content;
|
||||||
|
align-items: flex-end;
|
||||||
|
gap: $smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
font-size: 12px;
|
||||||
|
height: fit-content;
|
||||||
|
width: 3rem;
|
||||||
|
|
||||||
|
span {
|
||||||
|
background-color: $gray3;
|
||||||
|
border-radius: $smaller;
|
||||||
|
padding: 0 $smaller;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-full {
|
||||||
|
text-align: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
display: flex;
|
font-size: small;
|
||||||
flex-direction: column;
|
display: grid;
|
||||||
justify-content: flex-end;
|
grid-template-rows: 1fr 1fr;
|
||||||
gap: $smaller;
|
place-items: center;
|
||||||
|
|
||||||
.np-title {
|
.title {
|
||||||
font-size: 1.15rem;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.np-artist {
|
.artist {
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
font-size: 0.9rem;
|
margin-bottom: -$smaller;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
width: 9rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// width: 100%;
|
||||||
|
|
||||||
|
// .time {
|
||||||
|
// display: grid;
|
||||||
|
// grid-template-columns: repeat(3, 1fr);
|
||||||
|
// align-items: center;
|
||||||
|
|
||||||
|
// .full {
|
||||||
|
// text-align: end;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .info {
|
||||||
|
// display: grid;
|
||||||
|
// grid-template-columns: max-content 1fr;
|
||||||
|
// gap: 1rem;
|
||||||
|
|
||||||
|
// img {
|
||||||
|
// height: 6rem;
|
||||||
|
// width: auto;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .tags {
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
// justify-content: flex-end;
|
||||||
|
// gap: $smaller;
|
||||||
|
|
||||||
|
// .np-title {
|
||||||
|
// font-size: 1.15rem;
|
||||||
|
// font-weight: bold;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .np-artist {
|
||||||
|
// opacity: 0.75;
|
||||||
|
// font-size: 0.9rem;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
class="ellip"
|
class="ellip"
|
||||||
:style="{
|
:style="{
|
||||||
fontSize: small ? '0.85rem' : smaller ? 'small' : '',
|
fontSize: small ? '0.85rem' : smaller ? 'small' : '',
|
||||||
|
padding: '0 .25rem'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div v-if="artists === null || artists.length === 0">
|
<div v-if="artists === null || artists.length === 0">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="header-list-layout">
|
<div class="header-list-layout">
|
||||||
<div
|
<div
|
||||||
v-bind="containerProps"
|
v-bind="containerProps"
|
||||||
style="height: calc(100vh - 4.25rem)"
|
style="height: calc(100vh - 8.75rem)"
|
||||||
:style="{ paddingTop: !no_header ? headerHeight - 64 + 16 + 'px' : 0 }"
|
:style="{ paddingTop: !no_header ? headerHeight - 64 + 16 + 'px' : 0 }"
|
||||||
@scroll="handleScroll"
|
@scroll="handleScroll"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user