index.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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?v=20191111">
  11. <!-- <script src="demo/demo.js" type="module"></script> -->
  12. <script src="dist/countUp.umd.js"></script>
  13. <script src="demo/demo-nomodule.js"></script>
  14. <script>
  15. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  16. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  17. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  18. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  19. ga('create', 'UA-7742845-9', 'inorganik.github.io');
  20. ga('send', 'pageview');
  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"></a></div>
  30. </header>
  31. <section>
  32. <h1>CountUp.js &nbsp;<small id="version" class="lt-gray"></small></h1>
  33. <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>
  34. <p>Install via npm/yarn using the package name &nbsp;<code class="indigo large">countup.js</code>.</p>
  35. <p>🆕&ensp; <a href="https://podmap.org">Check out Podmap</a> &mdash; Mapping the world&rsquo;s podcasts.</p>
  36. <h3 class="marginTop marginBottom"><a class="lime weight700" href="https://github.com/inorganik/CountUp.js">Download on Github</a></h3>
  37. </section>
  38. <section>
  39. <p style="position:absolute; top:5px; left:0;">Current stars:</p>
  40. <h1 class="jumbo" id="myTargetElement">0</h1>
  41. </section>
  42. <section id="errorSection" style="background-color:#FFDCDC; display:none" class="col-inner">
  43. <h4 id="error" style="color: red" class="noMargin"></h4>
  44. </section>
  45. <section>
  46. <form>
  47. <h4 class="inlineLeft noMargin weight300">Params:</h4>
  48. <div class="inlineLeft marginLeft marginRight">
  49. <input type="text" value="0" id="startVal" style="width:80px" class="updateCodeVis">
  50. <label class="inlineLabel">Start</label>
  51. </div>
  52. <input id="swapValues" type="button" class="inlineLeft marginRight" value="Swap" style="width:80px;">
  53. <div class="inlineLeft marginRight">
  54. <input type="text" value="94.62" id="endVal" style="width:80px" class="updateCodeVis">
  55. <label class="inlineLabel">End</label>
  56. </div>
  57. <div class="inlineLeft marginRight">
  58. <input type="number" value="0" id="decimalPlaces" step="1" style="width:50px" class="updateCodeVis">
  59. <label class="inlineLabel">Decimal places</label>
  60. </div>
  61. <div class="inlineLeft marginRight">
  62. <input type="number" value="2" id="duration" step=".1" style="width:50px" class="updateCodeVis">
  63. <label class="inlineLabel">Duration</label>
  64. </div>
  65. </form>
  66. </section>
  67. <section>
  68. <form>
  69. <h4 class="inlineLeft noMargin weight300">Options:</h4>
  70. <div class="inlineLeft marginLeft marginRight">
  71. <input id="useEasing" type="checkbox" checked><label class="inlineLabel updateCodeVis">Use easing</label>
  72. </div>
  73. <div class="inlineLeft marginRight">
  74. <input id="useGrouping" type="checkbox" checked><label class="inlineLabel updateVodeVis">Use grouping</label>
  75. </div>
  76. <div class="inlineLeft marginRight">
  77. <input type="text" value="," id="separator" style="width:25px; padding:0 5px;" class="updateCodeVis">
  78. <label class="inlineLabel">Separator</label>
  79. </div>
  80. <div class="inlineLeft marginRight">
  81. <input type="text" value="." id="decimal" style="width:25px; padding:0 5px;" class="updateCodeVis">
  82. <label class="inlineLabel">Decimal</label>
  83. </div>
  84. <div class="inlineLeft marginRight">
  85. <input type="text" value="" id="prefix" style="width:50px; padding:0 5px;" class="updateCodeVis">
  86. <label class="inlineLabel">Prefix</label>
  87. </div>
  88. <div class="inlineLeft marginRight">
  89. <input type="text" value="" id="suffix" style="width:50px; padding:0 5px;" class="updateCodeVis">
  90. <label class="inlineLabel">Suffix</label>
  91. </div>
  92. </form>
  93. </section>
  94. <section>
  95. <form>
  96. <h4 class="inlineLeft noMargin weight300">Methods:</h4>
  97. <input type="button" value="Start" id="start" class="inlineLeft marginLeft marginRight">
  98. <input type="button" value="Pause/Resume" id="pauseResume" class="inlineLeft marginRight">
  99. <input type="button" value="Reset" id="reset" class="inlineLeft marginRight">
  100. <input type="button" value="Update:" id="update" class="inlineLeft" style="margin-right:5px">
  101. <div class="inlineLeft marginRight">
  102. <input type="text" value="6789" id="updateVal" style="width:80px">
  103. </div>
  104. <div class="inlineLeft">
  105. <input type="checkbox" id="useOnComplete"><label class="inlineLabel">Alert on complete</label>
  106. </div>
  107. </form>
  108. </section>
  109. <section id="easingSection">
  110. <form>
  111. <h4 class="inlineLeft noMargin weight300">Custom:</h4>
  112. <div class="inlineLeft marginLeft">
  113. <label class="inlineLabel">Easing: &nbsp;</label>
  114. <select id="easingFnsDropdown" class="marginRight updateCodeVis">
  115. <option value="easeOutExpo" selected>easeOutExpo (default, built-in)</option>
  116. <option value="outQuintic">outQuintic</option>
  117. <option value="outCubic">outCubic</option>
  118. </select>
  119. </div>
  120. <div class="inlineLeft marginRight">
  121. <label class="inlineLabel">Numerals: &nbsp;</label>
  122. <select id="numeralsDropdown" class="updateCodeVis">
  123. <option value="" selected>Default ("1234")</option>
  124. <option value="ea">Eastern Arabic ("١٢٣٤")</option>
  125. <option value="fa">Farsi ("۱۲۳۴")</option>
  126. </select>
  127. </div>
  128. <div class="inlineLeft">
  129. <input type="button" id="apply" value="Apply">
  130. </div>
  131. </form>
  132. </section>
  133. <section class="marginBottom">
  134. <div class="col full marginBottom marginTop">
  135. <div class="code-contain indigo">
  136. <code id="codeVisualizer" class="indigo"></code>
  137. </div>
  138. </div>
  139. </section>
  140. </div>
  141. </body>
  142. </html>