education.html 6.1 KB

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