From d05153411aef386445e981c3387941de07351c8d Mon Sep 17 00:00:00 2001 From: Fabio Fenoglio Date: Tue, 7 Dec 2021 09:11:45 +0100 Subject: [PATCH] allow customization of number of items to show in "taken courses" when before collapsing --- layouts/partials/sections/education-alt.html | 7 ++++--- layouts/partials/sections/education.html | 7 ++++--- static/js/main.js | 11 ++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/layouts/partials/sections/education-alt.html b/layouts/partials/sections/education-alt.html index 2994fc5..13037a8 100644 --- a/layouts/partials/sections/education-alt.html +++ b/layouts/partials/sections/education-alt.html @@ -53,6 +53,7 @@ {{ end }} {{ if .takenCourses }} + {{ $showFirst := .takenCourses.showFirst | default 2 }}
{{ i18n "taken_courses" }}
{{ if .takenCourses.showGrades }} @@ -65,7 +66,7 @@ {{ range $index,$course := .takenCourses.courses }} - + {{ $course.name }} {{ if not $hideScale }}{{ $course.outOf }}{{ end }} {{ $course.achieved }} @@ -76,11 +77,11 @@ {{ else }} {{ end }} - {{ if gt (len .takenCourses.courses) 2 }} + {{ if gt (len .takenCourses.courses) $showFirst }}