Facebook
From Emerald Baboon, 2 Years ago, written in HTML5.
This paste is a reply to LPB Print Voucher Template from KELVIN NAKPIL - view diff
Embed
Download Paste or View Raw
Hits: 1272
  1. <!DOCTYPE html>
  2.  
  3. <!-- V.code = Voucher Code| V.Minutes = Minutes | V.Amount = Price  |  id="qrcode-{{ v.recno }}" = QR CODE Remove if you want-->
  4.          
  5. <script type="text/javascript" src="../assets/driver/jquery.min.js"></script>
  6. <script type="text/javascript" src="../assets/driver/driver.js"></script>
  7. .print {
  8. width: 180px;
  9. height: 85px;
  10. border: 1px solid black;
  11. text-align: center;
  12. display: inline-table;
  13. font-size : 8px;
  14. margin : 5px;
  15. }
  16. .qrcode {
  17. /*margin: auto;*/
  18. width: 42px;
  19. padding: 2px;
  20. float: left;
  21. }
  22. img {
  23.  
  24. }
  25.  
  26. .top-block {
  27.   border-bottom: 1px solid black;
  28.   color : #00B0F0;
  29.   font-weight: bold;
  30. }
  31. .code-block {
  32.   border-bottom: 1px solid black;
  33.   line-height: 1.1 !important;
  34. }
  35. .left-block{
  36.   width: 160px;
  37.   height : inherit;
  38.   float: left;
  39. }
  40. .info-block {
  41.   height : inherit;
  42.   margin-left: -35px;
  43.   width : 195px;
  44.   line-height: 0.8 !important;
  45.   text-align: left;
  46. }
  47.  
  48. .right-block{
  49.   height : inherit;
  50.   margin-left: 160px;
  51.   border-left: 1px solid black;
  52.   padding-bottom: 3px;
  53. }
  54.  
  55.  
  56. .right-block > span{
  57.   color : white;
  58.   font-size : 10px;
  59.   writing-mode: vertical-rl;
  60.   text-orientation: sideways-right;
  61.   margin-top: 5px;
  62. }
  63.  
  64. .rotate {
  65.   transform: rotate(-180deg);
  66.   -webkit-transform: rotate(-180deg);
  67.   -moz-transform: rotate(-180deg);
  68.   -ms-transform: rotate(-180deg);
  69.   -o-transform: rotate(-180deg);
  70. }
  71.  
  72. .code-style {
  73.   font-family: Consolas, monaco, monospace;
  74.   font-size: 20px;
  75.   font-style: bold;
  76.   font-variant: normal;
  77.   font-weight: 700;
  78.   letter-spacing : 3px;
  79. }
  80.  
  81. .ft-sm {
  82.   font-size : 7px;
  83. }
  84. .ft-xs {
  85.   font-size : 6px;
  86. }
  87. .ft-bold {
  88.   font-weight:bold;
  89. }
  90. .ft-italic {
  91.   font-weight:italic;
  92. }
  93. .ft-blue {
  94.    color : #00B0F0;
  95. }
  96. </head>
  97.  
  98. {% for v in vcodes if v.recno %}
  99.  
  100. <div class="print">
  101.    <div class="left-block">
  102.       <div class="top-block">
  103.          <span>ENTER CODE @ HTTP://10.0.0.1</span>
  104.       </div>
  105.       <div class="code-block">
  106.          <span class="code-style">{{ v.vcode }}</span> <br>    
  107.          <span id="vtime-{{ v.vcode }}" style="font-weight:bold;">{{ v.minutes }}</span><br>
  108.       </div>
  109.       <div>
  110.          <div class="qrcode">
  111.             <div id="qrcode-{{ v.recno }}"> </div>
  112.          </div>
  113.          <div class="info-block">
  114.             <span class="ft-bold ft-xs">CONNECT TO WIFI</span><br>
  115.             <span class="ft-blue ft-bold ft-sm">LBP PISO WIFI</span> <br>
  116.             <p style="margin: 3px 0px;">
  117.                <span class="ft-xs">Enter you voucher code then press submit.</span><br>
  118.                <span class="ft-xs">To ensure <span style="color: red;">FAST CONNECTION SPEED</span> is achieved at <span style="color: red;">FULL WIFI SIGNAL</span>.</span><br>
  119.                <span class="ft-xs ft-italic">GET your <span style="color: green;">FREE TIME</span> Everyday.</span><br>
  120.             </p>
  121.          </div>
  122.       </div>
  123.    </div>
  124.    <div class="right-block" style="background-color:{{ ((v.amount == 5)? "#00B0F0":((v.amount == 10)? "#00B0F0":((v.amount == 20)? "#4D269A":((v.amount == 50)? "#FF66CC":((v.amount == 100)? "#FF0000":((v.amount == 300)? "#000000":"#666666"))))))}};">
  125.          <span class="rotate" style="font-weight:bold;">Php {{ v.amount }}</span>
  126.    </div>
  127. </div>
  128.  
  129.  
  130.  
  131.  
  132.  
  133. <!-- Start QR Code
  134.  
  135.  
  136. End Qr Code -->
  137. {% endfor %}
  138.  
  139. <script type="text/javascript">
  140. {% for qr in vcodes if qr.recno %}
  141. new QRCode(document.getElementById("qrcode-{{ qr.recno }}"), { text: "{{ qr.vcode }}", width: 40, height: 40});
  142. {% endfor %}
  143. function ConvertMinutes(num){
  144.   d = Math.floor(num/1440); // 60*24
  145.   h = Math.floor((num-(d*1440))/60);
  146.   m = Math.round(num%60);
  147.  
  148.   if(d>0){
  149.     return(((d > 1)? d+" DAYS ":d+" DAY ")+((h > 0)? h+" HOURS ":"")+((m > 0)? m+" MINUTES":""));
  150.   }else{
  151.     return(((h > 1)? h+" HOURS ":h+" HOUR ")+((m > 0)? m+" MINUTES":""));
  152.   }
  153. }
  154. {% for v in vcodes if v.recno %}
  155. var tspan = document.getElementById("vtime-{{ v.vcode }}").innerHTML;
  156. var dval = parseInt(tspan);
  157. document.getElementById("vtime-{{ v.vcode }}").innerHTML = ConvertMinutes(dval);
  158. {% endfor %}
  159.  
  160. </body>
  161. </html>

Replies to Re: LPB Print Voucher Template rss

Title Name Language When
Re: Re: LPB Print Voucher Template Almirah html5 1 Month ago.
Re: Re: LPB Print Voucher Template Ameera Henza html5 1 Month ago.
COMMUNITY STARLINK NIYAT STARLINK html5 4 Months ago.
Re: Re: LPB Print Voucher Template Kaizee html5 8 Months ago.
Re: Re: LPB Print Voucher Template Insensitive Tern html5 1 Year ago.
Re: Re: LPB Print Voucher Template Queen Bison html5 1 Year ago.
Re: Re: LPB Print Voucher Template Putrid Tamarin html5 1 Year ago.