Difference between revisions of "Widget:DCTList"
From LINKS Community Center
Line 171: | Line 171: | ||
border-top: 1px solid var(--links-blue); | border-top: 1px solid var(--links-blue); | ||
padding: .5em 0; | padding: .5em 0; | ||
+ | } | ||
+ | |||
+ | .bm-icon { | ||
+ | width: 2em; | ||
+ | height: 2em; | ||
+ | vertical-align: bottom; | ||
} | } | ||
Line 442: | Line 448: | ||
/** @type {DCT} */ | /** @type {DCT} */ | ||
const dct = cell.getData(); | const dct = cell.getData(); | ||
− | + | let out = '<a href="' + dct.url + '">' + dct.name + '</a>'; | |
+ | if (dct.businessModel.includes('Freeware')) { | ||
+ | out += '<svg class="bm-icon"><use href="#freeware-icon"/></svg>'; | ||
+ | } | ||
+ | return out; | ||
} | } | ||
}, | }, | ||
Line 590: | Line 600: | ||
}, { passive: true }); | }, { passive: true }); | ||
</script> | </script> | ||
+ | |||
+ | <!-- Icon definitons --> | ||
+ | <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" style="display:none;"> | ||
+ | <defs> | ||
+ | <symbol id="freeware-icon" viewBox="0 0 96 96"> | ||
+ | <clipPath id="a"> | ||
+ | <path d="M204 216h96v96h-96z" /> | ||
+ | </clipPath> | ||
+ | <g clip-path="url(#a)" transform="translate(-204 -216)"> | ||
+ | <path | ||
+ | d="M237 255c-2.2 0-4-1.8-4-4 0-1.4.8-2.7 1.9-3.4 0 .7.1 1.5.1 2.4 0 1.1.9 2 2 2s2-.9 2-2c0-.9 0-1.7-.1-2.5 1.2.7 2.1 2 2.1 3.5 0 2.2-1.8 4-4 4Zm49.2 17.2-28-28c-.8-.8-1.8-1.2-2.8-1.2h-17.2c-1.1-3.5-3.2-5.3-6.8-6-1.3-.2-2.4-.4-3.5-.6-5.7-.8-6.9-1-6.9-7.4 0-1.1-.9-2-2-2s-2 .9-2 2c0 9.4 3.7 10.4 10.3 11.4 1 .2 2.1.3 3.4.6 1.3.3 2.7.5 3.5 2.6-3 1.2-5.1 4.1-5.1 7.5v18.3c0 1.1.4 2.1 1.2 2.8l28 28c.7.8 1.7 1.1 2.7 1.1 1 0 2-.4 2.8-1.2l22.3-22.3c1.6-1.5 1.6-4.1.1-5.6Z" /> | ||
+ | </g> | ||
+ | </symbol> | ||
+ | </defs> | ||
+ | </svg> | ||
<div id="dct-list-wrapper"> | <div id="dct-list-wrapper"> |
Revision as of 14:56, 12 September 2022
Development verstion of the DCT List.
Not ready for production!