Skip to content

A self-hosted media server and file management system

style video card for mobile

aminnausina8a2db06bbd4
diff --git a/resources/js/components/cards/VideoCard.vue b/resources/js/components/cards/VideoCard.vue
index 8e50079d..b6079a23 100644
--- a/resources/js/components/cards/VideoCard.vue
+++ b/resources/js/components/cards/VideoCard.vue
@@ -20,16 +20,33 @@ watch(props, handlePropsUpdate, {immediate: true});
</script>
<template>
- <tr :class="{ 'ring-violet-600/70 ring-[0.125rem]': (props.currentID === props.video?.id) }"
- class="shadow vid-row w-full rounded-md dark:bg-neutral-800 dark:hover:bg-indigo-900 bg-gray-100 hover:bg-violet-300 odd:bg-violet-100 hover:odd:bg-violet-300 dark:odd:bg-zinc-700 dark:hover:odd:bg-indigo-900 p-3 flex ring-inset flex-wrap flex-col sm:flex-row sm:flex-nowrap"
+ <div :class="{ 'ring-violet-600/70 ring-[0.125rem]': (props.currentID === props.video?.id) }"
+ class="flex flex-wrap flex-col sm:flex-row sm:flex-nowrap gap-x-8 gap-y-4 p-3 w-full shadow rounded-md ring-inset dark:bg-neutral-800 dark:hover:bg-indigo-900 bg-gray-100 hover:bg-violet-300 odd:bg-violet-100 hover:odd:bg-violet-300 dark:odd:bg-zinc-700 dark:hover:odd:bg-indigo-900"
:data-id="props.video?.id" :data-path="`../${props.video?.attributes.path}`" @click="handlePlay">
- <td class="flex gap-12 w-full">
+ <section class="flex justify-between gap-4 w-full items-start sm:items-center">
+ <h3 class="w-full line-clamp-2 sm:line-clamp-1">
+ {{ metaData?.fields?.title }}
+ </h3>
+ <h3 class="text-sm sm:text-base flex justify-end text-nowrap text-neutral-300">
+ {{ metaData?.fields?.views }}
+ </h3>
+ </section>
+ <section class="text-sm sm:text-base flex justify-between sm:w-auto items-center text-neutral-300 gap-8">
+ <h3 class="text-nowrap">
+ {{ metaData?.fields?.duration }}
+ </h3>
+ <h3 class="line-clamp-1 sm:min-w-40">
+ {{ toFormattedDate(new Date(props.video?.attributes.date + ' GMT')) }}
+ </h3>
+ </section>
+
+ <!-- <td class="flex gap-12 w-full">
<p class="vid-row-title w-full xl:min-w-48 sm:max-w-1/2 sm:w-auto flex justify-between items-center gap-12 sm:gap-0"><span class="sm:hidden">Title: </span><span class="line-clamp-1">{{ metaData?.fields?.title }}</span></p>
<p class="vid-row-duration truncate hidden sm:block">{{ metaData?.fields?.duration }}</p>
</td>
<td class="flex gap-12 w-full sm:justify-end">
<p class="vid-row-title truncate hidden sm:block">{{ metaData?.fields?.views }}</p>
<p class="vid-row-date w-full xl:min-w-36 sm:max-w-1/3 sm:w-auto flex justify-between items-center gap-12 sm:gap-0"><span class="sm:hidden">Date: </span><span class="line-clamp-1">{{ toFormattedDate(new Date(props.video?.attributes.date + ' GMT')) }}</span></p>
- </td>
- </tr>
+ </td> -->
+ </div>
</template>
\ No newline at end of file