index.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <title>Spectrum - The No Hassle jQuery Colorpicker</title>
  6. <meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
  7. <meta name="author" content="Brian Grinstead and Spectrum contributors">
  8. <link rel="stylesheet" type="text/css" href="../spectrum.css">
  9. <link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
  10. <link rel="stylesheet" type="text/css" href="../docs/docs.css">
  11. <script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
  12. <script type="text/javascript" src="../spectrum.js"></script>
  13. <script type="text/javascript" src="../i18n/jquery.spectrum-fi.js"></script>
  14. <script type='text/javascript' src='example.js'></script>
  15. <style>
  16. .example-container {
  17. margin-top: 10px;
  18. text-align: center;
  19. background: #333;
  20. background: linear-gradient(to bottom, #eee, #ccc);
  21. padding: 3px;
  22. padding-top: 0;
  23. border-radius: 5px;
  24. }
  25. .example-controls {
  26. background: #999;
  27. margin: 0 -3px;
  28. padding: 10px 0;
  29. margin-bottom: 15px;
  30. }
  31. label {
  32. display: inline-block;
  33. font-weight: bold;
  34. }
  35. #palettes .sp-palette {
  36. max-width: 500px;
  37. }
  38. .newGmail .sp-palette-row-0, .newGmail .sp-palette-row-1 {
  39. margin-bottom: 5px;
  40. }
  41. .newGmail .sp-palette .sp-thumb-el {
  42. width: 20px;
  43. height: 20px;
  44. margin: 1px 1px;
  45. }
  46. .newGmail .sp-palette .sp-thumb-el:hover, .newGmail .sp-palette .sp-thumb-el.sp-thumb-active {
  47. border-color: #000;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div id='header'>
  53. <h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
  54. <div id='links'>
  55. View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
  56. Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
  57. </div>
  58. <br style='clear:both;' />
  59. </div>
  60. <div class="container">
  61. <h2>Spectrum Colorpicker Crazy Configurator</h2>
  62. <div class='alert'>NOTE: this page is currently in development. Please refer to the <a href='http://github.com/bgrins/spectrum'>Home Page</a> for demos and documentation instead.
  63. </div>
  64. <p>
  65. Spectrum can be customized to show and hide different portions of the colorpicker. Try clicking some of the buttons below to see how it can change.
  66. </p>
  67. <div class="example-container">
  68. <div class="example-controls">
  69. <div class='btn-group'>
  70. <button class='btn toggleBtn' data-rule='showPalette'>Show Palette</button>
  71. <button class='btn toggleBtn' data-rule='showInput'>Show Input</button>
  72. <button class='btn toggleBtn' data-rule='showInitial'>Show Initial</button>
  73. <button class='btn toggleBtn' data-rule='showAlpha'>Show Alpha</button>
  74. <button class='btn toggleBtn' data-rule='showPaletteOnly'>Show Palette Only</button>
  75. <button class='btn toggleBtn' data-rule='togglePaletteOnly'>Show Picker Toggle Button</button>
  76. <button class='btn toggleBtn' data-rule='showButtons'>Show Buttons</button>
  77. </div>
  78. <br />
  79. <br />
  80. <p>
  81. <label>Draggable Size <input type='range' value='172' id='size' max='500' min='50' /></label>
  82. <label>Hue Size <input type='range' value='16' id='huesize' max='90' min='5' /></label>
  83. </p>
  84. </div>
  85. <input id="full">
  86. </div>
  87. <hr />
  88. <h2>Spectrum Colorpicker Localization</h2>
  89. <div class='alert'>
  90. <p>
  91. This page has loaded the German localization. Here is a list of all <a href='https://github.com/bgrins/spectrum/tree/master/i18n'>spectrum localizations</a>. <strong>Please help expand our localizations</strong> if you know a language that isn't represented! You can copy and paste one of the files, and update the text for 'cancel' and 'choose', then submit a pull request at: <a href'https://github.com/bgrins/spectrum'>https://github.com/bgrins/spectrum</a>.
  92. </p>
  93. </div>
  94. <input id="langdemo" />
  95. <hr />
  96. <h2>Spectrum Colorpicker Sample Palettes</h2>
  97. <div class='alert'>
  98. <p>
  99. NOTE: these palettes are also a work in progress. Ideally the site will eventually allow you to choose between a few options and download them.
  100. </p>
  101. <p>
  102. The <code>newGmail</code> palette below is an example of customizing the palette size and layout with CSS.
  103. </p>
  104. </div>
  105. <div id="palettes" class="example-container">
  106. </div>
  107. </div>
  108. <script type="text/javascript" src="../docs/prettify.js"></script>
  109. <script type="text/javascript">
  110. var _gaq = _gaq || [];
  111. _gaq.push(['_setAccount', 'UA-8259845-4']);
  112. _gaq.push(['_trackPageview']);
  113. (function() {
  114. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  115. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  116. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  117. })();
  118. </script>
  119. </body>
  120. </html>