Skip to content

Commit

Permalink
Nachi WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertClo committed Aug 23, 2024
1 parent 44e4295 commit aa57f9e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions resources/views/nachi/benefits.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
</head>
<body class="font-sans antialiased">

@if($_COOKIE['password'] ?? '' == 'nachi')

<div x-data="benefitsPresenter()"
class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-5xl p-6">
<div>
Expand Down Expand Up @@ -86,6 +88,35 @@ class="text-slate-500 hover:text-sky-700">Back to all categories
</div>
</div>
</div>
@else
<div class="flex items-center justify-center h-screen gap-4">
Password
<input type="password" x-model="password" id="passwordInput">
</div>
<script>
const passwordInput = document.getElementById('passwordInput');
passwordInput.addEventListener('keyup', function(event) {
if (event.key === 'Enter') {
submitPassword();
}
});
const handleKeyUp = (event) => {
if (event.key === 'Enter') {
submitPassword();
}
}
const submitPassword = () => {
console.log('submitPassword')
const password = passwordInput.value;
document.cookie = "password=" + passwordInput.value + "; path=/";
location.reload();
}
</script>
@endif



<script>
const benefitsList = [
Expand Down

0 comments on commit aa57f9e

Please sign in to comment.