index.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="chrome=1">
  6. <title>Skeuocard by kenkeiter</title>
  7. <link rel="stylesheet" href="styles/skeuocard.reset.css" />
  8. <link rel="stylesheet" href="styles/skeuocard.css" />
  9. <link rel="stylesheet" href="styles/demo.css">
  10. <script src="javascripts/vendor/cssua.min.js"></script>
  11. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  12. <!--[if lt IE 9]>
  13. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  14. <![endif]-->
  15. </head>
  16. <body>
  17. <div class="wrapper">
  18. <header>
  19. <h1>Skeuocard</h1>
  20. <p>Skeuocard progressively enhances credit card inputs to provide a skeuomorphic interface.</p>
  21. <p>Learn more about the concepts behind the design: "<a href="http://kenkeiter.com/2013/07/21/redesigning-credit-card-inputs/" target="_blank">Redesigning The Credit Card Input</a>" by <a href="http://kenkeiter.com/">Ken Keiter</a>.</p>
  22. <p class="view">
  23. <a href="https://github.com/kenkeiter/skeuocard">View the Project on GitHub <small>kenkeiter/skeuocard</small></a>
  24. </p>
  25. <ul>
  26. <li><a href="https://github.com/kenkeiter/skeuocard/zipball/master">Download <strong>ZIP File</strong></a></li>
  27. <li><a href="https://github.com/kenkeiter/skeuocard/tarball/master">Download <strong>TAR Ball</strong></a></li>
  28. <li><a href="https://github.com/kenkeiter/skeuocard">View On <strong>GitHub</strong></a></li>
  29. </ul>
  30. </header>
  31. <section>
  32. <!-- START FORM -->
  33. <div class="credit-card-input no-js" id="skeuocard">
  34. <p class="no-support-warning">
  35. Either you have Javascript disabled, or you're using an unsupported browser, amigo! That's why you're seeing this old-school credit card input form instead of a fancy new Skeuocard. On the other hand, at least you know it gracefully degrades...
  36. </p>
  37. <label for="cc_type">Card Type</label>
  38. <select name="cc_type">
  39. <option value="">...</option>
  40. <option value="visa">Visa</option>
  41. <option value="discover">Discover</option>
  42. <option value="mastercard">MasterCard</option>
  43. <option value="maestro">Maestro</option>
  44. <option value="jcb">JCB</option>
  45. <option value="unionpay">China UnionPay</option>
  46. <option value="amex">American Express</option>
  47. <option value="dinersclubintl">Diners Club</option>
  48. </select>
  49. <label for="cc_number">Card Number</label>
  50. <input type="text" name="cc_number" id="cc_number" placeholder="XXXX XXXX XXXX XXXX" maxlength="19" size="19">
  51. <label for="cc_exp_month">Expiration Month</label>
  52. <input type="text" name="cc_exp_month" id="cc_exp_month" placeholder="00">
  53. <label for="cc_exp_year">Expiration Year</label>
  54. <input type="text" name="cc_exp_year" id="cc_exp_year" placeholder="00">
  55. <label for="cc_name">Cardholder's Name</label>
  56. <input type="text" name="cc_name" id="cc_name" placeholder="John Doe">
  57. <label for="cc_cvc">Card Validation Code</label>
  58. <input type="text" name="cc_cvc" id="cc_cvc" placeholder="123" maxlength="3" size="3">
  59. </div>
  60. <!-- END FORM -->
  61. </section>
  62. <section>
  63. <h3>Give it a try.</h3>
  64. <p>If you have a recent browser, the credit card input above will be progressively enhanced by Skeuocard. To begin, simply enter your card number (don't worry, it's not sent outside your browser). If that's too fishy for you (and I don't blame you), you can also try these valid credit card numbers to get the feel of it:</p>
  65. <pre>
  66. Visa: 4111111111111111
  67. Discover: 6011111111111117
  68. MasterCard: 5111111111111118
  69. Maestro: 5018111111111112
  70. JCB: 3511111111111119
  71. Union Pay: 6211111111111111
  72. American Express: 371111111111114
  73. Diners Club: 38111111111119
  74. </pre>
  75. <p>The numbers above will work with any expiration date (as long as it's in the future), any name, and any CVC code (the three or four digit verification code), since those are all validated on the server side upon authorization.</p>
  76. <h3>How It Works</h3>
  77. <p>When you begin entering your card number, Skeuocard attempts to match it to an accepted card type. Once it is able to do so, it modifies the layout of the card to match the card product (Visa, MasterCard, etc) and makes any tweaks specific to the issuer -- for example, the special layout of the Chase Sapphire card.</p>
  78. <p>As you enter your information, Skeuocard modifies the underlying form values from your original, non-enhanced form. It also validates each field to find simple user mistakes and missing fields.</p>
  79. <p>If the card product has fields on both sides of the card (for example, placing the CVC code on the back) the user will be prompted to flip the card to fill in the remaining fields.</p>
  80. <h3>Get It!</h3>
  81. <p>Check out <a href="http://github.com/kenkeiter/skeuocard/">Skeuocard's GitHub repository</a> for documentation and source. Skeuocard is a work in progress, and I'll be doing my best to add new credit card layouts as quickly as people contribute them.</p>
  82. <p>Skeuocard is provided under the flexible MIT license.</p>
  83. </section>
  84. <footer>
  85. <p>This project is maintained by <a href="https://github.com/kenkeiter">kenkeiter</a></p>
  86. </footer>
  87. </div>
  88. <script src="javascripts/vendor/demo.fix.js"></script>
  89. <script src="javascripts/vendor/jquery-2.0.3.min.js"></script>
  90. <script src="javascripts/skeuocard.js"></script>
  91. <script>
  92. $(document).ready(function(){
  93. var isBrowserCompatible =
  94. $('html').hasClass('ua-ie-10') ||
  95. $('html').hasClass('ua-webkit') ||
  96. $('html').hasClass('ua-firefox') ||
  97. $('html').hasClass('ua-opera') ||
  98. $('html').hasClass('ua-chrome');
  99. if(isBrowserCompatible){
  100. window.card = new Skeuocard($("#skeuocard"), {
  101. debug: false
  102. });
  103. }
  104. });
  105. </script>
  106. </body>
  107. </html>