education.html 6.3 KB

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