list and emphasize
This commit is contained in:
parent
af9e4557d1
commit
f38f663608
12 changed files with 355 additions and 23 deletions
|
@ -1,12 +1,46 @@
|
|||
<template>
|
||||
<p>ListImageItem: {{ data }}</p>
|
||||
<NuxtLink
|
||||
class="w-full sm:w-72 h-96 rounded-lg shadow-md border border-gray-200 flex-col justify-start items-start inline-flex overflow-hidden"
|
||||
:class="allowNavigation ? '' : 'pointer-events-none'"
|
||||
:to="`${urlOverwrite ?? $route.path}/${data?.slug}`"
|
||||
>
|
||||
<NuxtPicture
|
||||
loading="lazy"
|
||||
class="w-full h-56 object-cover object-center"
|
||||
:src="baseUrl + data?.image?.url"
|
||||
:imgAttrs="{ class: 'w-full h-56 object-cover object-center' }"
|
||||
/>
|
||||
<div class="w-full h-44 relative bg-white">
|
||||
<div class="w-full h-full px-2.5 py-5 flex flex-col justify-start items-start gap-2.5">
|
||||
<h1>{{ data?.title }}</h1>
|
||||
<p v-if="data?.date" class="self-stretch grow shrink basis-0 text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<p class="self-stretch grow shrink basis-0 text-[#5c5c5c]">
|
||||
{{ data?.description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { PropType } from "vue";
|
||||
import type BaseCollection from "~/types/collection/baseCollection";
|
||||
|
||||
const baseUrl = useStrapiUrl().replace("/api", "");
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<BaseCollection>,
|
||||
allowNavigation: { type: Boolean, default: false },
|
||||
urlOverwrite: { type: String, default: undefined },
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,8 +1,45 @@
|
|||
<template>
|
||||
<p>
|
||||
ListItem:
|
||||
{{ data }}
|
||||
</p>
|
||||
<NuxtLink
|
||||
class="w-full h-fit py-2 bg-white shadow-md border border-gray-200 rounded-md justify-start items-start flex"
|
||||
:class="allowNavigation ? '' : 'pointer-events-none'"
|
||||
:to="`${urlOverwrite ?? $route.path}/${data?.slug}`"
|
||||
>
|
||||
<h1 v-if="numberOverwrite != undefined" class="w-24 text-center text-black text-4xl my-auto">
|
||||
{{ numberOverwrite }}.
|
||||
</h1>
|
||||
<h1 v-else class="w-24 text-center text-black text-4xl my-auto">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
day: "2-digit",
|
||||
})
|
||||
}}.
|
||||
</h1>
|
||||
<div class="grow shrink basis-0 flex-col justify-center items-center flex">
|
||||
<h1 class="w-full">{{ data?.title }}</h1>
|
||||
<p v-if="numberOverwrite != undefined" class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<p v-else class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<p class="w-full text-[#5c5c5c]">
|
||||
{{ data?.description }}
|
||||
</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
@ -11,5 +48,8 @@ import type BaseCollection from "../../types/collection/baseCollection";
|
|||
|
||||
defineProps({
|
||||
data: Object as PropType<BaseCollection>,
|
||||
numberOverwrite: { type: Number, default: undefined },
|
||||
allowNavigation: { type: Boolean, default: false },
|
||||
urlOverwrite: { type: String, default: undefined },
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue