@@ -7,17 +7,34 @@ const { id, title, description, date, place, modality, image, attendees } =
77
88const eventHeaderProps = { id , title , image , modality , description };
99const justDate = date .split (" T" );
10+ const formattedDate = new Date (date ).toLocaleDateString (" es-EC" , {
11+ weekday: " long" ,
12+ year: " numeric" ,
13+ month: " long" ,
14+ day: " numeric" ,
15+ });
1016---
1117
1218<CardBase {... eventHeaderProps }>
13- <!-- Event Date, Location and Atendees -->
14- <div class =" space-y-2 text-sm text-gray-500" >
15- <div class =" flex items-center gap-2" >
19+ <div
20+ class =" space-y-2 text-sm text-gray-500"
21+ itemscope
22+ itemtype =" http://schema.org/Event"
23+ >
24+ <meta itemprop =" name" content ={ title } />
25+ <meta itemprop =" description" content ={ description } />
26+ <meta itemprop =" image" content ={ image } />
27+ <meta itemprop =" startDate" content ={ date } />
28+ <meta itemprop =" location" content ={ place } />
29+ <meta itemprop =" eventAttendanceMode" content ={ modality === " Virtual" ? " OnlineEventAttendanceMode" : " OfflineEventAttendanceMode" } />
30+
31+ <div class =" flex items-center gap-2" aria-label =" Fecha del evento" >
1632 <svg
1733 class =" w-4 h-4"
1834 fill =" none"
1935 stroke =" currentColor"
2036 viewBox =" 0 0 24 24"
37+ aria-hidden =" true"
2138 >
2239 <path
2340 stroke-linecap =" round"
@@ -27,24 +44,18 @@ const justDate = date.split("T");
2744 >
2845 </path >
2946 </svg >
30- <span >
31- {
32- new Date (justDate [0 ]).toLocaleDateString (" es-EC" , {
33- weekday: " long" ,
34- year: " numeric" ,
35- month: " long" ,
36- day: " numeric" ,
37- timeZone: " ECT" ,
38- })
39- }
40- </span >
47+ <time datetime ={ date } itemprop =" startDate" >
48+ { formattedDate }
49+ </time >
4150 </div >
42- <div class =" flex items-center gap-2" >
51+
52+ <div class =" flex items-center gap-2" aria-label =" Ubicación del evento" >
4353 <svg
4454 class =" w-4 h-4"
4555 fill =" none"
4656 stroke =" currentColor"
4757 viewBox =" 0 0 24 24"
58+ aria-hidden =" true"
4859 >
4960 <path
5061 stroke-linecap =" round"
@@ -61,14 +72,16 @@ const justDate = date.split("T");
6172 >
6273 </path >
6374 </svg >
64- <span >{ place } </span >
75+ <span itemprop = " location " >{ place } </span >
6576 </div >
66- <div class =" flex items-center gap-2" >
77+
78+ <div class =" flex items-center gap-2" aria-label =" Número de asistentes" >
6779 <svg
6880 class =" w-4 h-4"
6981 fill =" none"
7082 stroke =" currentColor"
7183 viewBox =" 0 0 24 24"
84+ aria-hidden =" true"
7285 >
7386 <path
7487 stroke-linecap =" round"
@@ -80,7 +93,14 @@ const justDate = date.split("T");
8093 </svg >
8194 <span >{ attendees } asistentes</span >
8295 </div >
83- <a href ={ ` /event/${id } ` } class =" details-button" >Ver detalles</a >
96+
97+ <a
98+ href ={ ` /event/${id } ` }
99+ class =" details-button"
100+ aria-label ={ ` Ver más detalles sobre ${title } ` }
101+ >
102+ Ver detalles
103+ </a >
84104 </div >
85105</CardBase >
86106
0 commit comments