Fix table selector specificity

This commit is contained in:
Giuseppe Criscione 2024-01-27 14:14:41 +01:00
parent 4d5d6ca3eb
commit b9745562a3
5 changed files with 21 additions and 24 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,23 +1,20 @@
.table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
.table th {
.table-header {
padding: 0.5rem;
font-weight: 600;
text-align: left;
}
.table td {
.table-cell {
padding: 0.5rem;
}
.table-bordered {
border-collapse: collapse;
}
.table-bordered td {
.table-bordered .table-cell {
border-top: 1px solid $color-base-600;
border-bottom: 1px solid $color-base-600;
}

View File

@ -17,8 +17,8 @@
<table class="table info-data">
<?php foreach ($data as $key => $value): ?>
<tr>
<td class="info-data-key"><?= $key ?></td>
<td class="info-data-value"><?= $value ?></td>
<td class="table-cell info-data-key"><?= $key ?></td>
<td class="table-cell info-data-value"><?= $value ?></td>
</tr>
<?php endforeach ?>
</table>

View File

@ -48,17 +48,17 @@
<table class="table table-bordered table-striped table-hoverable text-size-s">
<thead>
<tr>
<th style="width: 100%"><?= $this->translate('panel.statistics.totalVisits.uri') ?></th>
<th class="truncate" style="width: 20%"><?= $this->translate('panel.statistics.totalVisits.visits') ?></th>
<th class="truncate" style="width: 20%"><?= $this->translate('panel.statistics.totalVisits.percentTotal') ?></th>
<th class="table-header" style="width: 100%"><?= $this->translate('panel.statistics.totalVisits.uri') ?></th>
<th class="table-header truncate" style="width: 20%"><?= $this->translate('panel.statistics.totalVisits.visits') ?></th>
<th class="table-header truncate" style="width: 20%"><?= $this->translate('panel.statistics.totalVisits.percentTotal') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($pageViews as $page => $views): ?>
<tr>
<td class="truncate"><a href="<?= $site->uri($page, includeLanguage: false) ?>" target="_blank"><?= $page ?></a></td>
<td><?= $views ?></td>
<td><?= round($views / $totalViews * 100, 2) ?></td>
<td class="table-cell truncate"><a href="<?= $site->uri($page, includeLanguage: false) ?>" target="_blank"><?= $page ?></a></td>
<td class="table-cell"><?= $views ?></td>
<td class="table-cell"><?= round($views / $totalViews * 100, 2) ?></td>
</tr>
<?php endforeach ?>
</tbody>

View File

@ -18,19 +18,19 @@
<table id="backups-table" class="table table-bordered table-hoverable text-size-s">
<thead>
<tr>
<th class="truncate" style="width: 100%"><?= $this->translate('panel.tools.backup.file') ?></th>
<th class="truncate text-align-center show-from-m" style="width: 25%"><?= $this->translate('panel.tools.backup.date') ?></th>
<th class="truncate text-align-center show-from-s" style="width: 15%"><?= $this->translate('panel.tools.backup.size') ?></th>
<th class="text-align-center" style="width: 15%"><?= $this->translate('panel.tools.backup.actions') ?></th>
<th class="table-header truncate" style="width: 100%"><?= $this->translate('panel.tools.backup.file') ?></th>
<th class="table-header truncate text-align-center show-from-m" style="width: 25%"><?= $this->translate('panel.tools.backup.date') ?></th>
<th class="table-header truncate text-align-center show-from-s" style="width: 15%"><?= $this->translate('panel.tools.backup.size') ?></th>
<th class="table-header text-align-center" style="width: 15%"><?= $this->translate('panel.tools.backup.actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($backups as $backup): ?>
<tr>
<td class="truncate"><?= $this->icon('file-archive') ?> <a href="<?= $panel->uri('/backup/download/' . $backup['encodedName']) . '/' ?>"><?= $backup['name'] ?></a></td>
<td class="truncate text-align-center show-from-m"><?= $this->datetime($backup['timestamp']) ?></td>
<td class="truncate text-align-center show-from-s"><?= $backup['size'] ?></td>
<td class="text-align-center">
<td class="table-cell truncate"><?= $this->icon('file-archive') ?> <a href="<?= $panel->uri('/backup/download/' . $backup['encodedName']) . '/' ?>"><?= $backup['name'] ?></a></td>
<td class="table-cell truncate text-align-center show-from-m"><?= $this->datetime($backup['timestamp']) ?></td>
<td class="table-cell truncate text-align-center show-from-s"><?= $backup['size'] ?></td>
<td class="table-cell text-align-center">
<button type="button" class="button button-link" data-modal="deleteFileModal" data-modal-action="<?= $panel->uri('/backup/delete/' . $backup['encodedName']) . '/' ?>" title="<?= $this->translate('panel.tools.backup.delete') ?>" aria-label="<?= $this->translate('panel.tools.backup.delete') ?>"><?= $this->icon('trash') ?></button>
</td>
</tr>