test.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. }
  22. function GenerateTable() {
  23. var sHtml = '';
  24. for(var k in aIcons)
  25. {
  26. var sClass = 'fc fc-'+k;
  27. var sColor = document.getElementById('color').value;
  28. var sSize = document.getElementById('size').value;
  29. if (sSize != '')
  30. {
  31. sClass += ' fc-'+sSize;
  32. }
  33. var sRotation = document.getElementById('rotation').value;
  34. if (sRotation != '')
  35. {
  36. sClass += ' fc-rotate-'+sRotation;
  37. }
  38. var sFlip = document.getElementById('flip').value;
  39. if (sFlip != '')
  40. {
  41. sClass += ' fc-flip-'+sFlip;
  42. }
  43. var sAnimation = document.getElementById('animation').value;
  44. if (sAnimation != '')
  45. {
  46. sClass += ' fc-'+sAnimation;
  47. }
  48. var sStyle= 'color: '+sColor;
  49. var sTitle = sClass;
  50. sHtml += '<div title="'+sTitle+'"><span class="'+sClass+'" style="'+sStyle+'"></span>&nbsp;'+aIcons[k]+'</div>';
  51. }
  52. var oElement = document.getElementById('dump');
  53. oElement.innerHTML = sHtml;
  54. }
  55. </script>
  56. </head>
  57. <body>
  58. <h1>Combodo Font test page</h1>
  59. <h2>Parameters</h2>
  60. <div>
  61. <p>Text color: <input type="text" id="color" value="#CC8800"></p>
  62. <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>
  63. <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>
  64. <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>
  65. <p>Animation: <select id="animation"><option value="" selected>None</option><option value="spin">Spin</option><option value="Rotate">Rotate (Experimental!)</option></select></p>
  66. <button type="button" onclick="GenerateTable()">Redraw !</button>
  67. </div>
  68. <h2>Icons</h2>
  69. <div id="dump"></div>
  70. <script>
  71. (function() {
  72. // your page initialization code here
  73. // the DOM will be available here
  74. GenerateTable();
  75. })();
  76. </script>
  77. </body>
  78. </html>