Skip to content

Commit

Permalink
feat: ✨ Restyled tracklist
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLambrecht committed Sep 11, 2018
1 parent ecba3ae commit 045d038
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 22 deletions.
3 changes: 3 additions & 0 deletions src/assets/css/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
--color-danger: #e2403e;
--color-warning: #ffcb5d;
--color-info: #4a97cc;
--color-background-grey: #F0F0F0;
--color-light-grey: #F7F7F7;
--color-track-item: #FAFAFA;

/* Typography */

Expand Down
1 change: 1 addition & 0 deletions src/components/EditorOperationPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ export default {
.operation-panel {
padding: 12px 0;
box-shadow: 0 2px 2px 0px rgba(0,0,0,0.1);
background-color: var(--color-light-grey);
}
</style>
7 changes: 4 additions & 3 deletions src/components/EditorPlaylist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ export default {
}
.drag-hover {
background-color: #F0F0F0;
background-color: white;
box-shadow: 0 0 5px 0px var(--spotify-green);
}
.drag-origin:hover {
background-color: transparent;
background-color: var(--color-track-item);
}
.drag-hover.drag-origin:hover {
background-color: #F0F0F0;
background-color: white;
}
}
</style>
53 changes: 44 additions & 9 deletions src/components/EditorPlaylistItem.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<b-list-item class="playlist-item">
<b-text v-if="showStartingTime">
{{ item.track.relative_start_time_ms | formatTime('h:mm') }} -
<b-text v-if="showStartingTime" class="time">
{{ item.track.relative_start_time_ms | formatTime('h:mm') }}
</b-text>
<b-text>
<b-text class="artist">
{{ item.track.artists[0].name }}
</b-text>
-
<b-text>
<b-text class="song">
{{ item.track.name }}
</b-text>
<b-text>
({{ item.track.duration_ms | formatTime('mm:ss') }})
<b-text class="track-menu">···</b-text>
<b-text class="duration">
{{ item.track.duration_ms | formatTime('mm:ss') }}
</b-text>
</b-list-item>
</template>
Expand Down Expand Up @@ -47,17 +47,52 @@ export default {

<style lang="scss" scoped>
.playlist-item {
display: flex;
width: 100%;
padding: 15px;
position: relative;
background-color: var(--color-track-item);
left: -15px;
margin-top: 2px;
margin-top: 6px;
border-radius: 5px;
transition: background-color .1s ease;
> * {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&:not(:first-child) {
margin-left: 20px;
}
}
.artist {
width: 200px;
}
.song {
width: 200px;
}
.track-menu {
width: 20px;
margin-left: auto;
opacity: 0;
pointer-events: none;
font-weight: bold;
}
&:hover {
background-color: #F0F0F0;
background-color: white;
cursor: pointer;
.track-menu {
opacity: 0; /* TODO: enable */
pointer-events: all;
}
}
}
</style>
8 changes: 4 additions & 4 deletions src/components/EditorTrackAdder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ export default {
padding: 10px;
border-radius: 20px;
cursor: pointer;
background-color: #F0F0F0;
background-color: var(--color-light-grey);
transition: background-color .1s ease;
.label {
font-size: 18px;
font-weight: bold;
opacity: 0.7;
opacity: 0.6;
transition: opacity .1s ease;
}
&:hover {
background-color: #F4F4F4;
background-color: white;
.label {
opacity: 0.6;
opacity: 0.7;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoggedOutWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
border-radius: 5px;
&:hover {
background-color: #F0F0F0;
background-color: var(--color-background-grey);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/MainWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ export default {
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: var(--color-background-grey);
}
</style>
2 changes: 1 addition & 1 deletion src/components/MainWindowHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {

<style lang="scss" scoped>
.header {
background-color: #F0F0F0;
background-color: white;
padding: 60px 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/TrackSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
}
&:hover {
background-color: #F0F0F0;
background-color: var(--color-background-grey);
position: relative;
overflow: hidden;
&::after {
Expand Down Expand Up @@ -87,7 +87,7 @@ export default {
width: 50px;
background-color: var(--spotify-green);
transform: translateY(-50%) rotate(45deg);
box-shadow: 0 0 2px 10px #F0F0F0;
box-shadow: 0 0 2px 10px var(--color-background-grey);
}
/* wow. sorry. */
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/base/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
box-shadow: none;
&:hover {
background-image: none;
background-color: #E9E9E9;
background-color: var(--color-light-grey);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/base/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
.footer {
padding: 20px 30px;
background-color: #F0F0F0;
background-color: var(--color-background-grey);
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
Expand Down

0 comments on commit 045d038

Please sign in to comment.