Skip to content

Commit fad97d3

Browse files
committed
feat (ui): display sterilisation and vaccination data
1 parent c3b60d5 commit fad97d3

47 files changed

Lines changed: 77 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

js/dogs.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ function buildDogCard(meta, body) {
106106
data-image="${esc(meta.image)}"
107107
data-emoji="${esc(meta.emoji || '🐕')}"
108108
data-bg-light="${esc(meta.bgLight)}"
109-
data-bg-dark="${esc(meta.bgDark)}">
109+
data-bg-dark="${esc(meta.bgDark)}"
110+
data-sterilized="${esc(meta.sterilized || '')}"
111+
data-vaccinated="${esc(meta.vaccinated || '')}">
110112
${photoArea}
111113
<div class="dog-tile-name">${esc(displayName)}</div>
112114
</div>`;
@@ -226,6 +228,11 @@ function initDogModals() {
226228
? `<div class="dog-modal-photo"><img src="${card.dataset.image}" alt="${card.dataset.name}" style="opacity:0;transition:opacity 0.3s" onload="this.style.opacity=1"></div>`
227229
: `<div class="dog-modal-emoji" style="background:${bg}"><span style="font-size:7rem">${card.dataset.emoji || '🐕'}</span></div>`;
228230

231+
const statusBadges = [];
232+
if (card.dataset.sterilized === 'true') statusBadges.push('<span class="dog-status-badge dog-status-sterilized">✅ sterilized</span>');
233+
if (card.dataset.vaccinated === 'true') statusBadges.push('<span class="dog-status-badge dog-status-vaccinated">💉 vaccinated</span>');
234+
const statusHtml = statusBadges.length ? `<div class="dog-modal-status">${statusBadges.join('')}</div>` : '';
235+
229236
const overlay = document.createElement('div');
230237
overlay.className = 'dog-modal-overlay';
231238
overlay.innerHTML = `
@@ -235,6 +242,7 @@ function initDogModals() {
235242
<div class="dog-modal-body">
236243
<div class="dog-modal-name">${card.dataset.name} <span>${card.dataset.nameEmoji || ''}</span></div>
237244
<div class="dog-modal-breed">${card.dataset.breed || ''}</div>
245+
${statusHtml}
238246
<p class="dog-modal-desc">${card.dataset.body || ''}</p>
239247
<div class="dog-modal-tags">${tags}</div>
240248
</div>

public/dogs/content/airbender.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/airbender.jpg
88
tags: 💨 territorial, 🐾 happy hops for favourites, 🎮 playful, 🤝 good with head-pats
99
bgLight: linear-gradient(135deg,#e0e8f0,#d0d8e8)
1010
bgDark: linear-gradient(135deg,#101828,#181e30)
11+
vaccinated: true
1112
---
1213
Despite what the name suggests, Airbender in fact cannot bend air. He is, unfortunately, a follower of Rathode (a dog who behaved like Sultan), which makes him prone to fiercely territorial behaviour. Airbender is quite playful and can be seen enjoying head-pats. He also has special happy hops, reserved only for the people he is extremely fond of.

public/dogs/content/artemis.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/artemis.jpg
88
tags: 🌱 tiny pup, 🏹 fierce name, 🔧 personality in development
99
bgLight: linear-gradient(135deg,#e8e8e8,#d8d8d8)
1010
bgDark: linear-gradient(135deg,#1a1a1a,#282828)
11+
vaccinated: true
1112
---
1213
Personality in development. Artemis is a 1-month-old black and white pup at Gate 3. She was named for a goddess — now she just needs to grow into the title.

public/dogs/content/barfi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/barfi.jpg
88
tags: 🍭 Sultan's son, 👂 barks at everything, 😬 easily startled, 🛟 still working on bladder control
99
bgLight: linear-gradient(135deg,#fff4e8,#ffead0)
1010
bgDark: linear-gradient(135deg,#2d1a08,#3d2210)
11+
sterilized: true
1112
---
1213
Barfi is one of Sultan's many children, and apart from his pointy ears and his commitment to barking at absolutely everything that moves, he couldn't be more different from his father. Barfi is a sensitive, easily startled adolescent who approaches the world with caution. Curious but unsure, he prefers to observe from a safe distance before deciding whether you pass the vibe check. Despite growing up fast in most ways, Barfi is still working on bladder control — in moments of peak excitement, especially when rolling over for belly rubs, there's a chance you might get more affection than you bargained for.

public/dogs/content/batman.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/batman.jpg
88
tags: 🌱 tiny pup, 🦇 dark knight, 🔧 personality in development
99
bgLight: linear-gradient(135deg,#e8e8e8,#d8d8d8)
1010
bgDark: linear-gradient(135deg,#1a1a1a,#282828)
11+
vaccinated: true
1112
---
1213
Personality in development. Batman is one of Clio's pups, a 2-month-old black and white pup at the Commissioner's Office. The Dark Knight's origin story was humble too.

public/dogs/content/bigboi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ image: public/dogs/images/bigboi.jpg
88
tags: 👴 old soul, 👁️ cataracts, ⚡ famously fast, 🦁 not to be underestimated
99
bgLight: linear-gradient(135deg,#f5f0e8,#ede4d0)
1010
bgDark: linear-gradient(135deg,#2d2a20,#3d3828)
11+
sterilized: true
12+
vaccinated: true
1113
---
1214
Big Boi carries his age with remarkable grace and hasn't lost an ounce of his spirit. Though he has cataracts and limited vision, it does little to slow him down or dampen his confidence. Call his name and Big Boi will run toward the sound of your voice, stopping right in front of you and patiently waiting for attention. With humans, he is calm, gentle, and wise — an old soul in every sense. But when his boundaries are crossed, he is quick to remind everyone that he is not to be underestimated. Despite his age, Big Boi is famously fast and determined.

public/dogs/content/biscuit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/biscuit.jpg
88
tags: 🌱 tiny pup, 🔧 personality in development, 🏗️ construction baby
99
bgLight: linear-gradient(135deg,#f8e8d0,#f0d8b8)
1010
bgDark: linear-gradient(135deg,#2d1808,#3d2010)
11+
vaccinated: true
1112
---
1213
Personality in development. Biscuit is the tiniest of the Gate 3 construction site trio — sweet name, big future. She's still discovering the world, one curious sniff at a time.

public/dogs/content/blossom.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/blossom.jpg
88
tags: 🌱 tiny pup, 🌸 tricolour beauty, 🔧 personality in development
99
bgLight: linear-gradient(135deg,#f8e8d0,#f0d8b0)
1010
bgDark: linear-gradient(135deg,#2a1808,#3a2010)
11+
vaccinated: true
1112
---
1213
Personality in development. Blossom is a 2-month-old tricolour pup next to WUD. She's just beginning to find her feet — and she's already doing it with style.

public/dogs/content/blueberry.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ image: public/dogs/images/blueberry.jpg
88
tags: 🌱 tiny pup, 🫐 sweet newcomer, 🔧 personality in development
99
bgLight: linear-gradient(135deg,#f8e8d0,#f0d8b0)
1010
bgDark: linear-gradient(135deg,#2a1808,#3a2010)
11+
vaccinated: true
1112
---
1213
Personality in development. Blueberry is a 1-month-old brown and white pup at Gate 3. She's only just arrived in the world — stay tuned for updates.

public/dogs/content/boop.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ image: public/dogs/images/boop.jpg
88
tags: 💪 macho energy, 👁️ attention seeker, 🛡️ campus guardian, 🥰 big softie
99
bgLight: linear-gradient(135deg,#fff8e8,#ffeecc)
1010
bgDark: linear-gradient(135deg,#2d2208,#3d2c0d)
11+
sterilized: true
12+
vaccinated: true
1113
---
1214
Boop is the self-appointed macho man of Gate 1. He thrives on attention and has an uncanny talent for inserting himself into any human–dog interaction, firmly believing the spotlight belongs to him. A dedicated guardian of both the campus and his pack, Boop carries himself with an air of bravery and confidence. But beneath all that tough-guy energy lies a big softie who simply loves being noticed and adored.

0 commit comments

Comments
 (0)