AdvertiseArea.cshtml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. @*
  2. For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
  3. *@
  4. @using LotteryWebApp.Languages;
  5. @using LotteryWebApp.Components;
  6. @model AdvertiseAreaModel
  7. <link rel="stylesheet" type="text/css" href="@ViewBag.MyConfig.MyValue/css/flip-style.css">
  8. <style>
  9. .flip-card {
  10. display: inline-block;
  11. background-color: transparent;
  12. width: 300px;
  13. height: 300px;
  14. perspective: 1000px;
  15. }
  16. .flip-card-inner {
  17. position: relative;
  18. width: 100%;
  19. height: 100%;
  20. text-align: center;
  21. transition: transform 0.6s;
  22. transform-style: preserve-3d;
  23. /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);*/
  24. }
  25. .flip-card-front,
  26. .flip-card-back {
  27. position: absolute;
  28. width: 100%;
  29. height: 100%;
  30. backface-visibility: hidden;
  31. }
  32. .flip-card-front {
  33. /*background-color: #bbb;*/
  34. color: black;
  35. z-index: 2;
  36. }
  37. .flip-card-back {
  38. /*background-color: #2980b9;*/
  39. color: white;
  40. transform: rotateX(180deg);
  41. z-index: 1;
  42. }
  43. .flip-card .flip-card-inner {
  44. animation: rotate 3s .3s infinite;
  45. }
  46. .flip-card:nth-child(2) .flip-card-inner {
  47. animation-delay: .6s;
  48. }
  49. /* .flip-card:nth-child(3) .flip-card-inner {
  50. animation-delay: .9s;
  51. }
  52. .flip-card:nth-child(4) .flip-card-inner {
  53. animation-delay: 1.2s;
  54. }*/
  55. @@keyframes rotate {
  56. 0%, 60% {
  57. transform: rotateX(0);
  58. }
  59. 10%, 50% {
  60. transform: rotateX(180deg);
  61. }
  62. }
  63. </style>
  64. <div class="home-ad1-container">
  65. <div class="flip-box icon-one">
  66. <div class="home-ad1-info" style=" width: 75%;">
  67. <h5>
  68. @Lang.have_chance_to_get
  69. </h5>
  70. <h4>
  71. > 1.000.000 @Lang.curency
  72. </h4>
  73. </div>
  74. </div>
  75. <div class="flip-box icon-two" style=" width: 80%;">
  76. <div class="home-ad1-info">
  77. <div class="row" style="margin: 0 1px;">
  78. <div class="time-container" style="width: 60px; font-size: 15px; margin-top: 3px">
  79. @Lang.next_draw
  80. </div>
  81. <div class="time-container">
  82. <div class="time-box">
  83. <h6>@Lang.days</h6>
  84. <h3 id="days-display">1</h3>
  85. </div>
  86. </div>
  87. <div class="time-container">
  88. <div class="time-box">
  89. <h6>@Lang.hours</h6>
  90. <h3 id="hours-display">1</h3>
  91. </div>
  92. </div>
  93. <div class="time-container">
  94. <div class="time-box">
  95. <h6>@Lang.mins</h6>
  96. <h3 id="minutes-display">1</h3>
  97. </div>
  98. </div>
  99. <div class="time-container">
  100. <div class="time-box">
  101. <h6>@Lang.seconds</h6>
  102. <h3 id="seconds-display">1</h3>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="home-ad1-button">
  109. <button type="button" class="btn btn-outline-primary adv-button btn-block login-button-action buy-ticket-button"
  110. onclick="navigatorClick('BuyTicket')" style="font-size: 12px;">
  111. <i class="ft-unlock"></i> @Lang.buy_ticket.ToUpper()
  112. </button>
  113. </div>
  114. </div>
  115. @* <form class="form-horizontal" action="@ViewBag.MyConfig.MyValue/Home/BuyTicket" method="post">
  116. @Html.AntiForgeryToken()
  117. </form> *@
  118. <script>
  119. var a = document.querySelectorAll('.flip-box');
  120. a = Array.prototype.slice.call(a);
  121. var timings = {
  122. //easing: 'ease-in-out',
  123. iterations: Infinity,
  124. direction: 'alternate',
  125. fill: 'both'
  126. }
  127. a.forEach(function(el, i, ra) {
  128. timings.delay = i * 5000;
  129. timings.duration = 5000;
  130. el.animate([
  131. {transform: 'rotateX(180deg)', opacity: 0,},
  132. {transform:'rotateX(-0deg)', opacity: 1,}
  133. ], timings);
  134. //timings.duration = 5000;
  135. //el.animate([
  136. // {opacity: 1},
  137. // {opacity: 0}
  138. //], timings);
  139. timings.duration = 2000;
  140. });
  141. </script>
  142. <script type="text/javascript">
  143. if (@Model.timeLeft <= 0) {
  144. //var seconds = @Model.timeLeft,
  145. // $seconds = document.querySelector('#countdown');
  146. //(function countdown() {
  147. // $seconds.textContent = seconds + ' s';
  148. // if (seconds-- > 0) setTimeout(countdown, 1000);
  149. // else {
  150. // }
  151. //})();
  152. } else {
  153. var countDownDate = new Date('@Model.timeExpired').getTime();
  154. var now = new Date('@Model.timeNow').getTime();
  155. var now2 = new Date('Jan 5, 2021 15:37:25').getTime();
  156. console.log("countDownDate: ", countDownDate);
  157. console.log("now: ", now);
  158. console.log("now2: ", now2);
  159. // Update the count down every 1 second
  160. var x = setInterval(function () {
  161. // Get today's date and time
  162. //var now1 = new Date().getTime();
  163. //console.log("now1: ", now1);
  164. //console.log("now2: ", now);
  165. // Find the distance between now and the count down date
  166. var distance = countDownDate - now;
  167. // Time calculations for days, hours, minutes and seconds
  168. var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  169. var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  170. var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  171. var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  172. // Display the result in the element with id="demo"
  173. document.getElementById("days-display").innerHTML = days
  174. document.getElementById("hours-display").innerHTML = hours
  175. document.getElementById("minutes-display").innerHTML = minutes
  176. document.getElementById("seconds-display").innerHTML = seconds
  177. // If the count down is finished, write some text
  178. if (distance < 0) {
  179. clearInterval(x);
  180. //document.getElementById("demo").innerHTML = "EXPIRED";
  181. }
  182. now += 1000;
  183. }, 1000);
  184. //setTimeout("countdown()", 1000);
  185. }
  186. </script>