Compare commits

..
2 Commits
Author SHA1 Message Date
Wojtek 3eabeebf6b Warn with timer colors near timeout 2026-10-15 19:50:39 +02:00
Wojtek 83e70dd02f Refine fixed timer spacing and frame 2026-10-15 19:43:35 +02:00
7 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -27,6 +27,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
## Instalacja ## Instalacja
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.16.1). W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.16.3).
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
@@ -0,0 +1 @@
-- No database changes required for version 1.16.2.
@@ -0,0 +1 @@
-- No database changes required for version 1.16.3.
+1 -1
View File
@@ -4,7 +4,7 @@
<creationDate>2026-10-14</creationDate> <creationDate>2026-10-14</creationDate>
<author>Komponent</author> <author>Komponent</author>
<license>GNU General Public License version 2 or later</license> <license>GNU General Public License version 2 or later</license>
<version>1.16.1</version> <version>1.16.3</version>
<description>COM_TESTQUESTIONS_DESCRIPTION</description> <description>COM_TESTQUESTIONS_DESCRIPTION</description>
<element>com_testquestions</element> <element>com_testquestions</element>
<namespace path="src">Komponent\Component\Testquestions</namespace> <namespace path="src">Komponent\Component\Testquestions</namespace>
@@ -20,15 +20,14 @@
.com-testquestions #test-timer-container { .com-testquestions #test-timer-container {
position: fixed; position: fixed;
left: 1rem; left: 2rem;
bottom: 1rem; bottom: 2rem;
z-index: 1050; z-index: 1050;
margin: 0; margin: 0;
padding: 4px; padding: 0;
background: #fff; background: transparent;
border: 1px solid #dfe3e7; border: 0;
border-radius: .25rem; box-shadow: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
} }
.com-testquestions .timer-text { .com-testquestions .timer-text {
@@ -127,8 +127,10 @@ document.addEventListener('DOMContentLoaded', function () {
const update = function () { const update = function () {
const minutes = Math.floor(remaining / 60); const minutes = Math.floor(remaining / 60);
const seconds = remaining % 60; const seconds = remaining % 60;
const ratio = remaining / total;
text.textContent = String(minutes).padStart(2, '0') + ':' + String(seconds).padStart(2, '0'); text.textContent = String(minutes).padStart(2, '0') + ':' + String(seconds).padStart(2, '0');
ring.style.strokeDashoffset = circumference * (1 - remaining / total); ring.style.strokeDashoffset = circumference * (1 - remaining / total);
ring.style.stroke = ratio <= 0.1 ? '#dc3545' : (ratio <= 0.2 ? '#fd7e14' : '#4a86cf');
if (remaining <= 0 && !submitted) { if (remaining <= 0 && !submitted) {
submitted = true; submitted = true;
+6 -7
View File
@@ -156,15 +156,14 @@ div.odpup
.com-testquestions #test-timer-container { .com-testquestions #test-timer-container {
position: fixed; position: fixed;
left: 1rem; left: 2rem;
bottom: 1rem; bottom: 2rem;
z-index: 1050; z-index: 1050;
margin: 0; margin: 0;
padding: 4px; padding: 0;
background: #fff; background: transparent;
border: 1px solid #dfe3e7; border: 0;
border-radius: .25rem; box-shadow: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
} }
.com-testquestions .question-number { .com-testquestions .question-number {