Index.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. @using NEducation.Code;
  2. @model NEducation.Models.IndividualModel
  3. @{
  4. ViewBag.Title = "Index";
  5. //Layout = "~/Views/Shared/_LayoutHome.cshtml";
  6. }
  7. @*<link type="text/css" rel="stylesheet" href="~/Content/assets/css/home/voca-application.css" />*@
  8. @*<link type="text/css" rel="stylesheet" href="~/Content/assets/css/home/voca-main.css" />*@
  9. <link type="text/css" rel="stylesheet" href="~/Content/assets/css/home/user-course.css" />
  10. @using NEducation.Content.Texts
  11. @section navMenu{
  12. <a href="/Home/" class="nav-link">@Lang.Home</a>
  13. <a href="/Voca/" class="nav-link">@Lang.Vocabulary</a>
  14. <a href="/Grammar/" class="nav-link">@Lang.Grammar</a>
  15. @*<a href="/Music/" class="nav-link">Music</a>*@
  16. <a href="/Listening/" class="nav-link">@Lang.Listening</a>
  17. @*<a href="/Ebook/" class="nav-link">
  18. @Lang.Ebook
  19. <img src="~/Content/assets/imgs/giphy.gif" style=" width: 50px;" />
  20. </a>*@
  21. <div class="dropdown nav-link">
  22. <button onclick="myFunction()" class="dropbtn">
  23. E-Library
  24. <img src="~/Content/assets/imgs/giphy.gif" style=" width: 50px;" />
  25. </button>
  26. <div id="myDropdown" class="dropdown-content">
  27. <a href="/Ebook/">@Lang.Ebook</a>
  28. <a href="/Ebook/Video">Children's Video</a>
  29. </div>
  30. </div>
  31. }
  32. @{
  33. var check = Model.history.listCourseHistory.Count == 0 ? false : true;
  34. var course = Session["individual_courseType"] as string;
  35. }
  36. <div class="main-wrapper">
  37. <div class="library-main-container">
  38. <!-- BODY -->
  39. <div class="library-body">
  40. <div class="body-cover">
  41. <div class="product-group">
  42. <div class="header-banner">
  43. <div id="ads-banner-zone-2"></div>
  44. </div>
  45. <h1>@Lang.Hi <strong>@Model.profileDetail.fullName</strong> @Lang.WelcomeBack</h1>
  46. <h2>
  47. @Lang.YourCourses
  48. @*Các khoá bạn đang học*@
  49. </h2>
  50. <ul class="nav nav-tabs product-tab" role="tablist">
  51. @*<li class="active"><a href="https://www.voca.vn/personal">Tất cả</a></li>*@
  52. <li class=" @(@course == "1" ? " active" : "")"><a href="/Individual?courseType=1">@Lang.Vocabulary</a></li>
  53. <li class=" @(@course == "2" ? " active" : "")"><a href="/Individual?courseType=2">@Lang.Grammar</a></li>
  54. <li class=" @(@course == "3" ? " active" : "")"><a href="/Individual?courseType=3">@Lang.Listening</a></li>
  55. <li class=" @(@course == "6" ? " active" : "")"><a href="/Individual?courseType=6">@Lang.vietnamese</a></li>
  56. <li class=" @(@course == "9" ? " active" : "")"><a href="/Individual?courseType=9">@Lang.laos</a></li>
  57. @*<span class="active-bar" style="width: 100px; left: 0px;"></span>*@
  58. </ul>
  59. <div class="tab-content product-tab-content">
  60. <!--all tab-->
  61. <div role="tabpanel" class="tab-pane fade active in" id="tab-all">
  62. <div class="individual-home-product-list">
  63. <div id="individual-home-product-slider">
  64. @{ if (check == true)
  65. {
  66. for (int i = 0; i < Model.history.listCourseHistory.Count; i++)
  67. {
  68. HistoryElement history = Model.history.listCourseHistory[i];
  69. <div class="home-library-product @(i == 0 ? "product-active" : "") ">
  70. <a class="home-library-product-cover" href="/Common/Lesson?courseType=@course&courseId=@history.id">
  71. <div class="product-image-group">
  72. <img src="@(NEducation.Controllers.UtilsController.GetContentPath.CourseContentPath + history.iconPath)" class="product-image lazy" alt="@history.name" data-src="https://www.voca.vn/assets/file_upload/images/1000sw1.png">
  73. </div>
  74. <div class="product-content">
  75. <h3 class="product-name">@history.name</h3>
  76. <p class="product-category"><span class="Vocabulary">@Lang.Vocabulary</span> @Lang.Speaking</p>
  77. <p class="product-description">@history.description</p>
  78. </div>
  79. <div class="individual-product-bottom">
  80. <div class="product-progress">
  81. <span class="progress-full">
  82. @if (history.percent == "0" || history.percent == "" || history.percent == null)
  83. {
  84. <span class="progress-value" style="width: calc(0%);">0%</span>
  85. }
  86. else
  87. {
  88. <span class="progress-value" style="width: calc(@history.percent%);">@history.percent%</span>
  89. }
  90. @*<script type="text/javascript">
  91. if () {
  92. $('.progress-value').css('background', '#EBEBEB')
  93. }
  94. </script>*@
  95. </span>
  96. </div>
  97. <span class="individual-learning-continue" style="display:inline-block">
  98. @Lang.ContinueLearning
  99. </span>
  100. @{if (history.expDate != null && history.expDate != "")
  101. {
  102. <span class="individual-learning-continue" style="display:inline-block">@Lang.End @history.expDate</span>
  103. }
  104. }
  105. </div>
  106. <div class="clearfix"></div>
  107. </a>
  108. </div>
  109. }
  110. }
  111. else
  112. {
  113. <div class="product-empty">
  114. <h2>
  115. @Lang.YouHaveNoCourse
  116. @*BẠN CHƯA CÓ KHÓA HỌC NÀO*@
  117. </h2>
  118. <h3>
  119. @Lang.ChooseACourseInLibrary
  120. @*Hãy vào thư viện VOCA chọn một khóa học tiếng Anh để bắt đầu bạn nhé!*@
  121. </h3>
  122. <a href="https://www.voca.vn/library/">@Lang.EnteringLibrary</a>
  123. </div>
  124. }
  125. }
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. @*<script type="text/javascript" src="https://www.voca.vn/assets/js/lazyload.min.js?n=620"></script>*@
  135. @*<script type="text/javascript">
  136. var ll = new LazyLoad({
  137. elements_selector: ".lazy"
  138. });
  139. </script>*@
  140. <script type="text/javascript">
  141. /*$('#input-menu-search').unbind('keyup').keyup(function(event){
  142. var keyWord = $(this).val();
  143. if(event.keyCode == 13){
  144. if(keyWord.trim() != ""){
  145. window.location.href = "https://www.voca.vn/search/vocabulary?q="+keyWord.trim().replace(/\s/g, "-")+'&t='+pTitle;
  146. }else{
  147. return false;
  148. }
  149. }
  150. });
  151. $('#btn-menu-search').unbind('click').click(function(){
  152. var keyWord = $('#input-menu-search').val();
  153. if(keyWord.trim() != ""){
  154. window.location.href = "https://www.voca.vn/search/vocabulary?q="+keyWord.trim().replace(/\s/g, "-")+'&t='+pTitle;
  155. }else{
  156. return false;
  157. }
  158. });*/
  159. moveactivebar($('.product-tab li.active'));
  160. function moveactivebar(element) {
  161. if ($(element).position() != undefined) {
  162. var pos = $(element).position().left;
  163. var width = $(element).innerwidth();
  164. var bar = $('.product-tab .active-bar');
  165. $(bar).innerwidth(width);
  166. $(bar).css('left', pos);
  167. }
  168. }
  169. </script>
  170. <script>
  171. $('.menu-personal').addClass('menu-active');
  172. </script>
  173. </div>
  174. @*<div>
  175. @Html.ActionLink("Back to List", "Index")
  176. </div>*@