MenuContent.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. 
  2. @{
  3. ViewBag.Title = "MenuFormula";
  4. Layout = "~/Views/Shared/_LayoutHome.cshtml";
  5. }
  6. @using NEducation.NEduService;
  7. @using NEducation.Content.Texts;
  8. @using NEducation.Code;
  9. @using NEducation.Controllers;
  10. @using System.Globalization;
  11. @using System.Linq;
  12. @using System.Threading;
  13. @model NEducation.Models.HfModel
  14. <link href="~/Content/assets/css/animate.css" rel="stylesheet" type="text/css" />
  15. <link href="~/Content/assets/css/kontext.css" rel="stylesheet" type="text/css" />
  16. <link href="~/Content/assets/css/learning-flashcard.css" rel="stylesheet" type="text/css" />
  17. <link href="~/Content/assets/css/learning-diary.css" rel="stylesheet" type="text/css" />
  18. <link href="~/Content/assets/css/learning-complete.css" rel="stylesheet" type="text/css" />
  19. <link type="text/css" rel="stylesheet" href="~/Content/assets/css/animate.css" />
  20. <link href="~/Content/assets/css/kontext.css" rel="stylesheet" type="text/css" />
  21. <link href="~/Content/assets/css/testing.css" rel="stylesheet" type="text/css" />
  22. <link href="~/Content/assets/homefitness/css/hf-main.css" rel="stylesheet" type="text/css" />
  23. @*<link href="~/Content/assets/homefitness/css/hf-counter.css" rel="stylesheet" type="text/css" />*@
  24. @{
  25. List<HfData> hfDatas = Session["categories"] as List<HfData>;
  26. HfData menu = hfDatas.Find(x => x.PathParent == "/menu");
  27. HfData gym = hfDatas.Find(x => x.PathParent == "/gym");
  28. HfData nutrition = hfDatas.Find(x => x.PathParent == "/nutrition");
  29. }
  30. @{
  31. CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
  32. String nameCulture = currentCulture.Name;
  33. }
  34. @section navMenu{
  35. <a href="/Home/" class="nav-link">@Lang.Home</a>
  36. <a href="/HomeFitness/Menu?id=@(menu != null ? menu.Id : "")" class="navigation-all nav-link">@Lang.menu</a>
  37. <a href="/HomeFitness/Menu?id=@(nutrition != null ? nutrition.Id : "")" class="navigation-all nav-link">@Lang.nutrition</a>
  38. <a href="/HomeFitness/Menu?id=@(gym != null ? gym.Id : "")" class="navigation-all nav-link">@Lang.gym</a>
  39. }
  40. @section menu{
  41. <a href="/Home/" class="header-menu-link ">@Lang.Home</a>
  42. <a href="/HomeFitness/Menu?id=@(menu != null ? menu.Id : "")" class="navigation-all header-menu-link">@Lang.menu</a>
  43. <a href="/HomeFitness/Menu?id=@(nutrition != null ? nutrition.Id : "")" class="navigation-all header-menu-link ">@Lang.nutrition</a>
  44. <a href="/HomeFitness/Menu?id=@(gym != null ? gym.Id : "")" class="navigation-all header-menu-link ">@Lang.gym</a>
  45. }
  46. <audio id="learning-main-audio">
  47. <source class="src" src="" type="audio/mpeg">
  48. </audio>
  49. <div class="learning-theory-body">
  50. <!-- Flashcard -->
  51. <div class="learning-theory-flashcard">
  52. <div id="learning-theory-kontext"
  53. class="kontext
  54. @(Model.content.ContentType == UtilsController.GetContentType.TEXT_TYPE ? "height-number" : "")
  55. " style="height: 100%;">
  56. @{
  57. if (Model.content.ContentType == UtilsController.GetContentType.PICTURE_FILE)
  58. {
  59. <div class="testing-container hf-testing-container">
  60. <div class="testing-container-cover">
  61. <div class="testing-body hf-testing-body">
  62. <div class="testing-body-cover hf-testing-body-cover">
  63. <div class="testing-countdown hf-testing-countdown" id="testing-countdown">
  64. <span class="testing-countdown-number">120</span>
  65. <svg>
  66. <circle class="circle-shadow" r="16" cx="17" cy="17"></circle>
  67. <circle class="circle" r="16" cx="17" cy="17" stroke="url(#gradientPercent)" style="stroke-dashoffset: -101px;"></circle>
  68. <linearGradient id="gradientPercent" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="0" y2="34">
  69. <stop offset="0" style="stop-color:#F88600"></stop>
  70. <stop offset="0.5" style="stop-color:#FFB500"></stop>
  71. <stop offset="1" style="stop-color:#FAD300"></stop>
  72. </linearGradient>
  73. </svg>
  74. </div><!--pronounce - sound => word -->
  75. </div>
  76. </div>
  77. <style>
  78. @@media (max-width: 768px) {
  79. .testing-exercise-answer .answer-cover {
  80. width: 100%;
  81. }
  82. }
  83. </style>
  84. </div>
  85. </div>
  86. }
  87. }
  88. <div class=" show exercise-current" style=" height: 100%;">
  89. <div class="flash-card-viewport" style=" height: 100%;">
  90. <div class="flash-card-box" style=" height: 100%;">
  91. <figure class="slide jbs-current
  92. @(Model.content.ContentType == UtilsController.GetContentType.PICTURE_FILE ? "flash-center" : "")
  93. " style="height: 100%;">
  94. <div class="learning-theory-flash-card-content">
  95. @{
  96. if (Model.content.ContentType == UtilsController.GetContentType.TEXT_TYPE)
  97. {
  98. <div class="card-img">
  99. <img src="~/Content/assets/homefitness/imgs/Home Fitness_image/@Model.content.Logo" alt="@Model.content.NameGlobal" />
  100. </div>
  101. }
  102. }
  103. <div class="card-content
  104. @(Model.content.ContentType == UtilsController.GetContentType.PICTURE_FILE ? "flash-center-100-width" : "")
  105. ">
  106. <p class="card-content-text-large" style=" margin: 20px 0;">
  107. @{
  108. if (nameCulture == "vi")
  109. {
  110. @Model.content.NameGlobal
  111. }
  112. else
  113. {
  114. @Model.content.NameLocal
  115. }
  116. }
  117. </p>
  118. @{
  119. if (Model.content.ContentType == UtilsController.GetContentType.TEXT_TYPE)
  120. {
  121. if (nameCulture == "vi")
  122. {
  123. @Html.Raw(@Model.content.ContentGlobal)
  124. }
  125. else
  126. {
  127. @Html.Raw(@Model.content.ContentLocal)
  128. }
  129. }
  130. else
  131. {
  132. <img src="~/Content/assets/homefitness/imgs/Home Fitness_image/@Model.content.ContentGlobal" alt="@if (nameCulture == "vi")
  133. {
  134. @Model.content.NameGlobal
  135. }
  136. else
  137. {
  138. @Model.content.NameLocal
  139. }" />
  140. }
  141. }
  142. </div>
  143. @{
  144. if (Model.content.ContentType == UtilsController.GetContentType.PICTURE_FILE)
  145. {
  146. <div class="product-detail-infor">
  147. <div class="product-detail-body" style=" text-align: initial;">
  148. <div class="product-tab-group">
  149. <a data-toggle="tab" class="product-tab-lesson product-tab-active" href="#tab-lesson">
  150. @if (nameCulture == "vi")
  151. {
  152. @Html.Raw(@Model.content.NameGlobal)
  153. }
  154. else
  155. {
  156. @Html.Raw(@Model.content.NameLocal)
  157. }
  158. </a>
  159. </div>
  160. </div>
  161. </div>
  162. }
  163. }
  164. </div>
  165. </figure>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <script type="text/javascript" src="~/Content/assets/js/voca/box-slider.jquery.js"></script>
  173. <script type="text/javascript" src="~/Content/assets/js/voca/box-slider-fx-scroll-3d.js"></script>
  174. <script type="text/javascript" src="~/Content/assets/js/voca/kontext.js"></script>
  175. <script type="text/javascript" src="~/Content/assets/js/voca/learning-main.js"></script>
  176. <script type="text/javascript" src="~/Content/assets/js/voca/testing.js"></script>
  177. <script>
  178. var t;
  179. var totalTime = 20;
  180. var second = totalTime;
  181. var readyRunCountdown = 1;
  182. var readyAnswer = 1;
  183. runCountdown2();
  184. function runCountdown2() {
  185. console.log("update process " + readyRunCountdown);
  186. if (readyRunCountdown == 1 && readyAnswer == 1) {
  187. readyRunCountdown = 0;
  188. second = totalTime;
  189. var runCircle = 0;
  190. t = window.setInterval(function () {
  191. if (window.blurred) {
  192. } else {
  193. second = --second <= 0 ? 0 : second;
  194. if (runCircle == 0) {
  195. runCircle = 1;
  196. $(".testing-countdown svg circle.circle").animate({
  197. "stroke-dashoffset": "-101px",
  198. }, (second) * 1000, "linear", function () {
  199. });
  200. }
  201. $(".testing-countdown-number").text(second);
  202. if (second == 0) {
  203. window.clearInterval(t);
  204. endTime();
  205. return false;
  206. }
  207. if (second <= 5) {
  208. // $(".testing-theory-time-countdown").addClass("end-time");
  209. playWarningTimeSound();
  210. } else {
  211. playNormalTimeSound();
  212. }
  213. }
  214. }, 1000);
  215. }
  216. }
  217. updateProcess();
  218. </script>