Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
95fa74a2b0 | |||
0b4fe7f44a |
2 changed files with 13 additions and 3 deletions
|
@ -1,10 +1,13 @@
|
||||||
// Sparkle effect on mouse move
|
// Sparkle effect on mouse move
|
||||||
document.addEventListener('mousemove', function (e) {
|
document.addEventListener('mousemove', function (e) {
|
||||||
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
|
|
||||||
const htmlElement = document.documentElement;
|
const htmlElement = document.documentElement;
|
||||||
|
if (htmlElement.getAttribute('data-website-mode') === 'normal') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let emojis = ['✨', '💖', '🌟', '💅', '🦄', '🎉', '🌈'];
|
||||||
|
|
||||||
if (htmlElement.getAttribute('data-website-mode') === 'mono') {
|
if (htmlElement.getAttribute('data-website-mode') === 'mono') {
|
||||||
emojis = ['🦇', '🦹', '🌙', '⚰️', '🕯️'];
|
emojis = ['🦇', '🦉', '🦔', '🦡', '🐺', '', '', '', '', '', '', '', '', '', ''];
|
||||||
}
|
}
|
||||||
const sparkle = document.createElement('div');
|
const sparkle = document.createElement('div');
|
||||||
sparkle.className = 'emoji-footprint';
|
sparkle.className = 'emoji-footprint';
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Form\UserNameFormType;
|
use App\Form\UserNameFormType;
|
||||||
|
use DateTimeImmutable;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Cookie;
|
use Symfony\Component\HttpFoundation\Cookie;
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
|
@ -33,7 +34,13 @@ final class HomeController extends AbstractController
|
||||||
$response->headers->clearCookie('username');
|
$response->headers->clearCookie('username');
|
||||||
return $response;
|
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;
|
return $response;
|
||||||
}
|
}
|
||||||
$username = $request->cookies->get('username', self::DEFAULT_USERNAME);
|
$username = $request->cookies->get('username', self::DEFAULT_USERNAME);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue