Commit e7bb6c0 1 parent 44e4295 commit e7bb6c0 Copy full SHA for e7bb6c0
File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 18
18
</head >
19
19
<body class =" font-sans antialiased" >
20
20
21
+ @if (($_COOKIE [' password' ] ?? ' ' ) === ' nachi' )
22
+
21
23
<div x-data =" benefitsPresenter()"
22
24
class =" max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-5xl p-6" >
23
25
<div >
@@ -86,6 +88,35 @@ class="text-slate-500 hover:text-sky-700">Back to all categories
86
88
</div >
87
89
</div >
88
90
</div >
91
+ @else
92
+ <div class =" flex items-center justify-center h-screen gap-4" >
93
+ Password
94
+ <input type =" password" x-model =" password" id =" passwordInput" >
95
+ </div >
96
+ <script >
97
+ const passwordInput = document .getElementById (' passwordInput' );
98
+
99
+ passwordInput .addEventListener (' keyup' , function (event ) {
100
+ if (event .key === ' Enter' ) {
101
+ submitPassword ();
102
+ }
103
+ });
104
+
105
+ const handleKeyUp = (event ) => {
106
+ if (event .key === ' Enter' ) {
107
+ submitPassword ();
108
+ }
109
+ }
110
+ const submitPassword = () => {
111
+ console .log (' submitPassword' )
112
+ const password = passwordInput .value ;
113
+ document .cookie = " password=" + passwordInput .value + " ; path=/" ;
114
+ location .reload ();
115
+ }
116
+ </script >
117
+ @endif
118
+
119
+
89
120
90
121
<script >
91
122
const benefitsList = [
You can’t perform that action at this time.
0 commit comments