responsive table

This commit is contained in:
piapassecker 2023-10-27 12:31:50 +02:00
parent bb51933dd1
commit 9d5e02bb01

View File

@ -16,8 +16,8 @@
</div> </div>
<h1>Admin stuff</h1> <h1>Admin stuff</h1>
<figure> <figure class="table-responsive">
<table role="grid"> <table class="table" role="grid">
<thead> <thead>
<tr> <tr>
<?php foreach (array_keys($userdata[0]) as $key) : ?> <?php foreach (array_keys($userdata[0]) as $key) : ?>
@ -38,18 +38,19 @@
<?php foreach ($userdata as $user) : ?> <?php foreach ($userdata as $user) : ?>
<tr> <tr>
<?php foreach (array_keys($user) as $key) : ?>
<td class="px-6 py-4 text-sm text-gray-500">
<?= is_array($user[$key])?json_encode($user[$key]):$user[$key] ?>
</td>
<?php endforeach; ?>
<td> <td>
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/">Login</button> <button name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/">Login</button>
</td> </td>
<td> <td>
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main">Edit</button> <button name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main">Edit</button>
</td> </td>
<?php foreach (array_keys($user) as $key) : ?>
<td class="px-6 py-4 text-sm text-gray-500">
<?= is_array($user[$key])?json_encode($user[$key]):$user[$key] ?>
</td>
<?php endforeach; ?>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>