@@ -107,79 +107,84 @@ export default function Pages({
107107
108108 { pages . length ? (
109109 < div className = "overflow-hidden shadow rounded-md bg-white dark:bg-gray-900 border dark:border-gray-800" >
110- < div className = "sm:grid sm:grid-cols-2" >
111- { pages . map ( ( page , index ) => (
112- < div
113- key = { page . id }
114- className = { `relative group p-6 hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer transition-colors duration-200 ${
115- index < pages . length - 1 ? 'border-b border-gray-200 dark:border-gray-800' : ''
116- } ${
117- index % 2 === 0 && index < pages . length - 2 ? 'sm:border-r sm:border-gray-200 sm:dark:border-gray-800' : ''
118- } ${
119- index % 2 === 0 && index === pages . length - 2 && pages . length % 2 === 0 ? 'sm:border-r sm:border-gray-200 sm:dark:border-gray-800' : ''
120- } `}
121- >
122- < div >
123- < span
124- className = { classNames (
125- page . type === PageType . announcements &&
126- "bg-blue-100 dark:bg-blue-700" ,
127- page . type === PageType . changelogs &&
128- "bg-teal-100 dark:bg-teal-700" ,
129- page . type === PageType . releases &&
130- "bg-rose-100 dark:bg-rose-700" ,
131- page . type === PageType . updates &&
132- "bg-amber-100 dark:bg-amber-700" ,
133- page . type === PageType . announcements &&
134- "text-blue-500 dark:text-blue-100" ,
135- page . type === PageType . changelogs &&
136- "text-teal-500 dark:text-teal-100" ,
137- page . type === PageType . releases &&
138- "text-rose-500 dark:text-rose-100" ,
139- page . type === PageType . updates &&
140- "text-amber-500 dark:text-amber-100" ,
141- "inline-flex px-2 py-1 font-bold rounded-md"
142- ) }
143- >
144- { PageTypeToLabel [ page . type ] }
145- </ span >
146- </ div >
147- < div className = "mt-6" >
148- < h3 className = "text-lg font-medium dark:text-white" >
149- < a
150- href = { `${ ROUTES . PAGES } /${ page . id } ` }
151- className = "focus:outline-none font-bold tracking-tight hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors duration-200"
152- >
153- < span className = "absolute inset-0" aria-hidden = "true" />
154- { page . title }
155- </ a >
156- </ h3 >
157- < p className = "mt-2 text-sm text-gray-500 dark:text-gray-400" >
158- { page . description }
159- </ p >
160- < p className = "mt-2 text-xs text-gray-400 dark:text-gray-500" >
161- { page . page_settings ?. custom_domain
162- ? page . page_settings . custom_domain
163- : `${ page . url_slug } .changes.page`
164- }
165- </ p >
166- </ div >
167- < span
168- className = "pointer-events-none absolute top-6 right-6 text-gray-500 dark:text-gray-400 group-hover:text-indigo-400"
169- aria-hidden = "true"
170- >
171- { page . teams && page . user_id !== user ?. id ? (
172- < div className = "flex items-center gap-1" >
173- < UserGroupIcon className = "h-4 w-4" />
174- < span className = "text-sm font-medium" >
175- Editor ({ page . teams . name } )
176- </ span >
110+ < ul className = "divide-y divide-gray-200 dark:divide-gray-800" >
111+ { pages . map ( ( page ) => (
112+ < li key = { page . id } className = "relative group hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors duration-200" >
113+ < div className = "flex items-center justify-between p-6" >
114+ < div className = "flex-1 min-w-0" >
115+ < div className = "flex items-center gap-3 mb-2" >
116+ < span
117+ className = { classNames (
118+ page . type === PageType . announcements &&
119+ "bg-blue-100 dark:bg-blue-700" ,
120+ page . type === PageType . changelogs &&
121+ "bg-teal-100 dark:bg-teal-700" ,
122+ page . type === PageType . releases &&
123+ "bg-rose-100 dark:bg-rose-700" ,
124+ page . type === PageType . updates &&
125+ "bg-amber-100 dark:bg-amber-700" ,
126+ page . type === PageType . announcements &&
127+ "text-blue-500 dark:text-blue-100" ,
128+ page . type === PageType . changelogs &&
129+ "text-teal-500 dark:text-teal-100" ,
130+ page . type === PageType . releases &&
131+ "text-rose-500 dark:text-rose-100" ,
132+ page . type === PageType . updates &&
133+ "text-amber-500 dark:text-amber-100" ,
134+ "inline-flex px-2 py-1 text-xs font-bold rounded-md"
135+ ) }
136+ >
137+ { PageTypeToLabel [ page . type ] }
138+ </ span >
139+ { page . teams && page . user_id !== user ?. id && (
140+ < div className = "flex items-center gap-1 text-gray-500 dark:text-gray-400" >
141+ < UserGroupIcon className = "h-4 w-4" />
142+ < span className = "text-xs font-medium" >
143+ Editor ({ page . teams . name } )
144+ </ span >
145+ </ div >
146+ ) }
147+ </ div >
148+ < div >
149+ < h3 className = "text-lg font-bold tracking-tight text-gray-900 dark:text-white" >
150+ < a
151+ href = { `${ ROUTES . PAGES } /${ page . id } ` }
152+ className = "focus:outline-none hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors duration-200"
153+ >
154+ < span className = "absolute inset-0" aria-hidden = "true" />
155+ { page . title }
156+ </ a >
157+ </ h3 >
158+ { page . description && (
159+ < p className = "mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2" >
160+ { page . description }
161+ </ p >
162+ ) }
163+ < p className = "mt-2 text-xs text-gray-400 dark:text-gray-500" >
164+ { page . page_settings ?. custom_domain
165+ ? page . page_settings . custom_domain
166+ : `${ page . url_slug } .changes.page`
167+ }
168+ </ p >
169+ </ div >
177170 </ div >
178- ) : null }
179- </ span >
180- </ div >
171+ < div className = "ml-4 flex-shrink-0" >
172+ < svg
173+ className = "h-5 w-5 text-gray-400 group-hover:text-indigo-500 transition-colors"
174+ fill = "currentColor"
175+ viewBox = "0 0 20 20"
176+ >
177+ < path
178+ fillRule = "evenodd"
179+ d = "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
180+ clipRule = "evenodd"
181+ />
182+ </ svg >
183+ </ div >
184+ </ div >
185+ </ li >
181186 ) ) }
182- </ div >
187+ </ ul >
183188 </ div >
184189 ) : null }
185190 </ div >
0 commit comments