AdvertiseArea.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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. .cover {
  10. width: 400px;
  11. height: 400px;
  12. animation: flip-animate 20s linear infinite; /* Làm xoay các ảnh */
  13. transform-style: preserve-3d; /* các thành phần bên trong class cover sẽ hiển thị dưới dạng 3D */
  14. }
  15. #container .cover div {
  16. width: 400px;
  17. height: 400px;
  18. position: absolute;
  19. }
  20. #container .cover div img {
  21. width: 400px;
  22. height: 400px;
  23. }
  24. #container .cover .front {
  25. transform: translateZ(200px); /* định vị lại ảnh trong class front dọc theo trục z trong không gian 3D */
  26. }
  27. #container .cover .back {
  28. transform: rotateY(180deg) translateZ(200px);
  29. /* xoay ảnh theo trục y là 180 độ và dịch chuyển đến trục Z */
  30. }
  31. #container .cover .left {
  32. transform: rotateY(-90deg) translateX(-200px);
  33. /* xoay ảnh theo trục y là -90 độ và dịch chuyển đến trục X */
  34. transform-origin: left; /* Cho phép dịch chuyển phần tử sang trái */
  35. }
  36. #container .cover .right {
  37. transform: rotateY(90deg) translateX(200px); /* xoay ảnh theo trục Y là 90 độ và dịch chuyển đến trục X */
  38. transform-origin: right; /* Cho phép dịch chuyển phần tử sang phải */
  39. }
  40. #container .cover .top {
  41. transform: rotateX(-90deg) translateY(-200px); /* xoay ảnh theo trục X là -90 độ và dịch chuyển đến trục Y */
  42. transform-origin: top; /* Cho phép dịch chuyển phần tử lên trên */
  43. }
  44. #container .cover .bottom {
  45. transform: rotateX(90deg) translateY(200px); /* xoay ảnh theo trục X là 90 độ và dịch chuyển đến trục Y */
  46. transform-origin: bottom; /* Cho phép dịch chuyển phần tử xuống dưới */
  47. }
  48. @@keyframes flip-animate {
  49. 0% {
  50. transform: rotateY(0);
  51. }
  52. 100% {
  53. transform: rotateY(360deg);
  54. }
  55. }
  56. /* điều khiển các hiệu ứng của thuộc tính animation */
  57. </style>*@
  58. <style>
  59. .flip-card {
  60. display: inline-block;
  61. background-color: transparent;
  62. width: 300px;
  63. height: 300px;
  64. perspective: 1000px;
  65. }
  66. .flip-card-inner {
  67. position: relative;
  68. width: 100%;
  69. height: 100%;
  70. text-align: center;
  71. transition: transform 0.6s;
  72. transform-style: preserve-3d;
  73. /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);*/
  74. }
  75. .flip-card-front,
  76. .flip-card-back {
  77. position: absolute;
  78. width: 100%;
  79. height: 100%;
  80. backface-visibility: hidden;
  81. }
  82. .flip-card-front {
  83. /*background-color: #bbb;*/
  84. color: black;
  85. z-index: 2;
  86. }
  87. .flip-card-back {
  88. /*background-color: #2980b9;*/
  89. color: white;
  90. transform: rotateX(180deg);
  91. z-index: 1;
  92. }
  93. .flip-card .flip-card-inner {
  94. animation: rotate 3s .3s infinite;
  95. }
  96. .flip-card:nth-child(2) .flip-card-inner {
  97. animation-delay: .6s;
  98. }
  99. /* .flip-card:nth-child(3) .flip-card-inner {
  100. animation-delay: .9s;
  101. }
  102. .flip-card:nth-child(4) .flip-card-inner {
  103. animation-delay: 1.2s;
  104. }*/
  105. @@keyframes rotate {
  106. 0%, 60% {
  107. transform: rotateX(0);
  108. }
  109. 10%, 50% {
  110. transform: rotateX(180deg);
  111. }
  112. }
  113. </style>
  114. <div class="home-ad1-container" style="background: linear-gradient(182.09deg, #921010 45.77%, rgba(188, 70, 70, 0.704875) 127.71%, rgba(213, 19, 19, 0.541667) 166.12%, rgba(255, 0, 0, 0) 185.46%);">
  115. <div class="flip-box icon-one">
  116. <div class="home-ad1-info" style=" width: 75%;">
  117. <h5>
  118. @Lang.have_chance_to_get
  119. </h5>
  120. <h4>
  121. > 1.000.000 HTG
  122. </h4>
  123. </div>
  124. </div>
  125. <div class="flip-box icon-two" style=" width: 80%;">
  126. <div class="home-ad1-info">
  127. <div class="row" style="margin: 0 1px;">
  128. <div class="time-container" style="width: 60px; font-size: 15px; margin-top: 3px">
  129. @Lang.next_draw
  130. </div>
  131. <div class="time-container">
  132. <div class="time-box">
  133. <h6>@Lang.days</h6>
  134. <h3 id="days-display">1</h3>
  135. </div>
  136. </div>
  137. <div class="time-container">
  138. <div class="time-box">
  139. <h6>@Lang.hours</h6>
  140. <h3 id="hours-display">1</h3>
  141. </div>
  142. </div>
  143. <div class="time-container">
  144. <div class="time-box">
  145. <h6>@Lang.mins</h6>
  146. <h3 id="minutes-display">1</h3>
  147. </div>
  148. </div>
  149. <div class="time-container">
  150. <div class="time-box">
  151. <h6>@Lang.seconds</h6>
  152. <h3 id="seconds-display">1</h3>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. @*
  159. <div id="container">
  160. <div class="cover">
  161. <div class="front">
  162. <img src="https://zicxa.com/hinh-anh/wp-content/uploads/2019/09/T%E1%BB%95ng-h%E1%BB%A3p-h%C3%ACnh-%E1%BA%A3nh-nh%E1%BB%AFng-ng%C6%B0%E1%BB%9Di-c%C3%B3-r%C4%83ng-kh%E1%BB%83nh-d%E1%BB%85-th%C6%B0%C6%A1ng-nh%E1%BA%A5t-19.jpg">
  163. </div>
  164. <div class="back">
  165. <img src="https://thuthuatnhanh.com/wp-content/uploads/2019/12/anh-girl-rang-khenh.jpg">
  166. </div>
  167. <div class="top">
  168. <img src="https://giupban.com.vn/wp-content/uploads/2019/09/anh-hot-girl-lanh-lung-12.jpg">
  169. </div>
  170. <div class="bottom">
  171. <img src="https://nhakhoachoban.vn/wp-content/uploads/2019/09/bi-mat-cua-chiec-rang-khenh-3-1.jpg">
  172. </div>
  173. <div class="left">
  174. <img src="https://image.thanhnien.vn/660/uploaded/phunggiao/2018_12_03/misthy-2_layc.jpg">
  175. </div>
  176. <div class="right">
  177. <img src="https://znews-photo.zadn.vn/w660/Uploaded/mdf_uswreo/2019_01_30/13.jpg">
  178. </div>
  179. </div>
  180. </div>*@
  181. @* <div class="cards" style="display:inline-block; width:70%;">
  182. <div class="flip-card">
  183. <div class="flip-card-inner">
  184. <div class="flip-card-front">
  185. <div class="" style=" width: 80%;">
  186. <div class="home-ad1-info">
  187. <div class="row" style="margin: 0 1px;">
  188. <div class="col-3 time-container">
  189. <div class="time-box">
  190. <h6>Days</h6>
  191. <h4 id="days-display">1</h4>
  192. </div>
  193. </div>
  194. <div class="col-3 time-container">
  195. <div class="time-box">
  196. <h6>Hours</h6>
  197. <h4 id="hours-display">1</h4>
  198. </div>
  199. </div>
  200. <div class="col-3 time-container">
  201. <div class="time-box">
  202. <h6>Mins</h6>
  203. <h4 id="minutes-display">1</h4>
  204. </div>
  205. </div>
  206. <div class="col-3 time-container">
  207. <div class="time-box">
  208. <h6>Secs</h6>
  209. <h4 id="seconds-display">1</h4>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <div class="flip-card-back">
  217. <div class="">
  218. <div class="home-ad1-info" style=" width: 80%;">
  219. <h5>
  220. @Lang.have_chance_to_get
  221. </h5>
  222. <h4>
  223. > 1.000.000 HTG
  224. </h4>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>*@
  231. <div class="home-ad1-button">
  232. <button type="button" class="btn btn-outline-primary adv-button btn-block login-button-action buy-ticket-button"
  233. onclick="navigatorClick('BuyTicket')" style="font-size: 12px;">
  234. <i class="ft-unlock"></i> @Lang.buy_ticket.ToUpper()
  235. </button>
  236. </div>
  237. </div>
  238. <form class="form-horizontal" action="@ViewBag.MyConfig.MyValue/Home/BuyTicket" method="post">
  239. @Html.AntiForgeryToken()
  240. </form>
  241. <script>
  242. var a = document.querySelectorAll('.flip-box');
  243. a = Array.prototype.slice.call(a);
  244. var timings = {
  245. //easing: 'ease-in-out',
  246. iterations: Infinity,
  247. direction: 'alternate',
  248. fill: 'both'
  249. }
  250. a.forEach(function(el, i, ra) {
  251. timings.delay = i * 5000;
  252. timings.duration = 5000;
  253. el.animate([
  254. {transform: 'rotateX(180deg)', opacity: 0,},
  255. {transform:'rotateX(-0deg)', opacity: 1,}
  256. ], timings);
  257. //timings.duration = 5000;
  258. //el.animate([
  259. // {opacity: 1},
  260. // {opacity: 0}
  261. //], timings);
  262. timings.duration = 2000;
  263. });
  264. </script>
  265. <script type="text/javascript">
  266. if ( @Model.timeLeft <= 0) {
  267. //var seconds = @Model.timeLeft,
  268. // $seconds = document.querySelector('#countdown');
  269. //(function countdown() {
  270. // $seconds.textContent = seconds + ' s';
  271. // if (seconds-- > 0) setTimeout(countdown, 1000);
  272. // else {
  273. // }
  274. //})();
  275. } else {
  276. var countDownDate = new Date('@Model.timeExpired').getTime();
  277. var now = new Date('@Model.timeNow').getTime();
  278. var now2 = new Date('Jan 5, 2021 15:37:25').getTime();
  279. console.log("countDownDate: ", countDownDate);
  280. console.log("now: ", now);
  281. console.log("now2: ", now2);
  282. // Update the count down every 1 second
  283. var x = setInterval(function () {
  284. // Get today's date and time
  285. //var now1 = new Date().getTime();
  286. //console.log("now1: ", now1);
  287. //console.log("now2: ", now);
  288. // Find the distance between now and the count down date
  289. var distance = countDownDate - now;
  290. // Time calculations for days, hours, minutes and seconds
  291. var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  292. var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  293. var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  294. var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  295. // Display the result in the element with id="demo"
  296. document.getElementById("days-display").innerHTML = days
  297. document.getElementById("hours-display").innerHTML = hours
  298. document.getElementById("minutes-display").innerHTML = minutes
  299. document.getElementById("seconds-display").innerHTML = seconds
  300. // If the count down is finished, write some text
  301. if (distance < 0) {
  302. clearInterval(x);
  303. //document.getElementById("demo").innerHTML = "EXPIRED";
  304. }
  305. now += 1000;
  306. }, 1000);
  307. setTimeout("countdown()", 1000);
  308. }
  309. </script>