Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 488: Line 488:
 
                     + '" value="' + curr + '">'
 
                     + '" value="' + curr + '">'
 
                     + '<label for="bm-filter-' + identifier + '">' + curr
 
                     + '<label for="bm-filter-' + identifier + '">' + curr
                    + (curr === FREE_KEY ? '<svg class="bm-icon"><use href="#freeware-icon"/></svg>' : '')
 
                    + (curr === FREE_PLAN_KEY ? '<svg class="bm-icon"><use href="#free-plan-icon"/></svg>' : '')
 
 
                     + '</label></div>'
 
                     + '</label></div>'
 
             }, '');
 
             }, '');
Line 516: Line 514:
 
                             /** @type {DCT} */
 
                             /** @type {DCT} */
 
                             const dct = cell.getData();
 
                             const dct = cell.getData();
                             let out = '<a href="' + dct.url + '">' + dct.name + '</a>';
+
                             let out = '<a href="' + dct.url + '">' + dct.name + '</a><br>';
 
                             if (dct.businessModel.includes('Freeware')) {
 
                             if (dct.businessModel.includes('Freeware')) {
                                 out += '<svg class="bm-icon"><use href="#freeware-icon"/></svg>';
+
                                 out += '<small><span class="badge badge-success">Freeware</span></small>';
 
                             }
 
                             }
 
                             if (dct.businessModel.includes('Free plan available')) {
 
                             if (dct.businessModel.includes('Free plan available')) {
                                 out += '<svg class="bm-icon"><use href="#free-plan-icon"/></svg>';
+
                                 out += '<small><span class="badge badge-success">Free plan</span></small>';
 
                             }
 
                             }
 
                             if (dct.usedByDmo.toLowerCase() === 'yes') {
 
                             if (dct.usedByDmo.toLowerCase() === 'yes') {
                                 out += '<br><small><span class="badge badge-info">Used by practitioners</span></small>';
+
                                 out += '<small><span class="badge badge-danger">Used by practitioners</span></small>';
 
                             }
 
                             }
 
                             if (dct.usedByDmo.toLowerCase() === 'yes with use case') {
 
                             if (dct.usedByDmo.toLowerCase() === 'yes with use case') {
                                 out += '<br><small><span class="badge badge-info">Used by practitioners</span></small>';
+
                                 out += '<small><span class="badge badge-danger">Used by practitioners</span></small>';
                                 out += ' <small><span class="badge badge-success">Use case</span></small>'
+
                                 out += ' <small><span class="badge badge-warning">Use case</span></small>'
 
                             }
 
                             }
 
                             return out;
 
                             return out;
Line 707: Line 705:
 
     <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" style="display:none;">
 
     <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" style="display:none;">
 
         <defs>
 
         <defs>
            <symbol id="freeware-icon" viewBox="0 0 96 96">
 
                <title>Freeware</title>
 
                <clipPath id="fw">
 
                    <path d="M204 216h96v96h-96z" />
 
                </clipPath>
 
                <g clip-path="url(#fw)" 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>
 
 
            <symbol id="free-plan-icon" viewBox="0 0 96 96">
 
                <title>Free plan available</title>
 
                <clipPath id="fp">
 
                    <path d="M592 312h96v96h-96z" />
 
                </clipPath>
 
                <g clip-path="url(#fp)" transform="translate(-592 -312)">
 
                    <path
 
                        d="m674.6 368.212-28.334-28.326a3.99 3.99 0 0 0-2.833-1.214h-18.617c-.254 0-.5.015-.752.038a6.974 6.974 0 0 0-5.064-4.143l-6.764-1.352a4.992 4.992 0 0 1-4-4.359l-.515-4.633a1 1 0 1 0-1.988.221l.515 4.633a6.984 6.984 0 0 0 5.592 6.1l6.763 1.352a4.99 4.99 0 0 1 3.472 2.632 8.118 8.118 0 0 0-5.359 7.605v18.512a3.676 3.676 0 0 0 1.214 2.833l28.33 28.327a4.03 4.03 0 0 0 5.767 0l22.573-22.56a4.094 4.094 0 0 0 0-5.666Zm-1.414 4.251-22.567 22.56a2.032 2.032 0 0 1-2.939 0L619.35 366.7l-.05-.05-.05-.044a1.722 1.722 0 0 1-.531-1.328v-18.513a6.116 6.116 0 0 1 3.939-5.692l.492 2.457c-.322.173-.618.39-.88.645A4 4 0 1 0 625.1 343h-.015l-.465-2.324c.065 0 .129-.009.194-.009h18.619c.538.009 1.05.236 1.418.628l28.33 28.327a2.1 2.1 0 0 1 0 2.836Zm-47.691-27.421a2.017 2.017 0 1 1-1.906.667l.164.821a1 1 0 0 0 1.179.781.999.999 0 0 0 .784-1.177Z" />
 
                </g>
 
            </symbol>
 
 
 
             <symbol id="chevron-down" viewBox="0 0 96 96">
 
             <symbol id="chevron-down" viewBox="0 0 96 96">
 
                 <clipPath id="chev">
 
                 <clipPath id="chev">

Revision as of 11:55, 21 September 2022

Development verstion of the DCT List.
Not ready for production!