Rules.cshtml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @{
  2. ViewData["Title"] = "Rules";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using LotteryWebApp.Languages;
  6. @using LotteryWebApp.Controllers;
  7. @using LotteryWebApp.Common;
  8. @model HomeRules_ViewModel
  9. <div class="app-content content" style="position:relative">
  10. <div class="card-title text-center ">
  11. <div class="news-button-header-container" style="text-align: start; margin: 0 10px;">
  12. @await Component.InvokeAsync("SmallHeader", new { title = Lang.rules.ToUpper() })
  13. </div>
  14. </div>
  15. <div class="content-wrapper buy-ticket-container">
  16. <div class="content-body">
  17. <section class="loto-container">
  18. <div class="py-2 px-2">
  19. <span class="loto-game">@Lang.Singapore4DResult</span>
  20. </div>
  21. <button class="collapsible">4D</button>
  22. <div class="collapsible-content">
  23. @Html.Raw(Question.h1)
  24. </div>
  25. <button class="collapsible">3D</button>
  26. <div class="collapsible-content">
  27. @Html.Raw(Question.h2)
  28. </div>
  29. <button class="collapsible">2D</button>
  30. <div class="collapsible-content">
  31. @Html.Raw(Question.h3)
  32. </div>
  33. </section>
  34. </div>
  35. </div>
  36. </div>
  37. <script>
  38. var coll = document.getElementsByClassName("collapsible");
  39. var i;
  40. for (i = 0; i < coll.length; i++) {
  41. coll[i].addEventListener("click", function() {
  42. this.classList.toggle("collapsible-active");
  43. var content = this.nextElementSibling;
  44. if (content.style.maxHeight){
  45. content.style.maxHeight = null;
  46. } else {
  47. content.style.maxHeight = content.scrollHeight + "px";
  48. }
  49. });
  50. }
  51. </script>
  52. <script>
  53. stopLoading();
  54. </script>