test.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <title>Combodo Font test page</title>
  5. <link rel="stylesheet" type="text/css" href="./font-combodo.css" />
  6. <style>
  7. body {
  8. font-size: 10pt;
  9. font-family: Verdana, Arial, Helvetica;
  10. }
  11. </style>
  12. <script>
  13. aIcons = {
  14. 'new-request': 'New request',
  15. 'new-request-o': 'New request (outline)',
  16. 'ongoing-request': 'On-going request',
  17. 'closed-request': 'Closed request',
  18. 'combodo-icon': 'Combodo icon',
  19. 'combodo-icon-o': 'Combodo icon (outline)',
  20. 'itop-icon': 'iTop icon',
  21. 'itophub-icon': 'iTop Hub icon',
  22. 'chameleon-icon': 'Hub\'s Chameleon icon',
  23. 'opensource-icon': 'Open Source Logo',
  24. }
  25. function GenerateTable() {
  26. var sHtml = '';
  27. for(var k in aIcons)
  28. {
  29. var sClass = 'fc fc-'+k;
  30. var sColor = document.getElementById('color').value;
  31. var sSize = document.getElementById('size').value;
  32. if (sSize != '')
  33. {
  34. sClass += ' fc-'+sSize;
  35. }
  36. var sRotation = document.getElementById('rotation').value;
  37. if (sRotation != '')
  38. {
  39. sClass += ' fc-rotate-'+sRotation;
  40. }
  41. var sFlip = document.getElementById('flip').value;
  42. if (sFlip != '')
  43. {
  44. sClass += ' fc-flip-'+sFlip;
  45. }
  46. var sAnimation = document.getElementById('animation').value;
  47. if (sAnimation != '')
  48. {
  49. sClass += ' fc-'+sAnimation;
  50. }
  51. var sStyle= 'color: '+sColor;
  52. var sTitle = sClass;
  53. sHtml += '<div title="'+sTitle+'"><span class="'+sClass+'" style="'+sStyle+'"></span>&nbsp;'+aIcons[k]+'</div>';
  54. }
  55. var oElement = document.getElementById('dump');
  56. oElement.innerHTML = sHtml;
  57. }
  58. </script>
  59. </head>
  60. <body>
  61. <h1>Combodo Font test page</h1>
  62. <h2>Parameters</h2>
  63. <div>
  64. <p>Text color: <input type="text" id="color" value="#CC8800"></p>
  65. <p>Icon size: <select id="size"><option value="">Normal (1x)</option><option value="2x" selected>2x</option><option value="3x">3x</option><option value="4x">4x</option><option value="5x" selected>5x</option></select></p>
  66. <p>Rotation: <select id="rotation"><option value="" selected>None</option><option value="90">90°</option><option value="180">180°</option><option value="270">270°</option></select></p>
  67. <p>Flip: <select id="flip"><option value="" selected>None</option><option value="vertical">Vertical</option><option value="horizontal">Horizontal</option></select> (NB: flip and rotation cannot be combined)</p>
  68. <p>Animation: <select id="animation"><option value="" selected>None</option><option value="spin">Spin</option><option value="Rotate">Rotate (Experimental!)</option></select></p>
  69. <button type="button" onclick="GenerateTable()">Redraw !</button>
  70. </div>
  71. <h2>Icons</h2>
  72. <div id="dump"></div>
  73. <script>
  74. (function() {
  75. // your page initialization code here
  76. // the DOM will be available here
  77. GenerateTable();
  78. })();
  79. </script>
  80. </body>
  81. </html>