styling fixes
This commit is contained in:
@@ -209,6 +209,7 @@
|
|||||||
transition-duration: 500ms;
|
transition-duration: 500ms;
|
||||||
syntax: "*";
|
syntax: "*";
|
||||||
inherits: false;
|
inherits: false;
|
||||||
|
scrollbar-gutter: stable;
|
||||||
}
|
}
|
||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ function AppLayout(props: { children: any }) {
|
|||||||
<>
|
<>
|
||||||
<div class="flex max-w-screen flex-row">
|
<div class="flex max-w-screen flex-row">
|
||||||
<LeftBar />
|
<LeftBar />
|
||||||
<div class="bg-base relative h-screen w-screen overflow-x-hidden overflow-y-scroll md:ml-62.5 md:w-[calc(100vw-500px)]">
|
<div class="bg-base relative h-screen w-screen overflow-x-hidden overflow-y-auto md:ml-62.5 md:w-[calc(100vw-500px)]">
|
||||||
<noscript>
|
<noscript>
|
||||||
<div class="bg-yellow text-crust border-text fixed top-0 z-150 border-b-2 p-4 text-center font-semibold md:w-[calc(100vw-500px)]">
|
<div class="bg-yellow text-crust border-text fixed top-0 z-150 border-b-2 p-4 text-center font-semibold md:w-[calc(100vw-500px)]">
|
||||||
JavaScript is disabled. Features will be limited.
|
JavaScript is disabled. Features will be limited.
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export function RightBarContent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function LeftBar() {
|
export function LeftBar() {
|
||||||
const { leftBarSize, leftBarVisible, setLeftBarVisible } = useBars();
|
const { leftBarVisible, setLeftBarVisible } = useBars();
|
||||||
let ref: HTMLDivElement | undefined;
|
let ref: HTMLDivElement | undefined;
|
||||||
|
|
||||||
const [recentPosts, setRecentPosts] = createSignal<any[] | undefined>(
|
const [recentPosts, setRecentPosts] = createSignal<any[] | undefined>(
|
||||||
@@ -293,14 +293,14 @@ export function LeftBar() {
|
|||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
ref={ref}
|
ref={ref}
|
||||||
aria-label="Main navigation"
|
aria-label="Main navigation"
|
||||||
class="border-r-overlay2 bg-base fixed z-50 h-dvh w-min border-r-2 transition-transform duration-500 ease-out"
|
class="border-r-overlay2 bg-base fixed z-50 h-dvh border-r-2 transition-transform duration-500 ease-out"
|
||||||
classList={{
|
classList={{
|
||||||
"-translate-x-full": !leftBarVisible(),
|
"-translate-x-full": !leftBarVisible(),
|
||||||
"translate-x-0": leftBarVisible()
|
"translate-x-0": leftBarVisible()
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
||||||
"min-width": "250px",
|
width: "250px",
|
||||||
"box-shadow": "inset -6px 0 16px -6px rgba(0, 0, 0, 0.1)",
|
"box-shadow": "inset -6px 0 16px -6px rgba(0, 0, 0, 0.1)",
|
||||||
"padding-top": "env(safe-area-inset-top)",
|
"padding-top": "env(safe-area-inset-top)",
|
||||||
"padding-bottom": "env(safe-area-inset-bottom)"
|
"padding-bottom": "env(safe-area-inset-bottom)"
|
||||||
@@ -477,14 +477,14 @@ export function RightBar() {
|
|||||||
<aside
|
<aside
|
||||||
ref={ref}
|
ref={ref}
|
||||||
aria-label="Links and activity"
|
aria-label="Links and activity"
|
||||||
class="border-l-overlay2 bg-base fixed right-0 z-50 hidden h-dvh w-fit border-l-2 transition-transform duration-500 ease-out md:block md:max-w-[20%]"
|
class="border-l-overlay2 bg-base fixed right-0 z-50 hidden h-dvh w-fit border-l-2 transition-transform duration-500 ease-out md:block"
|
||||||
classList={{
|
classList={{
|
||||||
"translate-x-full": !rightBarVisible(),
|
"translate-x-full": !rightBarVisible(),
|
||||||
"translate-x-0": rightBarVisible()
|
"translate-x-0": rightBarVisible()
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
||||||
"min-width": "250px",
|
width: "250px",
|
||||||
"box-shadow": "inset 6px 0 16px -6px rgba(0, 0, 0, 0.1)",
|
"box-shadow": "inset 6px 0 16px -6px rgba(0, 0, 0, 0.1)",
|
||||||
"padding-top": "env(safe-area-inset-top)",
|
"padding-top": "env(safe-area-inset-top)",
|
||||||
"padding-bottom": "env(safe-area-inset-bottom)"
|
"padding-bottom": "env(safe-area-inset-bottom)"
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
import {
|
import { createSignal, createEffect, For, Show } from "solid-js";
|
||||||
createSignal,
|
|
||||||
createEffect,
|
|
||||||
For,
|
|
||||||
Show,
|
|
||||||
onMount,
|
|
||||||
onCleanup
|
|
||||||
} from "solid-js";
|
|
||||||
import { useLocation } from "@solidjs/router";
|
|
||||||
import type {
|
import type {
|
||||||
CommentBlockProps,
|
CommentBlockProps,
|
||||||
CommentReaction,
|
CommentReaction,
|
||||||
@@ -23,8 +15,6 @@ import CommentInputBlock from "./CommentInputBlock";
|
|||||||
import ReactionBar from "./ReactionBar";
|
import ReactionBar from "./ReactionBar";
|
||||||
|
|
||||||
export default function CommentBlock(props: CommentBlockProps) {
|
export default function CommentBlock(props: CommentBlockProps) {
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
const [commentCollapsed, setCommentCollapsed] = createSignal(false);
|
const [commentCollapsed, setCommentCollapsed] = createSignal(false);
|
||||||
const [showingReactionOptions, setShowingReactionOptions] =
|
const [showingReactionOptions, setShowingReactionOptions] =
|
||||||
createSignal(false);
|
createSignal(false);
|
||||||
@@ -92,6 +82,8 @@ export default function CommentBlock(props: CommentBlockProps) {
|
|||||||
|
|
||||||
const deleteCommentTrigger = async (e: MouseEvent) => {
|
const deleteCommentTrigger = async (e: MouseEvent) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
console.log("Delete comment");
|
||||||
|
|
||||||
setDeletionLoading(true);
|
setDeletionLoading(true);
|
||||||
const user = userData();
|
const user = userData();
|
||||||
props.toggleModification(
|
props.toggleModification(
|
||||||
@@ -270,7 +262,7 @@ export default function CommentBlock(props: CommentBlockProps) {
|
|||||||
|
|
||||||
{/* Delete button */}
|
{/* Delete button */}
|
||||||
<Show when={canDelete()}>
|
<Show when={canDelete()}>
|
||||||
<button onClick={deleteCommentTrigger}>
|
<button class="z-100" onClick={deleteCommentTrigger}>
|
||||||
<Show
|
<Show
|
||||||
when={!deletionLoading()}
|
when={!deletionLoading()}
|
||||||
fallback={<LoadingSpinner height={24} width={24} />}
|
fallback={<LoadingSpinner height={24} width={24} />}
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ export default function CommentDeletionPrompt(
|
|||||||
} else if (fullDeleteChecked()) {
|
} else if (fullDeleteChecked()) {
|
||||||
deleteType = "database";
|
deleteType = "database";
|
||||||
}
|
}
|
||||||
console.log("[CommentDeletionPrompt] Calling deleteComment:", {
|
|
||||||
commentID: props.commentID,
|
|
||||||
commenterID: props.commenterID,
|
|
||||||
deleteType
|
|
||||||
});
|
|
||||||
props.deleteComment(props.commentID, props.commenterID, deleteType);
|
props.deleteComment(props.commentID, props.commenterID, deleteType);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,7 +50,7 @@ export default function CommentDeletionPrompt(
|
|||||||
id="delete_prompt"
|
id="delete_prompt"
|
||||||
class="fade-in bg-red rounded-md px-8 py-4 shadow-lg brightness-110"
|
class="fade-in bg-red rounded-md px-8 py-4 shadow-lg brightness-110"
|
||||||
>
|
>
|
||||||
<button class="absolute right-4" onClick={() => {}}>
|
<button class="fixed right-4" onClick={() => props.onClose()}>
|
||||||
<Xmark strokeWidth={0.5} color="white" height={50} width={50} />
|
<Xmark strokeWidth={0.5} color="white" height={50} width={50} />
|
||||||
</button>
|
</button>
|
||||||
<div class="py-4 text-center text-3xl tracking-wide">
|
<div class="py-4 text-center text-3xl tracking-wide">
|
||||||
|
|||||||
@@ -645,6 +645,10 @@ export default function CommentSectionWrapper(
|
|||||||
privilegeLevel={props.privilegeLevel}
|
privilegeLevel={props.privilegeLevel}
|
||||||
commentDeletionLoading={commentDeletionLoading()}
|
commentDeletionLoading={commentDeletionLoading()}
|
||||||
deleteComment={deleteComment}
|
deleteComment={deleteComment}
|
||||||
|
onClose={() => {
|
||||||
|
setShowingDeletionPrompt(false);
|
||||||
|
clearModificationPrompt();
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
@@ -659,6 +663,10 @@ export default function CommentSectionWrapper(
|
|||||||
commenterDisplayName={commenterDisplayNameForModification()}
|
commenterDisplayName={commenterDisplayNameForModification()}
|
||||||
editCommentLoading={editCommentLoading()}
|
editCommentLoading={editCommentLoading()}
|
||||||
editComment={editComment}
|
editComment={editComment}
|
||||||
|
onClose={() => {
|
||||||
|
setShowingCommentEdit(false);
|
||||||
|
clearModificationPrompt();
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default function EditCommentModal(props: EditCommentModalProps) {
|
|||||||
id="edit_prompt"
|
id="edit_prompt"
|
||||||
class="fade-in bg-surface1 z-50 rounded-md px-8 py-4 shadow-lg"
|
class="fade-in bg-surface1 z-50 rounded-md px-8 py-4 shadow-lg"
|
||||||
>
|
>
|
||||||
<button class="absolute right-4" onClick={() => {}}>
|
<button class="absolute right-4" onClick={() => props.onClose()}>
|
||||||
<Xmark
|
<Xmark
|
||||||
strokeWidth={0.5}
|
strokeWidth={0.5}
|
||||||
color="var(--color-text)"
|
color="var(--color-text)"
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ export default function PostPage() {
|
|||||||
return tagValue ? (
|
return tagValue ? (
|
||||||
<A
|
<A
|
||||||
href={`/blog?include=${encodeURIComponent(tagValue.split("#")[1])}`}
|
href={`/blog?include=${encodeURIComponent(tagValue.split("#")[1])}`}
|
||||||
class="group bg-rosewater relative m-1 h-fit w-fit rounded-xl px-2 py-1 text-sm transition-all duration-200 hover:brightness-110 active:scale-95"
|
class="group bg-teal relative m-1 h-fit w-fit rounded-xl px-2 py-1 text-sm transition-all duration-200 hover:brightness-110 active:scale-95"
|
||||||
>
|
>
|
||||||
<div class="text-white">{tagValue}</div>
|
<div class="text-white">{tagValue}</div>
|
||||||
</A>
|
</A>
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ export interface CommentDeletionPromptProps {
|
|||||||
deletionType: DeletionType
|
deletionType: DeletionType
|
||||||
) => void;
|
) => void;
|
||||||
commentDeletionLoading: boolean;
|
commentDeletionLoading: boolean;
|
||||||
|
onClose: () => void;
|
||||||
commenterImage?: string;
|
commenterImage?: string;
|
||||||
commenterEmail?: string;
|
commenterEmail?: string;
|
||||||
commenterDisplayName?: string;
|
commenterDisplayName?: string;
|
||||||
@@ -220,6 +221,7 @@ export interface EditCommentModalProps {
|
|||||||
commentBody: string;
|
commentBody: string;
|
||||||
editComment: (body: string, comment_id: number) => Promise<void>;
|
editComment: (body: string, comment_id: number) => Promise<void>;
|
||||||
editCommentLoading: boolean;
|
editCommentLoading: boolean;
|
||||||
|
onClose: () => void;
|
||||||
commenterImage?: string;
|
commenterImage?: string;
|
||||||
commenterEmail?: string;
|
commenterEmail?: string;
|
||||||
commenterDisplayName?: string;
|
commenterDisplayName?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user