Skip to content

Commit 8941d05

Browse files
committed
Update README.md
1 parent da6da12 commit 8941d05

1 file changed

Lines changed: 93 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 93 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ nmoraislab.github.io/
1515
├── css/
1616
│ └── styles.css ← All design tokens, layout, and component styles
1717
├── js/
18-
│ └── main.js ← Section loader · nav · animations · Bluesky feed
18+
│ ├── main.js ← Section loader · nav · animations · Bluesky feed
19+
│ └── news-data.js ← ★ All lab news items (LAB_NEWS array) — edit here ★
1920
│
2021
├── sections/ ← ★ Edit content here ★
2122
│ ├── hero.html ← Hero / landing section
@@ -36,7 +37,8 @@ nmoraislab.github.io/
3637
│ │ ├── logo-icon-black.png ← Same icon inverted — favicon on light-mode tabs
3738
│ │ ├── logo-full-dark.png ← Full logo (white on transparent) — hero
3839
│ │ └── funding/ ← Funder logos (EMBO, FCT, BIOMICS, EU flag)
39-
│ └── photos/ ← Team + group photos
40+
│ ├── photos/ ← Team + group photos
41+
│ └── news/ ← ★ Photos for news items — store new ones here ★
4042
│
4143
└── games/
4244
├── monster-scientists.html ← Outreach game (bilingual EN/PT)
@@ -135,6 +137,95 @@ Add an `<li class="alumni-item">` in `sections/alumni.html`:
135137

136138
---
137139

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
155+
<a href="https://..." target="_blank" rel="noopener">links</a>,
156+
<strong>bold text</strong>, multiple paragraphs, etc.</p>
157+
`,
158+
},
159+
```
160+
161+
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).
168+
- **Use descriptive filenames**: `voyAGEr.jpg`, `icsa2019-poster.jpg`, `lab-retreat-2025.jpg`. Avoid generic names like `image1.jpg`.
169+
- **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+
<a href="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+
138229
## Bluesky feed
139230

140231
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

Comments
 (0)