diff --git a/website/public/assets/js/pages/city-hub.js b/website/public/assets/js/pages/city-hub.js index ab714a36..c388a6f8 100644 --- a/website/public/assets/js/pages/city-hub.js +++ b/website/public/assets/js/pages/city-hub.js @@ -65,40 +65,14 @@ '' + esc(s.community || s.location || '') + '' ).join('') : '
No stories here yet.
'; - } - - // Community Stories card -> Live when the city has stories. - const storiesCard = document.querySelector('[data-feature="stories"]'); - if (storiesCard && cityStories.length > 0) { - storiesCard.classList.remove('coming-soon'); - - const badge = storiesCard.querySelector('.feature-status-badge'); - if (badge) { - badge.className = 'feature-status-badge live'; - badge.innerHTML = - ' ' + - 'Live'; - } - - const desc = storiesCard.querySelector('.feature-description'); - if (desc) { - desc.setAttribute('data-i18n', 'cityHub.features.stories.description'); - desc.textContent = - 'Discover real stories of neighbourhood transformation, ' + - 'told by the people who made it happen.'; - } - - const action = storiesCard.querySelector('.feature-action'); - if (action) { - action.innerHTML = - '' + - 'Read Stories ' + - ''; - } - // Translate the newly injected data-i18n nodes. - if (window.translator && typeof window.translator.translatePage === 'function') { - window.translator.translatePage(); + // Hide the "Read all" link for cities without a stories page yet + // (they have no stories) so it can't 404. It reappears once a + // city has stories (and thus a /stories/ page). + if (cityStories.length === 0) { + const seeAll = hubStories.closest('.hub-section'); + const link = seeAll && seeAll.querySelector('.hub-see-all'); + if (link) link.style.display = 'none'; } } diff --git a/website/public/cities/ahmedabad/index.html b/website/public/cities/ahmedabad/index.html index 94e3d1b0..0f1e1987 100644 --- a/website/public/cities/ahmedabad/index.html +++ b/website/public/cities/ahmedabad/index.html @@ -61,6 +61,7 @@ +