Новые изменения
This commit is contained in:
parent
6f727aae7b
commit
b5b31f8a88
9 changed files with 600 additions and 166 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import { createSignal, onMount } from "solid-js";
|
||||
|
||||
export default function CommentLock() {
|
||||
const [currentPath, setCurrentPath] = createSignal("/auth/login");
|
||||
const [currentPath, setCurrentPath] = createSignal("/auth/sign-in");
|
||||
|
||||
onMount(() => {
|
||||
const path = window.location.pathname;
|
||||
setCurrentPath(`/auth/login?redirect=${encodeURIComponent(path)}`);
|
||||
setCurrentPath(`/auth/sign-in?redirect=${encodeURIComponent(path)}`);
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -17,52 +17,38 @@ export default function CommentLock() {
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="bg-linear-to-br from-gray-50 to-gray-100 rounded-2xl p-8 md:p-12 border border-gray-200 text-center">
|
||||
<div class="w-20 h-20 mx-auto mb-6 bg-linear-to-br from-blue-100 to-blue-200 rounded-full flex items-center justify-center">
|
||||
<svg
|
||||
class="w-10 h-10 text-blue-600"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
|
||||
/>
|
||||
<div
|
||||
class="bg-linear-to-br from-gray-50 to-gray-100 rounded-2xl p-8 md:p-12 border border-gray-200 text-center"
|
||||
style="background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);"
|
||||
>
|
||||
<div
|
||||
class="w-20 h-20 mx-auto mb-6 rounded-full flex items-center justify-center"
|
||||
style="background: linear-gradient(135deg, rgba(234, 194, 110, 0.2) 0%, rgba(234, 194, 110, 0.3) 100%);"
|
||||
>
|
||||
<svg class="w-10 h-10 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h4 class="text-xl font-semibold text-gray-900 mb-3">
|
||||
Комментарии доступны только авторизованным пользователям
|
||||
</h4>
|
||||
|
||||
<a
|
||||
href={currentPath()}
|
||||
class="inline-flex items-center gap-2 px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-xl transition-colors shadow-lg shadow-blue-200"
|
||||
class="inline-flex items-center justify-center font-semibold transition-all duration-300 rounded-md cursor-pointer px-6 py-3 text-lg"
|
||||
style="background: linear-gradient(to bottom, #eac26e, #ce9f40); color: white; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);"
|
||||
>
|
||||
<svg
|
||||
class="w-5 h-5"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
|
||||
/>
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"/>
|
||||
</svg>
|
||||
Войти в аккаунт
|
||||
</a>
|
||||
|
||||
<p class="mt-4 text-sm text-gray-600">
|
||||
Нет аккаунта?{" "}
|
||||
<a
|
||||
href={`/auth/register?redirect=${encodeURIComponent(window.location.pathname)}`}
|
||||
class="text-blue-600 hover:text-blue-700 font-medium hover:underline"
|
||||
href={`/auth/sign-up?redirect=${encodeURIComponent(window.location.pathname)}`}
|
||||
class="font-medium hover:underline"
|
||||
style="color: #ce9f40;"
|
||||
>
|
||||
Зарегистрироваться
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue