styles.js 564 B

1234567891011121314151617181920
  1. 'use strict';
  2. const icons = require('./icons.json');
  3. const IMG_SIZE = 16;
  4. let css = `i.icon { display: block; height: ${IMG_SIZE}px; width: ${IMG_SIZE}px; }\n`;
  5. css += 'table tr { white-space: nowrap; }\n';
  6. css += 'td.perms {}\n';
  7. css += 'td.file-size { text-align: right; padding-left: 1em; }\n';
  8. css += 'td.display-name { padding-left: 1em; }\n';
  9. Object.keys(icons).forEach((key) => {
  10. css += `i.icon-${key} {\n`;
  11. css += ` background-image: url("data:image/png;base64,${icons[key]}");\n`;
  12. css += '}\n\n';
  13. });
  14. exports.icons = icons;
  15. exports.css = css;