SET link = COALESCE($link, 'https://shandan.one/'||$tool);
SELECT 'text' AS component
, '<div class="pure-g" sty>
  <div class="pure-u-1">
    <div class="pure-button" style="margin: 1em 0 0; background: '||$color||';">
      <a href="'||$link||'" style="color: floralwhite;">'||$link||'</a>
    </div>
  </div>
</div>' AS html
;