Update quiz image handling and add translated pie chart SVG

This commit is contained in:
2025-01-30 18:55:12 +02:00
parent 0f615a3c34
commit a90bb7f5ca
13 changed files with 12 additions and 1 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 456 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" class="marks" width="610" height="430" viewBox="0 0 610 430"><rect width="610" height="430" fill="white"/><g fill="none" stroke-miterlimit="10" transform="translate(5,25)"><g class="mark-group role-frame root" role="graphics-object" aria-roledescription="group mark container"><g transform="translate(0,0)"><path class="background" aria-hidden="true" d="M0,0h600v400h-600Z"/><g><g class="mark-arc role-mark layer_0_marks" role="graphics-object" aria-roledescription="arc mark container"><path aria-label="share: 17.6; brand: Samsung; index: 1" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M107.261,-53.806A120,120,0,0,0,0,-120L0,0Z" fill="#4c78a8"/><path aria-label="share: 15.5; brand: Xiaomi; index: 2" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M104.791,58.47A120,120,0,0,0,107.261,-53.806L0,0Z" fill="#f58518"/><path aria-label="share: 15; brand: Apple; index: 3" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M14.292,119.146A120,120,0,0,0,104.791,58.47L0,0Z" fill="#e45756"/><path aria-label="share: 10.2; brand: Oppo; index: 4" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M-59.782,104.048A120,120,0,0,0,14.292,119.146L0,0Z" fill="#72b7b2"/><path aria-label="share: 9.8; brand: Vivo; index: 5" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M-108.898,50.41A120,120,0,0,0,-59.782,104.048L0,0Z" fill="#54a24b"/><path aria-label="share: 31.9; brand: Інші; index: 6" role="graphics-symbol" aria-roledescription="arc mark" transform="translate(300,200)" d="M0,-120A120,120,0,0,0,-108.898,50.41L0,0Z" fill="#eeca3b"/></g><g class="mark-text role-mark layer_1_marks" role="graphics-object" aria-roledescription="text mark container"><text aria-label="share: 17.6; index: 1; brand: Samsung" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(347.2657166965166,126.41049663847774)" font-family="sans-serif" font-size="11px" fill="black">Samsung</text><text aria-label="share: 15.5; index: 2; brand: Xiaomi" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(389.9782383993286,204.97904384832546)" font-family="sans-serif" font-size="11px" fill="black">Xiaomi</text><text aria-label="share: 15; index: 3; brand: Apple" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(350.1188054839369,277.75363092762313)" font-family="sans-serif" font-size="11px" fill="black">Apple</text><text aria-label="share: 10.2; index: 4; brand: Oppo" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(282.02610175370336,291.1869547145822)" font-family="sans-serif" font-size="11px" fill="black">Oppo</text><text aria-label="share: 9.8; index: 5; brand: Vivo" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(233.62381943776435,263.7799527308922)" font-family="sans-serif" font-size="11px" fill="black">Vivo</text><text aria-label="share: 31.9; index: 6; brand: Інші" role="graphics-symbol" aria-roledescription="text mark" text-anchor="middle" transform="translate(224.1623629055611,154.53709872560057)" font-family="sans-serif" font-size="11px" fill="black">Інші</text></g><g class="mark-group role-title"><g transform="translate(300,-20)"><path class="background" aria-hidden="true" d="M0,0h0v0h0Z" pointer-events="none"/><g><g class="mark-text role-title-text" role="graphics-symbol" aria-roledescription="title" aria-label="Title text 'Розподіл світового ринку смартфонів у 2021 році'" pointer-events="none"><text text-anchor="middle" transform="translate(0,13)" font-family="sans-serif" font-size="16px" font-weight="bold" fill="#000" opacity="1">Розподіл світового ринку смартфонів у 2021 році</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g></g><path class="foreground" aria-hidden="true" d="" display="none"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -85,7 +85,7 @@ document.addEventListener('DOMContentLoaded', function () {
timerDisplay.textContent = Math.ceil(timeLeft / 1000); // Display in whole seconds
const question = questions[currentQuestionIndex];
const imageVersion = version === 'translated' ? 'original' : version;
const imageVersion = version;
const imagePath = `/images/${question.chart}-${imageVersion}.${question.image}`;
document.getElementById('chart').innerHTML = `<img src="${imagePath}" alt="${question.chart_uk}">`;