education.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {{ $sectionID := replace (lower .section.name) " " "-" }}
  2. {{ if .section.id }}
  3. {{ $sectionID = .section.id }}
  4. {{ end }}
  5. <div class="container-fluid anchor pb-5 education-section" id="{{ $sectionID }}">
  6. {{ if not (.section.hideTitle) }}
  7. <h1 class="text-center">{{ .section.name }}</h1>
  8. {{ end }}
  9. <div class="container">
  10. <table class="education-info-table">
  11. <tbody>
  12. {{ range .degrees}}
  13. <tr>
  14. <td class="icon">
  15. <div class="hline"></div>
  16. <div class="icon-holder">
  17. <i class="fas {{ .icon }}"></i>
  18. </div>
  19. </td>
  20. <td class="line">
  21. <div></div>
  22. </td>
  23. <td class="details">
  24. <div class="degree-info card">
  25. <div class="row">
  26. <div class="col-lg-10 col-md-8">
  27. {{ if .institution.url }}
  28. <h5><a href="{{ .institution.url }}" title="{{ .institution.name }}" target="_blank" rel="noopener">{{ .institution.name }}</a></h5>
  29. {{ else }}
  30. <h5>{{ .institution.name }}</h5>
  31. {{ end }}
  32. </div>
  33. <div class="timeframe col-lg-2 col-md-4">{{ .timeframe }}</div>
  34. </div>
  35. <h6>{{ .name }}</h6>
  36. {{ if .grade }}
  37. <h6><span class="text-muted">{{ .grade.scale }}: </span><span>{{ .grade.achieved }}</span> {{ i18n "out_of"}} <span>{{ .grade.outOf }}</span></h6>
  38. {{ end }}
  39. {{ if .publications }}
  40. <div class="publications">
  41. <h6 class="text-muted">{{ i18n "publications"}}</h6>
  42. <ul>
  43. {{ range .publications }}
  44. {{ if .url }}
  45. <li><a href="{{ .url }}" title="{{ .title }}" target="_blank" rel="noopener">{{ .title }}</a></li>
  46. {{ else }}
  47. <li>{{ .title }}</li>
  48. {{ end }}
  49. {{ end }}
  50. </ul>
  51. </div>
  52. {{ end }}
  53. {{ if .takenCourses }}
  54. <div class="taken-courses">
  55. <h6 class="text-muted">{{ i18n "taken_courses"}}</h6>
  56. {{ if .takenCourses.showGrades }}
  57. {{ $hideScale := .takenCourses.hideScale }}
  58. <table>
  59. <thead>
  60. <th>{{ i18n "course_name"}}</th>
  61. {{ if not $hideScale }}<th>{{ i18n "total_credit"}}</th>{{ end }}
  62. <th>{{ i18n "obtained_credit"}}</th>
  63. </thead>
  64. <tbody>
  65. {{ range $index,$course := .takenCourses.courses }}
  66. <tr class="course {{ if gt $index 1 }}hidden-course{{ end}}">
  67. <td>{{ $course.name }}</td>
  68. {{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }}
  69. <td>{{ $course.achieved }}</td>
  70. </tr>
  71. {{ end }}
  72. </tbody>
  73. </table>
  74. {{ else }}
  75. <ul>
  76. {{ range $index,$course := .takenCourses.courses }}
  77. <li class="course {{ if gt $index 1 }}hidden-course{{ end}}">{{ $course.name }}</li>
  78. {{ end }}
  79. </ul>
  80. {{ end }}
  81. {{ if gt (len .takenCourses.courses ) 2 }}
  82. <button type="button" class="btn btn-link show-more-btn pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
  83. onclick="toggleCourseVisibility(this);" id="show-more-btn">{{ i18n "show_more"}}</button>
  84. <button type="button" class="btn btn-link show-more-btn hidden pt-0 {{ if .takenCourses.showGrades }}ml-1{{ else }}ml-2{{ end }}"
  85. onclick="toggleCourseVisibility(this);" id="show-less-btn">{{ i18n "show_less"}}</button>
  86. {{ end }}
  87. </div>
  88. {{ end }}
  89. {{ if .extracurricularActivities }}
  90. <div class="extracurricular-activities">
  91. <h6 class="text-muted">{{ i18n "extracurricular_activities"}}</h6>
  92. <ul>
  93. {{ range .extracurricularActivities }}
  94. <li>{{ . }}</li>
  95. {{ end }}
  96. </ul>
  97. </div>
  98. {{ end }}
  99. </div>
  100. </td>
  101. </tr>
  102. {{ end }}
  103. </tbody>
  104. </table>
  105. </div>
  106. </div>