Skip to content

Commit b6a2c96

Browse files
Update news.js
1 parent b00d19a commit b6a2c96

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

pages/news.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const allNews = [
1313
"Mohammad Alhussan, PhD candidate at UCL Electronic & Electrical Engineering and member of the SafeNetIoT Lab, was honored to meet His Highness the Crown Prince Sheikh Sabah Khaled Al-Hamad Al-Sabah during a gathering with distinguished Kuwaiti students in London. The occasion also included the Ambassador of Kuwait and the leadership of the Cultural Office. Special appreciation to Dr. Abdullah Al-Meshal (Cultural Counselor & Head of the Cultural Office) and Dr. Hessah Alojayan (Cultural Attaché) for their invitation and excellent organization.",
1414
image: "/images/news/crown-prince-london.jpeg",
1515
link: "/news/crown-prince-2025"
16+
imagePosition: 'top'
1617
},
1718

1819
{
@@ -135,12 +136,16 @@ const NewsPage = () => {
135136
{sortedNews.map((item, index) => (
136137
<div key={index} className="col-md-6 col-lg-4 mb-4">
137138
<div className="card h-100">
138-
<img
139-
src={item.image}
140-
alt={`News from ${item.date}`}
141-
className="card-img-top"
142-
style={{ height: '200px', objectFit: 'cover' }}
143-
/>
139+
<img
140+
src={item.image}
141+
alt={`News from ${item.date}`}
142+
className="card-img-top"
143+
style={{
144+
height: '200px',
145+
objectFit: 'cover',
146+
objectPosition: item.imagePosition || 'center'
147+
}}
148+
/>
144149
<div className="card-body">
145150
<h5 className="card-title text-primary">{item.date}</h5>
146151
<p className="card-text text-primary">{item.description}</p>

0 commit comments

Comments
 (0)