Compare commits

..

2 commits
0.4.99 ... 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
2 changed files with 13 additions and 3 deletions

View file

@ -1,10 +1,13 @@
// Sparkle effect on mouse move
document.addEventListener('mousemove', function (e) {
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
const htmlElement = document.documentElement;
if (htmlElement.getAttribute('data-website-mode') === 'normal') {
return;
}
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
if (htmlElement.getAttribute('data-website-mode') === 'mono') {
emojis = ['🦇', '🦹', '🌙', '⚰️', '🕯️'];
emojis = ['🦇', '🦉', '🦔', '🦡', '🐺', '', '', '', '', '', '', '', '', '', ''];
}
const sparkle = document.createElement('div');
sparkle.className = 'emoji-footprint';

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);