index.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="robots" content="index,follow">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  8. <meta name="description" content="A javascript class that animates a numerical value by counting to it.">
  9. <title>CountUp.js</title>
  10. <link rel="stylesheet" type="text/css" href="https://inorganik.github.io/assets/css/style.css">
  11. <script src="demo/demo.js" type="module"></script>
  12. <script nomodule src="dist/countUp.umd.js"></script>
  13. <script nomodule src="demo/demo-nomodule.js"></script>
  14. <!-- Google tag (gtag.js) -->
  15. <script async src="https://www.googletagmanager.com/gtag/js?id=G-QXSCCPQ13N"></script>
  16. <script>
  17. window.dataLayer = window.dataLayer || [];
  18. function gtag(){dataLayer.push(arguments);}
  19. gtag('js', new Date());
  20. gtag('config', 'G-QXSCCPQ13N');
  21. </script>
  22. </head>
  23. <body>
  24. <a class="forkMe" href="https://github.com/inorganik/CountUp.js"><img src="https://inorganik.github.io/assets/img/forkme_custom_indigo.png" alt="Fork me on GitHub"></a>
  25. <div id="wrap">
  26. <header>
  27. <div id="github"><a class="block" href="https://inorganik.github.io"></a></div>
  28. <div class="leaderLine">////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
  29. <div id="logo"><a class="block" href="https://inorganik.net" alt="inorganik produce, inc"></a></div>
  30. </header>
  31. <section>
  32. <div class="col full">
  33. <h1>CountUp.js &nbsp;<small id="version" class="lt-gray"></small></h1>
  34. </div>
  35. <div class="col full">
  36. <p>CountUp.js is a dependency-free, lightweight JavaScript class that can be used to quickly create animations that display numerical data in a more interesting way.</p>
  37. <p>Install via npm/yarn using the package name &nbsp;<code class="indigo large">countup.js</code>.</p>
  38. <h3 class="marginTop marginBottom"><a class="lime weight700" href="https://github.com/inorganik/CountUp.js">View on Github</a></h3>
  39. </div>
  40. </section>
  41. <section>
  42. <p style="position:absolute; top:5px; left:0;">Current stars:</p>
  43. <h1 class="jumbo" id="myTargetElement">0</h1>
  44. </section>
  45. <section id="errorSection" style="background-color:#FFDCDC; display:none" class="col-inner">
  46. <h4 id="error" style="color: red" class="noMargin"></h4>
  47. </section>
  48. <section>
  49. <form>
  50. <h4 class="inlineLeft noMargin weight300">Params:</h4>
  51. <div class="inlineLeft marginLeft marginRight">
  52. <input type="text" value="0" id="startVal" style="width:80px" class="updateCodeVis">
  53. <label class="inlineLabel">Start</label>
  54. </div>
  55. <input id="swapValues" type="button" class="inlineLeft marginRight" value="Swap" style="width:80px;">
  56. <div class="inlineLeft marginRight">
  57. <input type="text" value="94.62" id="endVal" style="width:80px" class="updateCodeVis">
  58. <label class="inlineLabel">End</label>
  59. </div>
  60. <div class="inlineLeft marginRight">
  61. <input type="number" value="0" id="decimalPlaces" step="1" style="width:50px" class="updateCodeVis">
  62. <label class="inlineLabel">Decimal places</label>
  63. </div>
  64. <div class="inlineLeft marginRight">
  65. <input type="number" value="2" id="duration" step=".1" style="width:50px" class="updateCodeVis">
  66. <label class="inlineLabel">Duration</label>
  67. </div>
  68. </form>
  69. </section>
  70. <section>
  71. <form>
  72. <h4 class="inlineLeft noMargin weight300">Options:</h4>
  73. <div class="inlineLeft marginLeft marginRight">
  74. <input id="useEasing" type="checkbox" checked><label class="inlineLabel updateCodeVis">Use easing</label>
  75. </div>
  76. <div class="inlineLeft marginRight">
  77. <input id="useGrouping" type="checkbox" checked><label class="inlineLabel updateCodeVis">Use grouping</label>
  78. </div>
  79. <div class="inlineLeft marginRight">
  80. <input id="useIndianSeparators" type="checkbox"><label class="inlineLabel updateCodeVis">Use Indian separators</label>
  81. </div>
  82. <div class="inlineLeft marginRight">
  83. <input type="text" value="," id="separator" style="width:25px; padding:0 5px;" class="updateCodeVis">
  84. <label class="inlineLabel">Separator</label>
  85. </div>
  86. <div class="inlineLeft marginRight">
  87. <input type="text" value="." id="decimal" style="width:25px; padding:0 5px;" class="updateCodeVis">
  88. <label class="inlineLabel">Decimal</label>
  89. </div>
  90. <div class="inlineLeft marginRight">
  91. <input type="text" value="" id="prefix" style="width:50px; padding:0 5px;" class="updateCodeVis">
  92. <label class="inlineLabel">Prefix</label>
  93. </div>
  94. <div class="inlineLeft marginRight">
  95. <input type="text" value="" id="suffix" style="width:50px; padding:0 5px;" class="updateCodeVis">
  96. <label class="inlineLabel">Suffix</label>
  97. </div>
  98. </form>
  99. </section>
  100. <section>
  101. <form>
  102. <h4 class="inlineLeft noMargin weight300">Methods:</h4>
  103. <input type="button" value="Start" id="start" class="inlineLeft marginLeft marginRight">
  104. <input type="button" value="Pause/Resume" id="pauseResume" class="inlineLeft marginRight">
  105. <input type="button" value="Reset" id="reset" class="inlineLeft marginRight">
  106. <input type="button" value="Update:" id="update" class="inlineLeft" style="margin-right:5px">
  107. <div class="inlineLeft marginRight">
  108. <input type="text" value="6789" id="updateVal" style="width:80px">
  109. </div>
  110. <div class="inlineLeft">
  111. <input type="checkbox" id="useOnComplete" class="updateCodeVis"><label class="inlineLabel">Alert on complete</label>
  112. </div>
  113. </form>
  114. </section>
  115. <section id="easingSection">
  116. <form>
  117. <h4 class="inlineLeft noMargin weight300">Custom:</h4>
  118. <div class="inlineLeft marginLeft">
  119. <label class="inlineLabel">Easing: &nbsp;</label>
  120. <select id="easingFnsDropdown" class="marginRight updateCodeVis">
  121. <option value="easeOutExpo" selected>easeOutExpo (default, built-in)</option>
  122. <option value="outQuintic">outQuintic</option>
  123. <option value="outCubic">outCubic</option>
  124. </select>
  125. </div>
  126. <div class="inlineLeft marginRight">
  127. <label class="inlineLabel">Numerals: &nbsp;</label>
  128. <select id="numeralsDropdown" class="updateCodeVis">
  129. <option value="" selected>Default ("1234")</option>
  130. <option value="ea">Eastern Arabic ("١٢٣٤")</option>
  131. <option value="fa">Farsi ("۱۲۳۴")</option>
  132. </select>
  133. </div>
  134. <div class="inlineLeft">
  135. <input type="button" id="apply" value="Apply">
  136. </div>
  137. </form>
  138. </section>
  139. <section class="marginBottom">
  140. <div class="col full marginBottom marginTop">
  141. <div class="code-contain indigo">
  142. <code id="codeVisualizer" class="indigo"></code>
  143. </div>
  144. </div>
  145. </section>
  146. </div>
  147. </body>
  148. </html>