mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-03-06 22:00:16 +01:00
feat(dashboard): implement player
This commit is contained in:
parent
223c13ad99
commit
124f9c15a8
17 changed files with 545 additions and 254 deletions
|
|
@ -1,183 +1,280 @@
|
|||
@import '../../../@theme/styles/themes';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/components/card/card.component.theme';
|
||||
@import '~@nebular/theme/styles/global/bootstrap/breakpoints';
|
||||
@import '~@nebular/theme/styles/core/mixins';
|
||||
|
||||
@include nb-install-component() {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
border-left: 2px solid nb-theme(separator);
|
||||
|
||||
.player {
|
||||
flex: 1;
|
||||
.header {
|
||||
@include nb-card-header();
|
||||
}
|
||||
|
||||
// TODO: Replace with the card header styles mixin
|
||||
.player-card-header {
|
||||
display: flex;
|
||||
line-height: 2rem;
|
||||
font-size: 1.25rem;
|
||||
font-family: nb-theme(font-secondary);
|
||||
font-weight: nb-theme(font-weight-bolder);
|
||||
color: nb-theme(color-fg-heading);
|
||||
padding: 1.25rem;
|
||||
.body {
|
||||
padding: nb-theme(card-padding);
|
||||
}
|
||||
|
||||
.player-menu {
|
||||
font-size: 2.5rem;
|
||||
margin-right: 1.25rem;
|
||||
margin-top: -0.25rem;
|
||||
}
|
||||
.footer {
|
||||
padding: nb-theme(card-padding);
|
||||
border-top: 1px solid nb-theme(separator);
|
||||
}
|
||||
|
||||
.cover {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
img {
|
||||
height: 10rem;
|
||||
width: 10rem;
|
||||
border-radius: nb-theme(radius) / 2;
|
||||
}
|
||||
|
||||
.player-cover {
|
||||
background: #363175;
|
||||
padding: 1.25rem;
|
||||
display: flex;
|
||||
.details {
|
||||
text-align: center;
|
||||
padding: 1.75rem 0 1.5rem;
|
||||
|
||||
.album-image {
|
||||
background: url('./~/assets/images/damn.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
height: 94px;
|
||||
width: 30%;
|
||||
box-shadow: nb-theme(card-shadow);
|
||||
}
|
||||
|
||||
.artist-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 1.25rem;
|
||||
|
||||
.artist-name {
|
||||
color: nb-theme(color-fg-heading);
|
||||
font-size: 1.5rem;
|
||||
font-family: nb-theme(font-secondary);
|
||||
font-weight: nb-theme(font-weight-bold);
|
||||
}
|
||||
|
||||
.song-name {
|
||||
font-family: nb-theme(font-main);
|
||||
font-size: 1.125rem;
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
.artist {
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.player-progress {
|
||||
background-color: #2c2961;
|
||||
.progress-wrap {
|
||||
position: relative;
|
||||
height: 1rem;
|
||||
margin: 0 -#{nb-theme(card-padding)};
|
||||
|
||||
.progress-foreground {
|
||||
background-color: nb-theme(color-success);
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
margin-top: calc(0.75rem - 1px);
|
||||
width: 100px;
|
||||
|
||||
.status {
|
||||
background-color: #0088ff;
|
||||
height: 2px;
|
||||
width: 70%;
|
||||
box-shadow: 0 4px 8px 0 rgba(33, 7, 77, 0.4), 0 0 12px 0 rgba(51, 139, 255, 0.4);
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
border-radius: 50%;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
right: 0;
|
||||
box-shadow: 0 0 18px 0 rgba(255, 255, 255, 0.4);
|
||||
top: -0.5rem;
|
||||
}
|
||||
@include nb-for-theme(cosmic) {
|
||||
background-color: nb-theme(link-color-active);
|
||||
}
|
||||
}
|
||||
|
||||
.player-commands {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 4rem;
|
||||
color: nb-theme(color-fg-heading);
|
||||
padding: 2.5rem 0;
|
||||
border-bottom: 1px solid nb-theme(separator);
|
||||
.progress {
|
||||
-webkit-appearance: none;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
height: 1.5rem;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
|
||||
.prev {
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
}
|
||||
|
||||
.player-volume {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 4rem;
|
||||
color: nb-theme(color-fg);
|
||||
padding: 2rem 0;
|
||||
border-bottom: 1px solid nb-theme(separator);
|
||||
|
||||
.minus:hover {
|
||||
color: nb-theme(color-fg-heading);
|
||||
}
|
||||
|
||||
.plus:hover {
|
||||
color: nb-theme(color-fg-heading);
|
||||
}
|
||||
|
||||
.volume-items {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 2rem;
|
||||
margin: 0 -4rem;
|
||||
|
||||
.volume-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.volume-item::before {
|
||||
content: '';
|
||||
width: 4px;
|
||||
background-color: nb-theme(separator);
|
||||
height: 30%;
|
||||
border-radius: 1rem;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.volume-item:not(:last-child)::before {
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.volume-item.active::before {
|
||||
background-image: linear-gradient(to right, #4f6fff, #00ccff);
|
||||
box-shadow: 0 4px 10px 0 rgba(33, 7, 77, 0.5), 0 2px 12px 0 rgba(0, 136, 255, 0.7);
|
||||
}
|
||||
|
||||
.volume-item.selected::before {
|
||||
background-color: white;
|
||||
height: 40%;
|
||||
box-shadow: 0 0 18px 0 rgba(255, 255, 255, 0.68);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.player-playlist-commands {
|
||||
height: 3.5rem;
|
||||
}
|
||||
|
||||
.player-playlist-commands > .btn-group {
|
||||
height: 100%;
|
||||
|
||||
.btn {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
@include install-thumb() {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border-radius: 50%;
|
||||
background: nb-theme(color-success);
|
||||
cursor: pointer;
|
||||
margin-top: calc(-0.5rem + 1px);
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.btn.active {
|
||||
background-color: nb-theme(card-bg);
|
||||
color: nb-theme(color-fg);
|
||||
@include install-track() {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
cursor: pointer;
|
||||
background: nb-theme(separator);
|
||||
}
|
||||
|
||||
.btn:first-child {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
@include nb-for-theme(cosmic) {
|
||||
@include install-thumb() {
|
||||
background: nb-theme(link-color-active);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timing {
|
||||
padding-top: 0.25rem;
|
||||
margin: 0 -0.25rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
|
||||
.controls {
|
||||
// TODO fix controls font-size when complete icons fo
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0.875rem 1.25rem 0;
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shuffle, .loop {
|
||||
font-size: 1.25rem;
|
||||
color: nb-theme(color-fg);
|
||||
|
||||
&.active {
|
||||
color: nb-theme(color-success);
|
||||
|
||||
@include nb-for-theme(cosmic) {
|
||||
color: nb-theme(link-color-active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.prev, .next {
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
border: 2px solid nb-theme(separator);
|
||||
border-radius: 50%;
|
||||
|
||||
&::before {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.play {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.volume {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 1.25rem;
|
||||
position: relative;
|
||||
|
||||
.progress-wrap {
|
||||
height: 2.25rem;
|
||||
margin: 0;
|
||||
width: 80%;
|
||||
|
||||
.progress-foreground {
|
||||
margin-top: calc(1rem + 1px);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.btn:last-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: nb-theme(card-border-radius);
|
||||
.progress {
|
||||
height: 2.25rem;
|
||||
|
||||
@include install-thumb() {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 2px 6px 0 rgba(61, 61, 61, 0.2);
|
||||
border: solid 1px rgba(0, 0, 0, 0.1);
|
||||
margin-top: calc(-0.875rem + 1px);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.quite, .loud {
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
|
||||
.quite {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.loud {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(lg) {
|
||||
border: none;
|
||||
|
||||
.header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.controls, .volume {
|
||||
max-width: 20rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.collapsed {
|
||||
|
||||
.header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.body {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cover {
|
||||
height: 4.5rem;
|
||||
flex-direction: row;
|
||||
margin: 0;
|
||||
|
||||
img {
|
||||
height: 4.5rem;
|
||||
width: 4.5rem;
|
||||
margin: 0;
|
||||
border-radius: 0 0 0 nb-theme(radius);
|
||||
}
|
||||
|
||||
.details {
|
||||
margin-left: 0.875rem;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
|
||||
h4 {
|
||||
margin-bottom: 0.125rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress-wrap {
|
||||
width: calc(100% - 6rem);
|
||||
align-self: flex-start;
|
||||
position: absolute;
|
||||
margin-top: calc(-0.75rem + 1px);
|
||||
margin-left: 4.5rem;
|
||||
}
|
||||
|
||||
.timing {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin: 0;
|
||||
|
||||
.prev, .shuffle, .repeat {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.next {
|
||||
font-size: 1.8rem;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.play {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.volume {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue