1const resp = fetch("/resources/testimonials.json").then(async resp => { 2 const testimonials = await resp.json(); 3 4 ready(function() { 5 for (let i = 0; i < testimonials.length; i++) { 6 const testimonial = testimonials[i]; 7 const tpl = cloneTemplate('#tpl-testimonial'); 8 $_('.testimonial-picture', tpl).src = testimonial.picture || ""; 9 $_('.testimonial-quote', tpl).innerText = `"${testimonial.quote}"`; 10 if (testimonial.name) { 11 $_('.testimonial-name', tpl).innerText = testimonial.name || ""; 12 } else { 13 $_('.testimonial-name', tpl).innerText = ` @${testimonial.username}`; 14 } 15 if (testimonial.link) { 16 $_('.testimonial-name', tpl).href = testimonial.link; 17 } 18 $_('.testimonial-role-text', tpl).innerText = testimonial.role || ""; 19 if (testimonial.org) { 20 console.log($_('.testimonial-org', tpl), tpl); 21 // $_('.testimonial-role', tpl).prepend(document.createElement("br")); 22 $_('.testimonial-org', tpl).innerText = testimonial.org; 23 if (testimonial.org_link) { 24 $_('.testimonial-org', tpl).href = testimonial.org_link; 25 } 26 } 27 $_(`.testimonial-col:nth-child(${i%3 + 1})`).append(tpl); 28 } 29 }); 30});
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.