diff options
author | Santo Cariotti <santo@dcariotti.me> | 2022-10-17 23:29:13 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2022-10-17 23:29:13 +0200 |
commit | 0433d3fbae74e9f99db54bb0c0c59231adafea54 (patch) | |
tree | 36ba4989cd01955dbf846e911346042dde8bd14a /components | |
parent | 4ac71c4a7c2efd887f9c58dbd300345e5a879949 (diff) |
Add dark mode for admin
Diffstat (limited to 'components')
-rw-r--r-- | components/VTable.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/components/VTable.vue b/components/VTable.vue index ced1016..9886a21 100644 --- a/components/VTable.vue +++ b/components/VTable.vue @@ -4,17 +4,19 @@ .py-2.inline-block.min-w-full .overflow-hidden table.min-w-full - thead.bg-white.border-b + thead.bg-white.border-b( + class="dark:bg-gray-800 dark:border-gray-700" + ) tr - th.text-sm.text-gray-900.px-6.py-4.text-left(scope="col" v-for="name in keys") + th.text-sm.text-gray-900.px-6.py-4.text-left(class="dark:text-white" scope="col" v-for="name in keys") span(v-if="name == 'id'") ID span.capitalize(v-else) {{ replaceUnderscores(name) }} th.text-sm.text-gray-900.px-6.py-4.text-left(scope="col") tbody tr.bg-white.border-b.transition.duration-300.ease-in-out( - class="hover:bg-gray-100" v-for="field in fields" + class="hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700" v-for="field in fields" ) - td.px-6.py-4.whitespace-nowrap.text-sm.text-gray-900.truncate(v-for="name in keys") + td.px-6.py-4.whitespace-nowrap.text-sm.text-gray-900.truncate(class="dark:text-white" v-for="name in keys") div.block.truncate(:class="{'max-w-100': !['id', 'created', 'updated'].includes(name)}") span(v-if="isBool(field[name])") svg(v-if="field[name]" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-500") @@ -45,7 +47,7 @@ a.underline.text-green-500(:href="'/models/'+field.model_id" target="_blank") | {{ field[name] }} span(v-else :title="field[name]") {{ field[name] }} - td.px-6.py-4.whitespace-nowrap.text-sm.text-gray-900 + td.px-6.py-4.whitespace-nowrap.text-sm.text-gray-900(class="dark:text-white") .flex .mr-1(v-if="path") a(:href="path + field.id" target="_blank") |