add captions (new field image_titles)
This commit is contained in:
+6
-3
@@ -586,10 +586,13 @@ function loadQuestion(n, section = 1, force_reload = false) {
|
|||||||
image = image[0]; // Do we want the middle image?
|
image = image[0]; // Do we want the middle image?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let caption = "...";
|
||||||
|
if (current_question.image_titles != undefined) {
|
||||||
|
caption = current_question.image_titles[id];
|
||||||
|
}
|
||||||
|
|
||||||
thumbnails.append(
|
thumbnails.append(
|
||||||
'<div class="figure" id="figure-' +
|
`<div class="figure" id="figure-${id}"><div class="figcaption">${caption}</div></div>`
|
||||||
id +
|
|
||||||
'"><div class="figcaption">...</div></div>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// const thumbnail = $(".figure .thumbnail").get(id);
|
// const thumbnail = $(".figure .thumbnail").get(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user