You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.4 KiB

2 years ago
  1. <template>
  2. <div class="tw-bg-neutrals-0 tw-rounded-[10px] tw-px-[6px] tw-py-[8px] md:tw-px-[11px] md:tw-py-[10px]">
  3. <nuxt-link :to="localePath(`/exhibition/${item.id}`)"
  4. class="remove-underline md:tw-grid md:tw-grid-cols-[1fr_3fr] md:tw-gap-[20px] md:tw-auto-row-1 xl:tw-grid-cols-[160px_auto]">
  5. <div
  6. class="tw-bg-white tw-rounded-[10px] tw-flex tw-items-center tw-justify-center tw-overflow-hidden tw-min-h-[106px] xl:tw-w-[160px] xl:tw-h-[106px]">
  7. <img :src="item.logo" class="tw-h-[20vw] md:tw-h-[13vw] xl:tw-h-[106px]" />
  8. </div>
  9. <div class="md:tw-flex md:tw-flex-col md:tw-justify-between">
  10. <div class="md:tw-flex md:tw-flex-col">
  11. <h3
  12. class="t14 tw-h-[32px] tw-line-clamp-2 tw-text-ellipsis tw-overflow-hidden tw-mt-[8px] tw-mb-[4px] md:t16 md:tw-font-medium md:tw-line-clamp-none md:tw-h-full md:tw-mt-0 xl:tw-line-clamp-2 xl:tw-h-[42px]">
  13. {{ item.name }}
  14. </h3>
  15. <div class="tw-hidden t14 tw-text-neutrals-600 md:tw-block">
  16. {{ item.region.name ? item.region.name + " . " : "" }}
  17. {{ item.country.name ? item.country.name + " . " : "" }}
  18. {{ item.city.name ? item.city.name : "" }}
  19. </div>
  20. </div>
  21. <div class="md:tw-mt-[14px] md:tw-flex md:tw-justify-between md:tw-items-center">
  22. <div class="time t12 tw-mt-[8px] md:t16 md:tw-font-medium md:tw-mt-0">
  23. {{ formatDate(item.startdate) }}
  24. ~
  25. {{ formatDate(item.enddate) }}
  26. </div>
  27. <div v-if="days !== 0" class="tw-mt-[14px] tw-text-right md:tw-mt-0">
  28. <span class="t14 tw-text-neutrals-500 tw-mr-[10px]">{{ $t('Coming soon in') }}</span>
  29. <span class="t20 tw-font-medium tw-text-error-default md:t24 ">{{ days
  30. }}<span class="t14 tw-text-neutrals-500 tw-ml-[6px] md:tw-ml-[10px]">{{
  31. $t("day")
  32. }}</span></span>
  33. </div>
  34. </div>
  35. </div>
  36. </nuxt-link>
  37. </div>
  38. </template>
  39. <script>
  40. import { formatDate, dateCountDown } from "~/utils/assist";
  41. import VClamp from "vue-clamp";
  42. export default {
  43. props: {
  44. item: {
  45. type: Object,
  46. },
  47. },
  48. components: {
  49. VClamp,
  50. },
  51. created() {
  52. this.days = this.dateCountDown(this.$props.item.startdate);
  53. },
  54. data() {
  55. return {
  56. days: 1,
  57. };
  58. },
  59. methods: {
  60. formatDate,
  61. dateCountDown,
  62. },
  63. };
  64. </script>
  65. <style lang="scss" scoped>
  66. </style>