|
2 | 2 | import profileCategories from "../../data/profileCategories.json"; |
3 | 3 | import jobsCategories from "../../data/jobsCategories.json"; |
4 | 4 | import JobCardCategory from "./jobCardCategory.astro"; |
| 5 | +import dayjs from "dayjs"; |
5 | 6 |
|
6 | 7 | const { job } = Astro.props; |
7 | 8 | const jobUrl = `/empleos/${job.pubDate}/${job.slug}`; |
8 | 9 |
|
9 | 10 | const locationLabel = job.location ? job.location : "Presencial"; |
| 11 | +const display_date = dayjs(job.pubDate).format("DD/MM/YY"); |
10 | 12 | --- |
11 | 13 |
|
12 | | -<div class="inline-flex items-center w-full p-4 pb-1 md:pb-2 text-gray-500 dark:text-gray-100 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"> |
| 14 | +<div class="inline-grid items-center w-full p-4 pb-1 md:pb-2 text-gray-500 dark:text-gray-100 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"> |
13 | 15 | <div class="ml-2 inline-grid"> |
14 | 16 | <a href={jobUrl} class="w-full text-base md:text:lg text-gray-800 dark:text-gray-300 font-semibold line-clamp-2 md:line-clamp-1" |
15 | 17 | >{job.title}</a |
16 | 18 | > |
17 | 19 | <a href={jobUrl} class="w-full my-2 text-sm md:text:base text-gray-600 dark:text-gray-300 line-clamp-3 md:line-clamp-2">{job.description}</a |
18 | 20 | > |
19 | 21 | <div |
20 | | - class="flex categories flex-wrap -ml-2 justify-center md:justify-start border-t pt-2 mt-2 md:border-none md:pt-0 md:mt-0" |
| 22 | + class="flex categories w-full flex-wrap -ml-2 justify-center md:justify-start border-t pt-2 mt-2 md:border-none md:pt-0 md:mt-0" |
21 | 23 | > |
22 | 24 | { |
23 | 25 | job.salary && ( |
@@ -96,13 +98,18 @@ const locationLabel = job.location ? job.location : "Presencial"; |
96 | 98 | </> |
97 | 99 | )) |
98 | 100 | } |
99 | | - </div> |
100 | | - <div class="mt-1 flex flex-wrap"></div> |
101 | | - </div> |
| 101 | + <div class="grow"></div> |
| 102 | + <div class="opacity-70 flex items-center mr-2 px-2 py-1 rounded"> |
| 103 | + <img src={`/assets/img/icons/event-date.svg`} class="w-4 h-4 inline dark:invert dark:contrast-200 dark:saturate-0" /> |
| 104 | + <p class="ml-1 text-xs md:text-sm dark:text-gray-100">{display_date}</p> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + <div class="mt-1 flex flex-wrap"></div> |
| 108 | + </div> |
102 | 109 | </div> |
103 | 110 |
|
104 | 111 | <style> |
105 | | - .categories div:last-child { |
| 112 | + .categories div:nth-last-child(3) { |
106 | 113 | display: none; |
107 | 114 | } |
108 | 115 | </style> |
0 commit comments