style: change test layout
This commit is contained in:
parent
f691495aa2
commit
07b98fc0e3
1 changed files with 18 additions and 19 deletions
|
@ -201,17 +201,15 @@
|
||||||
{#if tests.filter((test) => test.categories.includes(category.id)).length > 0}
|
{#if tests.filter((test) => test.categories.includes(category.id)).length > 0}
|
||||||
<h2>{$i18n.t(category.label)}</h2>
|
<h2>{$i18n.t(category.label)}</h2>
|
||||||
{#each filteredTests.filter((test) => test.categories.includes(category.id) && filteredCategories.every( (f) => test.categories.includes(f) )) as test}
|
{#each filteredTests.filter((test) => test.categories.includes(category.id) && filteredCategories.every( (f) => test.categories.includes(f) )) as test}
|
||||||
<div class="test" class:disabled={test.disabled}>
|
<a class="test" href={test.id} class:disabled={test.disabled}>
|
||||||
<a class="test" href={test.id}>
|
|
||||||
<span class="label">
|
|
||||||
<i class="ti {test.icon}"></i>
|
<i class="ti {test.icon}"></i>
|
||||||
|
<div class="label">
|
||||||
{$i18n.t(test.label)}
|
{$i18n.t(test.label)}
|
||||||
</span>
|
|
||||||
<span class="description">
|
|
||||||
{$i18n.t(`tests.${test.id}.description`)}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
{$i18n.t(`tests.${test.id}.description`)}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
|
@ -292,21 +290,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.test {
|
.test {
|
||||||
display: flex;
|
display: grid;
|
||||||
gap: 0.5em;
|
grid-template-columns: auto 1fr;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0 0.25em;
|
||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
|
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
& .label {
|
& .label {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .description {
|
& .description {
|
||||||
opacity: 0.85;
|
opacity: 0.8;
|
||||||
}
|
grid-column-start: 2;
|
||||||
|
|
||||||
& a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
|
|
Loading…
Reference in a new issue