education.html 6.2 KB

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