Compare commits

..
1 Commits
Author SHA1 Message Date
Wojtek 7d9c87bcb6 Tighten question and answer spacing 2026-10-15 13:08:26 +02:00
6 changed files with 31 additions and 6 deletions
+1 -1
View File
@@ -22,6 +22,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.8.2). W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.8.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.8.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.8.2</version> <version>1.8.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>
+14 -2
View File
@@ -71,7 +71,7 @@
.com-testquestions .question-header { .com-testquestions .question-header {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
gap: .5rem; gap: .25rem;
} }
.com-testquestions .question-number { .com-testquestions .question-number {
@@ -145,10 +145,22 @@
} }
.com-testquestions .answer-list label { .com-testquestions .answer-list label {
display: block; display: flex;
align-items: flex-start;
gap: .25rem;
cursor: pointer; cursor: pointer;
} }
.com-testquestions .answer-list label input {
flex: 0 0 auto;
margin-top: .25rem;
}
.com-testquestions .answer-text {
flex: 1 1 auto;
min-width: 0;
}
.com-testquestions select.egzamin { .com-testquestions select.egzamin {
color: #4a86cf; color: #4a86cf;
padding: 5px; padding: 5px;
@@ -58,7 +58,8 @@ use Joomla\CMS\HTML\HTMLHelper;
<li class="<?php echo $isSelected && $this->results['items'][$item->id]['correct'] ? 'odpup' : ($isSelected ? 'odpu' : ($isCorrectAnswer ? 'odpp' : 'odp')); ?>"> <li class="<?php echo $isSelected && $this->results['items'][$item->id]['correct'] ? 'odpup' : ($isSelected ? 'odpu' : ($isCorrectAnswer ? 'odpp' : 'odp')); ?>">
<label> <label>
<input type="radio" name="answers[<?php echo (int) $item->id; ?>]" value="<?php echo $answerIndex + 1; ?>" <?php echo $isSelected ? 'checked' : ''; ?>> <input type="radio" name="answers[<?php echo (int) $item->id; ?>]" value="<?php echo $answerIndex + 1; ?>" <?php echo $isSelected ? 'checked' : ''; ?>>
<strong><?php echo chr(65 + $answerIndex); ?>.</strong> <?php echo $item->$answerField; ?> <strong><?php echo chr(65 + $answerIndex); ?>.</strong>
<span class="answer-text"><?php echo $item->$answerField; ?></span>
<?php if ($isSelected) : ?> <?php if ($isSelected) : ?>
<span class="badge bg-info"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_SELECTED_ANSWER'); ?></span> <span class="badge bg-info"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_SELECTED_ANSWER'); ?></span>
<?php endif; ?> <?php endif; ?>
+12 -1
View File
@@ -151,7 +151,7 @@ div.odpup
.com-testquestions .question-header { .com-testquestions .question-header {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
gap: .5rem; gap: .25rem;
} }
.com-testquestions .question-number { .com-testquestions .question-number {
@@ -164,3 +164,14 @@ div.odpup
flex: 1 1 auto; flex: 1 1 auto;
min-width: 0; min-width: 0;
} }
.com-testquestions .answer-list label {
display: flex;
align-items: flex-start;
gap: .25rem;
}
.com-testquestions .answer-text {
flex: 1 1 auto;
min-width: 0;
}