Place question number beside text
This commit is contained in:
@@ -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.1).
|
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.8.2).
|
||||||
|
|
||||||
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.2.
|
||||||
@@ -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.1</version>
|
<version>1.8.2</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>
|
||||||
|
|||||||
@@ -68,6 +68,31 @@
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-number {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-text {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-text > :first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-text > :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.com-testquestions .odp,
|
.com-testquestions .odp,
|
||||||
.com-testquestions .odpp,
|
.com-testquestions .odpp,
|
||||||
.com-testquestions .odpu,
|
.com-testquestions .odpu,
|
||||||
|
|||||||
@@ -36,7 +36,12 @@ use Joomla\CMS\HTML\HTMLHelper;
|
|||||||
<form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, 'UTF-8'); ?>" method="post">
|
<form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, 'UTF-8'); ?>" method="post">
|
||||||
<?php foreach ($this->items as $number => $item) : ?>
|
<?php foreach ($this->items as $number => $item) : ?>
|
||||||
<article class="testquestion mb-4">
|
<article class="testquestion mb-4">
|
||||||
<div class="pyt"><h2><?php echo ($number + 1) . '. '; ?><?php echo $item->question; ?></h2></div>
|
<div class="pyt">
|
||||||
|
<div class="question-header">
|
||||||
|
<span class="question-number"><?php echo ($number + 1) . '.'; ?></span>
|
||||||
|
<div class="question-text"><?php echo $item->question; ?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php if ($item->image) : ?>
|
<?php if ($item->image) : ?>
|
||||||
<div class="foto_pyt"><img src="<?php echo htmlspecialchars($item->image, ENT_QUOTES, 'UTF-8'); ?>" alt="" loading="lazy"></div>
|
<div class="foto_pyt"><img src="<?php echo htmlspecialchars($item->image, ENT_QUOTES, 'UTF-8'); ?>" alt="" loading="lazy"></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
+17
@@ -147,3 +147,20 @@ div.odpup
|
|||||||
.com-testquestions .odpup {
|
.com-testquestions .odpup {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-number {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-testquestions .question-text {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user