templates/frontend/default/rule.html.twig line 1

Open in your IDE?
  1. {% extends 'frontend/default/base.html.twig' %}
  2. {% block css %}
  3. <!-- custom css here -->
  4. <style>
  5. .bgbox{
  6. height: 100%;
  7. }
  8. .gamerule {
  9. width: 40%;
  10. }
  11. .btn-group-middle {
  12. position: absolute;
  13. transform: translate(-50%, 0%);
  14. width: 13%;
  15. }
  16. .rule-container {
  17. width: 90%;
  18. overflow-y: scroll;
  19. margin: 0 auto;
  20. height: 86%;
  21. font-size: 11px;
  22. text-align: left;
  23. -webkit-overflow-scrolling: touch;
  24. -webkit-overflow-scrolling: auto;
  25. height: 76%;
  26. margin-top: 2vw;
  27. padding-left: 15px;
  28. padding-right: 15px;
  29. -ms-overflow-style: none;
  30. scrollbar-width: none;
  31. word-break: break-all;
  32. }
  33. .rule-container::-webkit-scrollbar {
  34. display: none;
  35. }
  36. .frame-bg {
  37. position: relative;
  38. height: 68%;
  39. background-repeat: no-repeat;
  40. background-position: 50% 50%;
  41. background-size: 100% 100%;
  42. max-width: 600px;
  43. overflow-x: hidden;
  44. overflow-y: hidden;
  45. margin: 50% auto 0 auto;
  46. width: 90%;
  47. }
  48. .rule-container p, li {
  49. color: #FFFFFF;
  50. list-style-type: decimal;
  51. margin-bottom: 0.5rem;
  52. }
  53. .arrow-container {
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. width: 100%;
  58. padding-bottom: unset;
  59. position: absolute;
  60. bottom: 7vw;
  61. }
  62. .rule-container a:link, .rule-container a:visited {
  63. /*color: white;*/
  64. color: #FFFFFF;
  65. }
  66. .header p{
  67. color: white;
  68. font-size: 4vw;
  69. text-align: center;
  70. margin: 0;
  71. padding-bottom: 0;
  72. }
  73. @media only screen and (width: 540px) and (height: 720px) {
  74. }
  75. @media only screen and (width: 280px) and (height: 653px) {
  76. }
  77. @media only screen and (min-width: 600px) {
  78. .rule-container {
  79. font-size: 18px;
  80. }
  81. }
  82. </style>
  83. {% endblock %}
  84. {% block javascript %}
  85. <!-- custom javascript here -->
  86. {% endblock %}
  87. {% block body %}
  88. <script>
  89. function gtag_action_ruleread() {
  90. gtag('event', 'Rules Read', {
  91. 'event_category': '{{ custom_data }}',
  92. 'event_label': 'Rules'
  93. });
  94. }
  95. $(function () {
  96. let elem = $('#scroll-container');
  97. if (Math.ceil(elem.innerHeight()) <= elem.prop('scrollHeight')) {
  98. elem.bind('scroll', function () {
  99. if (Math.ceil((elem.scrollTop() + elem.innerHeight())) >= elem.prop('scrollHeight')) {
  100. $('.arrow-container').css({opacity: 0.0});
  101. }
  102. else {
  103. $('.arrow-container').css({opacity: 1});
  104. }
  105. });
  106. }
  107. else {
  108. $('.arrow-container').css({opacity: 0.0});
  109. }
  110. });
  111. let jwt = localStorage.getItem('{{ localStorage_name }}');
  112. $(document).ready(function () {
  113. $("#back").click(function() {
  114. let form = jQuery('<form action="{{ app.request.headers.get('referer') }}" method="post" style="display:none;">' +
  115. '</form>');
  116. jQuery('body').append(form);
  117. form.submit();
  118. });
  119. gtag_action_ruleread();
  120. });
  121. </script>
  122. <div class="container-fluid bgbox" id="bg"
  123. style="background-image:url('{{ asset('images/tnc_bg.png') }}');background-position:0px 0px;">
  124. <div id="back" style="top:10%;right:5%;left:auto">
  125. <img class="gamerule" src="{{ asset('frontend/'~language~'/share/back.png') }}" alt="back" />
  126. </div>
  127. <div class="frame-bg"
  128. style="background-image: url({{ asset('images/tnc_column.png') }});">
  129. <div class="header">
  130. <p class="title">{{ 'Rule.title' | trans }}</p>
  131. <p>{{ 'Rule.subtitle' | trans | raw }}</p>
  132. </div>
  133. <div class="rule-container animated fadeIn" id="scroll-container">
  134. {{ tandc | raw }}
  135. </div>
  136. <div class="arrow-container">
  137. <div class="chevron"></div>
  138. <div class="chevron"></div>
  139. <div class="chevron"></div>
  140. </div>
  141. </div>
  142. </div>
  143. {% endblock %}