1
1
---
2
+ import AlumniCard from ' ../../layout/AlumniCardLayout.astro' ;
2
3
import { loadConfig } from " ../../utils/loadconfig" ;
3
4
import { getFeaturedProfiles } from " ../../utils/loadconfig" ;
4
5
@@ -13,71 +14,17 @@ const featuredProfiles = await getFeaturedProfiles(featuredProfilePaths);
13
14
<h2 class =" text-3xl md:text-4xl font-bold" >Meet Our Alumni</h2 >
14
15
</div >
15
16
16
- {
17
- Array .isArray (featuredProfiles ) && featuredProfiles .length > 0 ? (
18
- <div class = " grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" >
19
- { featuredProfiles .slice (0 , 3 ).map ((alumn ) => {
20
- const { name, program, batch, image, slogan, tags, history } =
21
- alumn .data ;
22
- return (
23
- <div class = " bg-gray-800 rounded-lg shadow-lg p-6 hover:shadow-xl transition-shadow duration-300" >
24
- { image ?.url ? (
25
- <img
26
- src = { image .url }
27
- alt = { ` Profile picture of ${name } ` }
28
- class = " w-full h-48 object-cover rounded-t-lg"
29
- />
30
- ) : (
31
- <div class = " w-full h-48 bg-gray-700 rounded-t-lg flex items-center justify-center" >
32
- <span class = " text-gray-400" >No Image Available</span >
33
- </div >
34
- )}
35
- <div class = " pt-4 text-center" >
36
- <h3 class = " text-xl font-semibold" >{ name } </h3 >
37
- <span class = " text-sm" >
38
- { program } , Class of { batch }
39
- </span >
40
- { slogan && <p class = " text-gray-400 italic" >{ slogan } </p >}
41
- <div class = " flex space-x-2 mt-4 " >
42
- { tags .map ((tag , index ) => (
43
- <span
44
- style = { { marginRight: " 0.5rem" , marginLeft: " 0.5rem" }}
45
- class = " bg-blue-200 text-blue-800 text-xs font-semibold px-2 py-1 rounded" >
46
- { tag }
47
- </span >
48
- ))}
49
- </div >
50
- <div class = " mt-4 text-left" >
51
- <ul class = " text-sm" >
52
- { history .map ((item , index ) => (
53
- <li >
54
- <strong >{ item .year } :</strong > { item .position } at{ " " }
55
- { item .company }
56
- </li >
57
- ))}
58
- </ul >
59
- </div >
60
- <div class = " mt-6 text-center" >
61
- <a
62
- href = { ` /profiles/${alumn .slug } ` }
63
- class = " text-blue-500 hover:underline"
64
- >
65
- See More
66
- </a >
67
- </div >
68
- </div >
69
- </div >
70
- );
71
- })}
72
- </div >
73
- ) : (
74
- <div class = " text-center text-gray-400" >
75
- <p >
76
- No alumni profiles available at this time. Please check back later!
77
- </p >
78
- </div >
79
- )
80
- }
17
+ { featuredProfiles .length ? (
18
+ <div class = " grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" >
19
+ { featuredProfiles .slice (0 , 3 ).map ((alumn ) => (
20
+ <AlumniCard slug = { alumn .slug } { ... alumn .data } />
21
+ ))}
22
+ </div >
23
+ ) : (
24
+ <div class = " text-center text-gray-400" >
25
+ <p >No alumni profiles available at this time. Please check back later!</p >
26
+ </div >
27
+ )}
81
28
82
29
<div class =" text-center mt-12" >
83
30
<a
0 commit comments