fontawesome und jeeede menge reworks
All checks were successful
Build and push / Pulling repo on server (push) Successful in 20s

This commit is contained in:
2023-10-22 01:46:22 +02:00
parent fc9de5b15c
commit 004e38b3bb
72 changed files with 53087 additions and 83 deletions

View File

@ -4,15 +4,17 @@ class Home extends Page
{
function setMenu()
{
$this->menu_text = 'home';
$this->menu_image = 'mdi-action-home';
$this->menu_text = 'Home';
$this->menu_image = 'far fa-home';
$this->menu_priority = 0;
}
function index()
{
$u = new User();
$this->set('userdata', $u->getAll());
$this->set('template', "home.html");
return $this->renderPagecontent();
//return $this->renderPagecontent();
}
function maySeeThisPage(){return true;}

View File

@ -1,9 +1,6 @@
<div class="hidden sm:mb-8 sm:flex sm:justify-center">
<div
class="relative rounded-full px-3 py-1 text-sm leading-6 text-gray-600 ring-1 ring-gray-900/10 hover:ring-gray-900/20">
Announcing our next round of funding. <a href="#" class="font-semibold text-indigo-600"><span
class="absolute inset-0" aria-hidden="true"></span>Read more <span
aria-hidden="true">&rarr;</span></a>
<div class="relative rounded-full px-3 py-1 text-sm leading-6 text-gray-600 ring-1 ring-gray-900/10 hover:ring-gray-900/20">
Currently logged in as: <?= $_SESSION['userid']?:'nobody' ?>
</div>
</div>
<div class="text-center">
@ -11,14 +8,14 @@
<p class="mt-6 text-lg leading-8 text-gray-600">Anim aute id magna aliqua ad ad non deserunt sunt.
Qui irure qui lorem cupidatat commodo. Elit sunt amet fugiat veniam occaecat fugiat aliqua.</p>
<div class="mt-10 flex items-center justify-center gap-x-6">
<a href="#"
class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Get
<a href="#" class="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Get
started</a>
<a href="#" class="text-sm font-semibold leading-6 text-gray-900">Learn more <span
aria-hidden="true"></span></a>
<a href="#" class="text-sm font-semibold leading-6 text-gray-900">Learn more <span aria-hidden="true"></span></a>
</div>
</div>
<h1 class="text-2xl p-6 text-center">Admin stuff</h1>
<div class="container flex justify-center mx-auto">
<div class="flex flex-col">
<div class="w-full">
@ -26,54 +23,37 @@
<table class="divide-y divide-gray-300 ">
<thead class="bg-gray-50">
<tr>
<?php foreach (array_keys($userdata[0]) as $key) : ?>
<th class="px-6 py-2 text-xs text-gray-500">
ID
<?= $key ?>
</th>
<?php endforeach; ?>
<th class="px-6 py-2 text-xs text-gray-500">
Name
</th>
<th class="px-6 py-2 text-xs text-gray-500">
Email
</th>
<th class="px-6 py-2 text-xs text-gray-500">
Created_at
Login
</th>
<th class="px-6 py-2 text-xs text-gray-500">
Edit
</th>
<th class="px-6 py-2 text-xs text-gray-500">
Delete
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-300">
<?php foreach ([
['id' => 1, 'name' => 'Max', 'email' => 'test@test.ts'],
['id' => 2, 'name' => 'Roxie', 'email' => 'loxie@test.ts'],
] as $user) : ?>
<?php foreach ($userdata as $user) : ?>
<tr class="whitespace-nowrap">
<td class="px-6 py-4 text-sm text-gray-500">
<?= $user['id'] ?>
</td>
<td class="px-6 py-4">
<div class="text-sm text-gray-900">
<?= $user['name'] ?>
</div>
</td>
<td class="px-6 py-4">
<div class="text-sm text-gray-500"><?= $user['email'] ?></div>
</td>
<td class="px-6 py-4 text-sm text-gray-500">
2021-1-12
</td>
<td class="px-6 py-4">
<a href="#" class="px-4 py-1 text-sm text-indigo-600 bg-indigo-200 rounded-full">Edit</a>
</td>
<td class="px-6 py-4">
<a href="#" class="px-4 py-1 text-sm text-red-400 bg-red-200 rounded-full">Delete</a>
</td>
</tr>
<tr class="whitespace-nowrap">
<?php foreach (array_keys($user) as $key) : ?>
<td class="px-6 py-4 text-sm text-gray-500">
<?= $user[$key] ?>
</td>
<?php endforeach; ?>
<td class="px-6 py-4">
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/" class="px-4 py-1 text-sm text-indigo-600 bg-indigo-200 rounded-full">Login as this user</button>
</td>
<td class="px-6 py-4">
<button name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main" class="px-4 py-1 text-sm text-red-400 bg-red-200 rounded-full">Edit</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>