Fix <tr> is invalid inside <table>

This commit is contained in:
Abdo 2024-07-10 09:54:11 +03:00
parent 07d02990ab
commit c28d254b4d
4 changed files with 49 additions and 37 deletions

View file

@ -141,12 +141,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</script>
<table class="stats-table align-start">
{#each statsRows as row}
<tr>
<th class="align-start">{row.label}</th>
<td>{row.value}</td>
</tr>
{/each}
<tbody>
{#each statsRows as row}
<tr>
<th class="align-start">{row.label}</th>
<td>{row.value}</td>
</tr>
{/each}
</tbody>
</table>
<style>

View file

@ -58,10 +58,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</div>
<div class="counts-table">
<table>
{#each tableData as d, _idx}
<tr>
<!-- prettier-ignore -->
<td>
<tbody>
{#each tableData as d, _idx}
<tr>
<!-- prettier-ignore -->
<td>
<span style="color: {d.colour};">&nbsp;</span>
{#if $prefs.browserLinksSupported}
<button class="search-link" on:click={() => dispatch('search', { query: d.query })}>{d.label}</button>
@ -69,19 +70,20 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<span>{d.label}</span>
{/if}
</td>
<td class="right">{d.count}</td>
<td class="right">{d.percent}</td>
</tr>
{/each}
<td class="right">{d.count}</td>
<td class="right">{d.percent}</td>
</tr>
{/each}
<tr>
<td>
<span style="visibility: hidden;"></span>
{total}
</td>
<td class="right">{graphData.totalCards}</td>
<td />
</tr>
<tr>
<td>
<span style="visibility: hidden;"></span>
{total}
</td>
<td class="right">{graphData.totalCards}</td>
<td />
</tr>
</tbody>
</table>
</div>
</div>

View file

@ -12,12 +12,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<div>
<table dir={direction()}>
{#each tableData as { label, value }}
<tr>
<td class="align-end">{label}:</td>
<td class="align-start">{value}</td>
</tr>
{/each}
<tbody>
{#each tableData as { label, value }}
<tr>
<td class="align-end">{label}:</td>
<td class="align-start">{value}</td>
</tr>
{/each}
</tbody>
</table>
</div>

View file

@ -13,18 +13,24 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<div class="outer">
<table class="preview">
{#each $columnOptions.slice(1) as { label, shortLabel }}
<th>
{shortLabel || label}
</th>
{/each}
{#each $metadata.preview as row}
<thead>
<tr>
{#each row.vals as cell}
<td>{cell}</td>
{#each $columnOptions.slice(1) as { label, shortLabel }}
<th>
{shortLabel || label}
</th>
{/each}
</tr>
{/each}
</thead>
<tbody>
{#each $metadata.preview as row}
<tr>
{#each row.vals as cell}
<td>{cell}</td>
{/each}
</tr>
{/each}
</tbody>
</table>
</div>