table style improvements

This commit is contained in:
Thomas Amland 2020-08-22 18:58:48 +02:00
parent 2356f5dce9
commit ca815df1bb
2 changed files with 20 additions and 7 deletions

View File

@ -1,9 +1,11 @@
<template> <template>
<div> <div>
<b-table-simple borderless hover> <table class="table table-hover table-borderless">
<thead> <thead>
<tr> <tr class="text-muted text-uppercase" style="font-size: 80%;">
<th class="pl-0 pr-0 text-center text-muted" /> <th class="pl-0 pr-0 text-center">
#
</th>
<th class="text-left"> <th class="text-left">
Title Title
</th> </th>
@ -22,9 +24,13 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, index) in tracks" :key="index" <tr
draggable="true" :class="{'text-primary': item.id === playingTrackId}" v-for="(item, index) in tracks"
@dragstart="dragstart(item.id, $event)"> :key="index"
:class="{'current-track': item.id === playingTrackId}"
:draggable="true"
@dragstart="dragstart(item.id, $event)"
>
<td class="pl-0 pr-0 text-center text-muted" <td class="pl-0 pr-0 text-center text-muted"
style="min-width: 20px; max-width: 20px;" style="min-width: 20px; max-width: 20px;"
@click="play(index)"> @click="play(index)">
@ -67,13 +73,18 @@
</td> </td>
</tr> </tr>
</tbody> </tbody>
</b-table-simple> </table>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.track-number-hover { .track-number-hover {
display: none; display: none;
} }
.current-track {
td, a {
color: var(--primary);
}
}
tr:hover { tr:hover {
.track-number-hover { .track-number-hover {
display: inline; display: inline;

View File

@ -35,7 +35,9 @@ $input-bg: $theme-elevation-2;
$input-border-color: $theme-elevation-2; $input-border-color: $theme-elevation-2;
$input-color: $theme-text; $input-color: $theme-text;
// Other
$progress-bg: rgb(35, 35, 35); $progress-bg: rgb(35, 35, 35);
$table-hover-bg: rgba(#fff, .1);
:root { :root {
--text-muted: #{$theme-text-muted}; --text-muted: #{$theme-text-muted};