// pages/HomePage.js - Home page functionality for SPA import { createTeamMember } from '../main.js'; import { createHomeAreaCard } from '../cards/HomeAreaCard.js'; import { createArtifactCarousel } from '../cards/ArtifactSummaryCard.js'; import { areasData, homeBackgroundImage } from '../data/areas.js'; import { featuredArtifacts } from '../data/artifacts.js'; import { teamMembers } from '../data/team.js'; export function renderHomePage() { const content = `
${homeBackgroundImage.attribution}

Team Introduction

We're a multidisciplinary team working on research and regulatory questions related to AI systems — their (open) development, governance, and impact on society at large. Our work spans four key inter-connected areas where AI technology intersects with society:

${Object.values(areasData).map(area => `

${area.title}

${getAreaShortDescription(area.id)}

`).join('')}

🤗 Perspective and Positionality

Our work on these topics is shaped by the context of our work at Hugging Face, which is the main platform for open and collaborative development and sharing of Artificial Intelligence artifacts. As a result, much of our work discusses the specific roles of openness and transparency in shaping AI technology into a more equitable and better-governed category of technology.

Team Members

We also work closely with Irene Solaiman (Chief Policy Officer), Avijit Ghosh (Applied Policy Researcher) in the policy team, and with Meg Mitchell (Chief Ethics Scientist), and with Bruna Trevelin (Legal Counsel)!

Research Areas

`; return { content, init: () => { initializeTeamMembers(); initializeHomeAreaCards(); initializeArtifactCarousels(); initializeBackgroundAttribution(); } }; } export function getHomePageSidebar() { return ` `; } function initializeTeamMembers() { const teamContainer = document.getElementById('team-grid'); if (!teamContainer) { return; } teamContainer.innerHTML = teamMembers.map(member => createTeamMember(member.name, member.role, member.username, member.tags) ).join(''); } function getAreaShortDescription(areaId) { const descriptions = { efficiency: 'Costs, energy, sustainability', personal: 'Personal interactions, agency', rights: 'Legal frameworks, compliance', ecosystems: 'Markets, labor, power dynamics' }; return descriptions[areaId] || ''; } function initializeHomeAreaCards() { const areasContainer = document.getElementById('research-areas'); if (!areasContainer) return; const areas = Object.values(areasData); areasContainer.innerHTML = areas.map(area => createHomeAreaCard(area.id, area.title, area.description, area.openness, Object.values(area.subAreas).map(sub => typeof sub === 'string' ? sub : sub.name), area.imagePosition, area.imageAttribution, area.imageAltText) ).join(''); } function initializeArtifactCarousels() { const carouselContainer = document.getElementById('featured-artifacts-carousel'); if (!carouselContainer) return; createArtifactCarousel(featuredArtifacts, 'featured-artifacts-carousel'); } function initializeBackgroundAttribution() { const backgroundContainer = document.getElementById('home-background-container'); const attribution = document.getElementById('home-bg-attribution'); if (!backgroundContainer || !attribution) { return; } // Show attribution on hover over the background container backgroundContainer.addEventListener('mouseenter', () => { attribution.style.opacity = '1'; }); backgroundContainer.addEventListener('mouseleave', () => { attribution.style.opacity = '0'; }); }