education-alt.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 education-alt" id="{{ $sectionID }}">
  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. {{ $logoImage:= resources.Get .institution.logo}}
  33. {{ $darkLogoImage:= resources.Get .institution.darkLogo}}
  34. {{ if $logoImage }}
  35. <div class="logo-holder">
  36. <img class="company-logo light-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
  37. {{ if $darkLogoImage }}
  38. <img class="company-logo dark-logo" src="{{ $darkLogoImage.RelPermalink }}" alt="{{ .name }}" />
  39. {{ end }}
  40. </div>
  41. {{ end }}
  42. <div class="row">
  43. <div class="col-lg-10 col-md-8">
  44. {{ if .institution.url }}
  45. <h5><a href="{{ .institution.url }}" title="{{ .institution.name }}" target="_blank" rel="noopener">{{ .institution.name }}</a></h5>
  46. {{ else }}
  47. <h5>{{ .institution.name }}</h5>
  48. {{ end }}
  49. </div>
  50. <div class="timeframe col-lg-2 col-md-4">{{ .timeframe }}</div>
  51. </div>
  52. <h6>{{ .name }}</h6>
  53. {{ if .grade }}
  54. <h6 class="text-heading"><span>{{ .grade.scale }}: </span><span>{{ .grade.achieved }}</span> {{ i18n "out_of" }} <span>{{ .grade.outOf }}</span></h6>
  55. {{ end }}
  56. {{ if .publications }}
  57. <div class="publications">
  58. <h6 class="text-heeading">{{i18n "publications"}}:</h6>
  59. <ul>
  60. {{ range .publications }}
  61. {{ if .url }}
  62. <li><a href="{{ .url }}" title="{{ .title }}" target="_blank" rel="noopener">{{ .title }}</a></li>
  63. {{ else }}
  64. <li>{{ .title }}</li>
  65. {{ end }}
  66. {{ end }}
  67. </ul>
  68. </div>
  69. {{ end }}
  70. {{ if .takenCourses }}
  71. {{ $collapseAfter := .takenCourses.collapseAfter | default 2 }}
  72. <div class="taken-courses">
  73. <h6 class="text-heading">{{ i18n "taken_courses" }}:</h6>
  74. {{ if .takenCourses.showGrades }}
  75. {{ $hideScale := .takenCourses.hideScale }}
  76. <table>
  77. <thead>
  78. <th>{{ i18n "course_name" }}</th>
  79. {{ if not $hideScale }}<th>{{ i18n "total_credit" }}</th>{{ end }}
  80. <th>{{ i18n "obtained_credit" }}</th>
  81. </thead>
  82. <tbody>
  83. {{ range $index,$course := .takenCourses.courses }}
  84. <tr class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">
  85. <td>{{ $course.name }}</td>
  86. {{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }}
  87. <td>{{ $course.achieved }}</td>
  88. </tr>
  89. {{ end }}
  90. </tbody>
  91. </table>
  92. {{ else }}
  93. <ul>
  94. {{ range $index,$course := .takenCourses.courses }}
  95. <li class="course {{ if ge $index $collapseAfter }}hidden-course{{ end}}">{{ $course.name }}</li>
  96. {{ end }}
  97. </ul>
  98. {{ end }}
  99. {{ if gt (len .takenCourses.courses) $collapseAfter }}
  100. <button type="button" class="btn btn-link show-more-btn pt-0 {{ if .takenCourses.showGrades }}ms-1{{ else }}ms-2{{ end }}"
  101. id="show-more-btn" aria-label="{{ i18n "show_more"}}">{{ i18n "show_more"}}</button>
  102. <button type="button" class="btn btn-link show-more-btn hidden pt-0 {{ if .takenCourses.showGrades }}ms-1{{ else }}ms-2{{ end }}"
  103. id="show-less-btn" aria-label="{{ i18n "show_less"}}">{{ i18n "show_less"}}</button>
  104. {{ end }}
  105. </div>
  106. {{ end }}
  107. {{ if .extracurricularActivities }}
  108. <div class="extracurricular-activities">
  109. <h6 class="text-heading">{{ i18n "extracurricular_activities" }}:</h6>
  110. <ul>
  111. {{ range .extracurricularActivities }}
  112. <li>{{ . | markdownify }}</li>
  113. {{ end }}
  114. </ul>
  115. </div>
  116. {{ end }}
  117. {{ if .customSections }}
  118. <div class="custom-section">
  119. {{ range .customSections }}
  120. <h6 class="text-heading">{{ .name }}: </h6>
  121. <div class="custom-content">{{ .content | markdownify }}</div>
  122. {{ end }}
  123. </div>
  124. {{ end }}
  125. </div>
  126. </td>
  127. <td class="line">
  128. <div></div>
  129. </td>
  130. <td class="icon">
  131. <div class="hline"></div>
  132. <div class="icon-holder">
  133. <i class="fas {{ .icon }}"></i>
  134. </div>
  135. </td>
  136. </tr>
  137. {{ end }}
  138. </tbody>
  139. </table>
  140. </div>
  141. </div>