utils.jq(() => { $(function () { const els = document.getElementsByClassName('ds-sites'); for (var i = 0; i < els.length; i++) { const el = els[i]; const api = el.getAttribute('api'); if (api == null) { continue; } const default_avatar = def.avatar; const default_cover = def.cover; // layout utils.request(el, api, function(data) { for (let item of data.content) { var cell = `
`; cell += ``; cell += ``; cell += `
`; cell += ``; cell += `${item.title}`; cell += `${item.description || item.url}`; cell += `
`; cell += `
`; cell += `
`; $(el).find('.grid-box').append(cell); } }); } }); });