File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,21 +29,40 @@ const base = import.meta.env.BASE_URL;
2929
3030 <div class =" max-w-2xl mx-auto space-y-4" >
3131 { coursesWithInstructors .map ((course ) => (
32- <div class = " bg-white rounded-lg shadow-md px-6 py-4 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3" >
32+ <div class = " bg-white rounded-lg shadow-md px-6 py-4 flex flex-col sm:flex-row sm:items-stretch sm:justify-between gap-3 relative sm:pb-10 " >
3333 <div class = " min-w-0 flex-1" >
3434 <span class = " text-sm font-medium text-primary" >{ course .data .code } </span >
3535 <h2 class = " text-lg font-semibold text-gray-900" >
36- <a href = { ` ${base }courses/${course .slug } ` } class = " hover:text-primary hover:underline" >
37- { course .data .title }
38- </a >
36+ { course .data .title }
3937 </h2 >
4038 { course .data .description && (
4139 <p class = " text-sm text-gray-600 mt-2 leading-relaxed" >{ course .data .description } </p >
4240 )}
4341 </div >
44- <p class = " text-gray-600 sm:text-right sm:shrink-0" >
45- { course .instructorData ? ` ${shortenTitle (course .instructorData .title )} ${course .instructorData .name } ` : ' ' }
46- </p >
42+ <div class = " sm:shrink-0 sm:text-right flex flex-col sm:items-end gap-2 h-full" >
43+ <p class = " text-gray-600" >
44+ { course .instructorData ? ` ${shortenTitle (course .instructorData .title )} ${course .instructorData .name } ` : ' ' }
45+ </p >
46+ <a
47+ href = { ` ${base }courses/${course .slug } ` }
48+ class = " inline-flex items-center gap-1 text-primary-light font-medium hover:underline w-fit self-end sm:absolute sm:bottom-4 sm:right-6"
49+ >
50+ Read More
51+ <svg
52+ class = " w-4 h-4"
53+ xmlns = " http://www.w3.org/2000/svg"
54+ viewBox = " 0 0 24 24"
55+ fill = " none"
56+ stroke = " currentColor"
57+ stroke-width = " 2"
58+ stroke-linecap = " round"
59+ stroke-linejoin = " round"
60+ aria-hidden = " true"
61+ >
62+ <path d = " m9 18 6-6-6-6" ></path >
63+ </svg >
64+ </a >
65+ </div >
4766 </div >
4867 ))}
4968 </div >
You can’t perform that action at this time.
0 commit comments