diff options
author | Roxedus <me@roxedus.dev> | 2021-02-16 13:39:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 13:39:25 +0300 |
commit | 0104c49a4a3d0abbe98ecca3c951b7a260091982 (patch) | |
tree | de19a6e71c68d66cb5393bbccae4a016d5e5dd19 /layouts | |
parent | a15f7364f897e1df8021ee3f7ba5ea23059f85a5 (diff) |
Add optional variable to education for courses where scaling doesn't make sense (#231)
* Add optional variable to education
Scales for courses doesnt always apply
* Rename var
*not* !important
* Rename var
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/sections/education-alt.html | 7 | ||||
-rw-r--r-- | layouts/partials/sections/education.html | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/layouts/partials/sections/education-alt.html b/layouts/partials/sections/education-alt.html index 7d9597f..5ba1059 100644 --- a/layouts/partials/sections/education-alt.html +++ b/layouts/partials/sections/education-alt.html @@ -51,18 +51,19 @@ {{ if .takenCourses }} <div class="taken-courses"> <h6 class="text-muted">{{ i18n "taken_courses" }}</h6> - {{ if .takenCourses.showGrades }} + {{ if .takenCourses.showGrades }} + {{ $hideScale := .takenCourses.hideScale }} <table> <thead> <th>{{ i18n "course_name" }}</th> - <th>{{ i18n "total_credit" }}</th> + {{ if not $hideScale }}<th>{{ i18n "total_credit" }}</th>{{ end }} <th>{{ i18n "obtained_credit" }}</th> </thead> <tbody> {{ range $index,$course := .takenCourses.courses }} <tr class="course {{ if gt $index 1 }}hidden-course{{ end}}"> <td>{{ $course.name }}</td> - <td>{{ $course.outOf }}</td> + {{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }} <td>{{ $course.achieved }}</td> </tr> {{ end }} diff --git a/layouts/partials/sections/education.html b/layouts/partials/sections/education.html index b6b5aee..21c195c 100644 --- a/layouts/partials/sections/education.html +++ b/layouts/partials/sections/education.html @@ -51,18 +51,19 @@ {{ if .takenCourses }} <div class="taken-courses"> <h6 class="text-muted">{{ i18n "taken_courses"}}</h6> - {{ if .takenCourses.showGrades }} + {{ if .takenCourses.showGrades }} + {{ $hideScale := .takenCourses.hideScale }} <table> <thead> <th>{{ i18n "course_name"}}</th> - <th>{{ i18n "total_credit"}}</th> + {{ if not $hideScale }}<th>{{ i18n "total_credit"}}</th>{{ end }} <th>{{ i18n "obtained_credit"}}</th> </thead> <tbody> {{ range $index,$course := .takenCourses.courses }} <tr class="course {{ if gt $index 1 }}hidden-course{{ end}}"> <td>{{ $course.name }}</td> - <td>{{ $course.outOf }}</td> + {{ if not $hideScale }}<td>{{ $course.outOf }}</td>{{ end }} <td>{{ $course.achieved }}</td> </tr> {{ end }} |