Compare commits

...

7 commits
0.4.7 ... main

Author SHA1 Message Date
95fa74a2b0
increade coookie time
Some checks failed
/ ls (pull_request) Failing after 25s
/ ls (release) Successful in 1m4s
/ ls (push) Successful in 1m38s
2025-07-16 19:52:50 +02:00
0b4fe7f44a
lol
Some checks failed
/ ls (pull_request) Failing after 25s
/ ls (release) Successful in 1m0s
/ ls (push) Successful in 1m36s
2025-07-14 21:54:27 +02:00
83fb29a6fa
buggifix
Some checks failed
/ ls (pull_request) Failing after 24s
/ ls (release) Successful in 1m2s
/ ls (push) Successful in 1m39s
2025-07-14 20:37:31 +02:00
2dca8da01e
fixie
Some checks failed
/ ls (pull_request) Failing after 24s
/ ls (release) Successful in 1m2s
/ ls (push) Successful in 1m39s
2025-07-14 19:49:02 +02:00
a8db69786a
add mono mode
All checks were successful
/ ls (pull_request) Successful in 1m42s
/ ls (push) Successful in 1m38s
/ ls (release) Successful in 1m5s
2025-07-14 19:10:58 +02:00
feeb4aca61
add cart to order view 2025-07-14 19:10:58 +02:00
994d837de9
better readable forms
All checks were successful
/ ls (pull_request) Successful in 1m38s
/ ls (push) Successful in 1m34s
2025-07-07 18:22:30 +02:00
9 changed files with 60 additions and 11 deletions

View file

@ -1,6 +1,14 @@
// Sparkle effect on mouse move
document.addEventListener('mousemove', function (e) {
const emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
const htmlElement = document.documentElement;
if (htmlElement.getAttribute('data-website-mode') === 'normal') {
return;
}
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
if (htmlElement.getAttribute('data-website-mode') === 'mono') {
emojis = ['🦇', '🦉', '🦔', '🦡', '🐺', '', '', '', '', '', '', '', '', '', ''];
}
const sparkle = document.createElement('div');
sparkle.className = 'emoji-footprint';
sparkle.textContent = emojis[Math.floor(Math.random() * emojis.length)];

View file

@ -307,6 +307,11 @@
animation: discoFlash 0.3s infinite, wiggle 0.2s infinite;
}
[data-website-mode="mono"] {
filter: grayscale(1);
}
/* Enhanced mode styles (for future use) */
[data-website-mode="enhanced"] .btn {
background: linear-gradient(45deg, var(--bs-pink), var(--bs-purple), var(--bs-cyan), var(--bs-yellow), var(--bs-green), var(--bs-orange), var(--bs-red));

View file

@ -3,6 +3,7 @@
namespace App\Controller;
use App\Form\UserNameFormType;
use DateTimeImmutable;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\RedirectResponse;
@ -33,7 +34,13 @@ final class HomeController extends AbstractController
$response->headers->clearCookie('username');
return $response;
}
$response->headers->setCookie(new Cookie('username', $username));
$response->headers->setCookie(
new Cookie(
name: 'username',
value: $username,
expire: new DateTimeImmutable('+1 year'),
)
);
return $response;
}
$username = $request->cookies->get('username', self::DEFAULT_USERNAME);

View file

@ -130,6 +130,9 @@ class OrderItem
public function setMenuItem(MenuItem|null $menuItem): static
{
if (! $menuItem instanceof MenuItem) {
return $this;
}
$this->menuItem = $menuItem;
$this->name = $menuItem->getName();

View file

@ -25,7 +25,7 @@ final class FoodOrderRepository extends ServiceEntityRepository
public function findLatestEntries(int $page = 1, int $pagesize = 10, int $days = 4): array
{
$result = $this->createQueryBuilder('alias')
$result = $this->createQueryBuilder('alias')
->orderBy('alias.id', 'DESC')
->setFirstResult(($page - 1) * $pagesize)
->setMaxResults($pagesize)

View file

@ -12,7 +12,7 @@
</head>
<body>
<header class="mb-4">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<span class="navbar-brand">Futtern</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@ -26,6 +26,10 @@
<li class="nav-item"><a class="nav-link" href="https://git.hannover.ccc.de/lubiana/futtern/issues/new" target="_blank">Create Issue</a></li>
</ul>
<div class="btn-group ms-auto" role="group" aria-label="Mode selection">
<input type="radio" class="btn-check" name="mode" id="mono" autocomplete="off">
<label class="btn btn-outline-primary" for="mono">
Mono
</label>
<input type="radio" class="btn-check" name="mode" id="normal" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="normal">
Normal
@ -57,7 +61,7 @@
</div>
</nav>
</header>
<main class="container pb-5">
<main class="container pb-5 pt-5">
{% block body %}{% endblock %}
</main>
</body>

View file

@ -15,6 +15,15 @@
<th>Vendorphone</th>
<td>{{ food_order.foodVendor.phone }}</td>
</tr>
{% if food_order.foodVendor.menuLink != '' %}
<tr>
<th colspan="2">
<a href="{{ food_order.foodVendor.menuLink }}" target="_blank">
External link to Menu
</a>
</th>
</tr>
{% endif %}
<tr>
<th>Created By</th>
<td>{{ food_order.createdBy }}</td>
@ -86,7 +95,9 @@
<tr>
<td>{{ loop.index }}</td>
<td>{{ item.createdBy }}</td>
<td>{{ item.name }}</td>
<td>
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
</td>
<td>{{ item.extras }}</td>
<td>
{% if(food_order.isClosed) %}

View file

@ -20,16 +20,27 @@
<section class="mb-4">
<h2>known menuitems</h2>
<ul class="list-group list-group-flush">
<table class="table table-bordered w-auto">
<thead>
<tr>
<th>name</th>
<th>price</th>
</tr>
</thead>
<tbody>
{% for item in food_vendor.menuItems %}
<li class="list-group-item">
<tr class="menu-item">
<td>
<a href="{{ path('app_menu_item_show', {'id': item.id}) }}">{{ item.name }}</a>
{% if(item.aliasOf) %}
<span class="text-muted">(alias of: {{ item.aliasOf.name }})</span>
{% endif %}
</li>
</td>
<td>{{ (item.priceCents / 100)|format_currency('EUR') }}</td>
</tr>
{% endfor %}
</ul>
</tbody>
</table>
</section>
<div class="d-flex gap-2">

View file

@ -119,7 +119,7 @@ describe(FoodVendorController::class, function (): void {
)->text();
$this->assertSame('My Title', $nameNode);
$itemNodes = $crawler->filter('ul.list-group li.list-group-item');
$itemNodes = $crawler->filter('tr.menu-item');
$this->assertCount(4, $itemNodes);
});