Новые глобабальные правки

This commit is contained in:
Web-serfer 2026-04-18 21:07:30 +05:00
parent b5b31f8a88
commit 36a3d37ad3
8 changed files with 35 additions and 26 deletions

View file

@ -5,7 +5,9 @@ export default function CommentLock() {
onMount(() => {
const path = window.location.pathname;
setCurrentPath(`/auth/sign-in?redirect=${encodeURIComponent(path)}`);
const hash = window.location.hash;
const redirectTo = hash ? `${path}${hash}` : path;
setCurrentPath(`/auth/sign-in?redirect=${encodeURIComponent(redirectTo)}`);
});
return (
@ -23,7 +25,7 @@ export default function CommentLock() {
>
<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%);"
style="background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 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"/>
@ -36,7 +38,7 @@ export default function CommentLock() {
<a
href={currentPath()}
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);"
style="background: linear-gradient(to bottom, #2563eb, #1e40af); color: white; box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);"
>
<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"/>
@ -48,7 +50,7 @@ export default function CommentLock() {
<a
href={`/auth/sign-up?redirect=${encodeURIComponent(window.location.pathname)}`}
class="font-medium hover:underline"
style="color: #ce9f40;"
style="color: #2563eb;"
>
Зарегистрироваться
</a>

View file

@ -1,12 +0,0 @@
---
import Comments from "./Comments";
import type { Props as BaseProps } from "../../../types/comments";
interface Props extends BaseProps {
postSlug: string;
}
const { postSlug } = Astro.props;
---
<Comments postSlug={postSlug} client:load />

View file

@ -1,7 +1,7 @@
import { createSignal, For, Show, onMount } from "solid-js";
import CommentLock from "./CommentLock";
import CommentForm from "./CommentForm";
import type { CommentWithReplies } from "../../types/comments";
import type { CommentWithReplies } from "../../../types/comments";
interface CommentsProps {
postSlug: string;