1/** 2 * KomeKaigi å人ã¹ãã³ãµã¼è¡¨ç¤ºæ©è½ 3 */ 4(function(window, document) { 5 'use strict'; 6 7 // è¨å® 8 const CONFIG = { 9 JSON_URL: 'data/individual_sponsors.json', 10 IMAGE_BASE_PATH: 'assets/images/individual_sponsors/', 11 SECTION_ID: 'individual-sponsors', 12 CONTENT_ID: 'individual-sponsors-content' 13 }; 14 15 /** 16 * å人ã¹ãã³ãµã¼ã»ã¯ã·ã§ã³ãé表示ã«ãã 17 */ 18 function hideIndividualSponsorsSection() { 19 const section = document.getElementById(CONFIG.SECTION_ID); 20 if (section) { 21 section.style.display = 'none'; 22 } 23 } 24 25 /** 26 * å人ã¹ãã³ãµã¼ãã¼ã¿ãåå¾ãã¦è¡¨ç¤º 27 */ 28 async function loadIndividualSponsors() { 29 const contentElement = document.getElementById(CONFIG.CONTENT_ID); 30 if (!contentElement) return; 31 32 try { 33 const response = await fetch(CONFIG.JSON_URL); 34 if (!response.ok) { 35 throw new Error(`HTTP error! status: ${response.status}`); 36 } 37 const sponsors = await response.json(); 38 39 if (sponsors.length === 0) { 40 hideIndividualSponsorsSection(); 41 return; 42 } 43 44 renderIndividualSponsorsList(sponsors, contentElement); 45 46 } catch (error) { 47 console.error('å人ã¹ãã³ãµã¼ãã¼ã¿ã®åå¾ã¨ã©ã¼:', error); 48 contentElement.innerHTML = ''; 49 hideIndividualSponsorsSection(); 50 } 51 } 52 53 /** 54 * å人ã¹ãã³ãµã¼ãªã¹ããã¬ã³ããªã³ã° 55 * @param {Array} sponsors - å人ã¹ãã³ãµã¼ã®é å 56 * @param {HTMLElement} container - 表示å ã®ã³ã³ããè¦ç´ 57 */ 58 function renderIndividualSponsorsList(sponsors, container) { 59 const sectionTitle = ` 60 <div class="text-center mb-8"> 61 <h4 class="text-2xl font-semibold text-primary"> 62 å人ã¹ãã³ãµã¼ 63 </h4> 64 </div> 65 `; 66 67 const sponsorsHTML = ` 68 <div class="staff-grid"> 69 ${sponsors.map(sponsor => createIndividualSponsorCard(sponsor)).join('')} 70 </div> 71 `; 72 73 container.innerHTML = sectionTitle + sponsorsHTML; 74 } 75 76 /** 77 * å人ã¹ãã³ãµã¼ã«ã¼ãã使 78 * @param {Object} sponsor - å人ã¹ãã³ãµã¼ã®ãã¼ã¿ 79 * @returns {string} HTMLããã¹ã 80 */ 81 function createIndividualSponsorCard(sponsor) { 82 const imagePath = `${CONFIG.IMAGE_BASE_PATH}${sponsor.image}`; 83 const hasLink = sponsor.url && sponsor.url.trim() !== ''; 84 85 const cardContent = ` 86 <div class="staff-member"> 87 <div class="staff-avatar-wrapper"> 88 <img src="${escapeHtml(imagePath)}" 89 alt="${escapeHtml(sponsor.name)}" 90 class="staff-avatar" 91 loading="lazy"> 92 </div> 93 <div class="staff-name"> 94 ${escapeHtml(sponsor.name)} 95 </div> 96 </div> 97 `; 98 99 return hasLink 100 ? `<a href="${escapeHtml(sponsor.url)}" 101 target="_blank" 102 rel="noopener noreferrer" 103 class="staff-link"> 104 ${cardContent} 105 </a>` 106 : cardContent; 107 } 108 109 // åæå 110 document.addEventListener('DOMContentLoaded', loadIndividualSponsors); 111 112})(window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.