You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8941d05
Browse filesBrowse the repository at this point in the historyBrowse files
│ └── news/ ← ★ Photos for news items — store new ones here ★
40
42
│
41
43
└── games/
42
44
├── monster-scientists.html ← Outreach game (bilingual EN/PT)
@@ -135,6 +137,95 @@ Add an `<li class="alumni-item">` in `sections/alumni.html`:
135
137
136
138
---
137
139
140
+
## Adding news items
141
+
142
+
All news lives in **`js/news-data.js`** as a JavaScript array called `LAB_NEWS`. Items are displayed newest-first: the first item in the array is the most recent. The homepage shows the 4 most recent; `news.html` shows all of them.
143
+
144
+
### Basic structure
145
+
146
+
```js
147
+
{
148
+
date:"June 2025", // Month + year (displayed as-is)
149
+
title:"Short, clear headline",
150
+
image:"assets/news/my-photo.jpg", // ← always try to include a photo (see below)
151
+
imageAlt:"Brief description of the image for accessibility",
152
+
summary:"One or two sentences shown on the news card.",
153
+
content:`
154
+
<p>Full HTML content shown when the card is clicked. Can include
Add new items at the **top** of the array (before the current first item) so they appear first.
162
+
163
+
### Photos — best practices
164
+
165
+
**Always try to include a photo.** News cards without images look sparse; a graphical abstract, screenshot, group photo, or poster image makes a big difference.
166
+
167
+
-**Store photos in `assets/news/`** — not in `assets/photos/` (that folder is for team photos).
-**Preferred formats**: JPEG for photos/graphical abstracts, PNG if transparency is needed.
170
+
-**Size**: aim for images at least 800 px wide. Very large files (>2 MB) should be compressed before adding — free tools like [Squoosh](https://squoosh.app) work well.
171
+
- Set a meaningful `imageAlt` string — it is read by screen readers and shown if the image fails to load.
172
+
173
+
Good sources for paper news items:
174
+
-**Graphical abstracts** from the paper PDF or journal page
175
+
-**Key figures** that summarise the main finding
176
+
-**Screenshots** of web tools (voyAGEr, betAS, psichomics…)
177
+
-**Event photos** for conferences, awards, retreats
178
+
179
+
### Multiple images (gallery)
180
+
181
+
If you want a gallery inside the modal (click to expand, lightbox on click), use the `images` array instead of a single `image`:
182
+
183
+
```js
184
+
{
185
+
date:"June 2025",
186
+
title:"Lab retreat 2025",
187
+
images: [
188
+
{ src:"assets/news/retreat-2025-group.jpg", alt:"Lab group photo at retreat" },
189
+
{ src:"assets/news/retreat-2025-hiking.jpg", alt:"Hiking on day two" },
190
+
{ src:"assets/news/retreat-2025-dinner.jpg", alt:"Dinner on the last evening" },
191
+
],
192
+
summary:"...",
193
+
content:`...`,
194
+
},
195
+
```
196
+
197
+
The first image in the `images` array is also used as the card thumbnail.
198
+
199
+
### Links in content
200
+
201
+
Always open external links in a new tab:
202
+
```html
203
+
<ahref="https://doi.org/10.xxxx/xxxxx"target="_blank"rel="noopener">Read the paper ↗</a>
204
+
```
205
+
206
+
### Example — paper announcement
207
+
208
+
```js
209
+
{
210
+
date:"June 2025",
211
+
title:"Our new paper on RNA splicing published in Nature",
212
+
image:"assets/news/splicing-2025.jpg",
213
+
imageAlt:"Graphical abstract: exon inclusion rates across cancer types",
214
+
summary:"Our study on tissue-specific alternative splicing dysregulation in cancer is now published in Nature.",
215
+
content:`
216
+
<p>
217
+
Our paper <em>"Widespread alternative splicing dysregulation in cancer"</em>
218
+
is now published in <em>Nature</em>. 🎉
219
+
</p>
220
+
<p>
221
+
<a href="https://doi.org/10.1038/..." target="_blank" rel="noopener">Read the paper ↗</a>
222
+
</p>
223
+
`,
224
+
},
225
+
```
226
+
227
+
---
228
+
138
229
## Bluesky feed
139
230
140
231
The News section automatically fetches the most recent posts from `@nmoraislab.bsky.social` via the public AT Protocol API (no key required). Reposts are filtered out. To change the account, edit the `HANDLE` constant at the top of `loadBlueskyFeed()` in `js/main.js`.
0 commit comments