Skip to content

Commit 0079d4e

Browse files
author
Rajat
committed
Almost finished section backgrounds logic; Removed card layout from hero block
1 parent 20e2ffa commit 0079d4e

11 files changed

Lines changed: 642 additions & 443 deletions

File tree

apps/web/components/admin/page-editor/add-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function AddWidget({ pageType, onSelection, onClose }: WidgetsListProps) {
2121
.map((item, index) =>
2222
widgets[item].metadata.compatibleWith.includes(pageType) ? (
2323
<li
24-
className="flex items-center px-2 py-3 hover:!bg-slate-100 cursor-pointer justify-between"
24+
className="flex items-center px-2 py-3 hover:!bg-accent cursor-pointer justify-between"
2525
key={index}
2626
onClick={(e) => onSelection(item)}
2727
>

apps/web/components/admin/page-editor/index.tsx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -815,31 +815,6 @@ export default function PageEditor({
815815
</header>
816816
</div>
817817
<div className="flex w-full h-[calc(100vh-56px)] mt-14 gap-4 p-4 bg-muted/10">
818-
{leftPaneContent !== "none" && (
819-
<div className="w-[300px] rounded-xl border bg-background/98 backdrop-blur supports-[backdrop-filter]:bg-background/80 shadow-sm flex flex-col overflow-hidden">
820-
<PanelHeader
821-
title={
822-
leftPaneContent === "widgets"
823-
? EDIT_PAGE_ADD_WIDGET_TITLE
824-
: leftPaneContent === "editor"
825-
? "Edit Block"
826-
: leftPaneContent === "fonts"
827-
? "Fonts"
828-
: leftPaneContent === "theme"
829-
? "Theme"
830-
: leftPaneContent === "seo"
831-
? "SEO"
832-
: ""
833-
}
834-
onClose={onClose}
835-
/>
836-
<ScrollArea className="h-[calc(100%-56px)]">
837-
<div className="py-2 space-y-4">
838-
{activeSidePaneContent}
839-
</div>
840-
</ScrollArea>
841-
</div>
842-
)}
843818
<div
844819
className={cn(
845820
"rounded-xl border bg-background/98 backdrop-blur supports-[backdrop-filter]:bg-background/80 shadow-sm",
@@ -876,6 +851,31 @@ export default function PageEditor({
876851
</div>
877852
</ScrollArea>
878853
</div>
854+
{leftPaneContent !== "none" && (
855+
<div className="w-[300px] rounded-xl border bg-background/98 backdrop-blur supports-[backdrop-filter]:bg-background/80 shadow-sm flex flex-col overflow-hidden">
856+
<PanelHeader
857+
title={
858+
leftPaneContent === "widgets"
859+
? EDIT_PAGE_ADD_WIDGET_TITLE
860+
: leftPaneContent === "editor"
861+
? "Edit Block"
862+
: leftPaneContent === "fonts"
863+
? "Fonts"
864+
: leftPaneContent === "theme"
865+
? "Theme"
866+
: leftPaneContent === "seo"
867+
? "SEO"
868+
: ""
869+
}
870+
onClose={onClose}
871+
/>
872+
<ScrollArea className="h-[calc(100%-56px)]">
873+
<div className="py-2 space-y-4">
874+
{activeSidePaneContent}
875+
</div>
876+
</ScrollArea>
877+
</div>
878+
)}
879879
</div>
880880
</div>
881881
);
@@ -885,8 +885,8 @@ export default function PageEditor({
885885
<div className="flex flex-col gap-4 p-4">
886886
<Skeleton className="w-full h-16" />
887887
<div className="flex gap-4">
888-
<Skeleton className="w-1/4 h-90" />
889888
<Skeleton className="w-3/4 h-screen" />
889+
<Skeleton className="w-1/4 h-90" />
890890
</div>
891891
</div>
892892
);

apps/web/components/public/base-layout/template/editable-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const EditableWidget = ({
4141
onClick={() => onEditClick && onEditClick(item.widgetId)}
4242
className="relative cursor-pointer group"
4343
>
44-
<div className="absolute inset-0 flex items-center justify-center bg-black/30 opacity-0 group-hover:opacity-100 transition-opacity z-20">
44+
<div className="absolute inset-0 flex items-center justify-center bg-black/30 opacity-0 group-hover:opacity-100 transition-opacity z-30">
4545
<div className="text-white/90 border border-white/50 px-3 py-1.5 rounded text-sm font-medium">
4646
Click to update
4747
</div>

packages/components-library/src/page-builder-slider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function PageBuilderSlider({
1414
tooltip,
1515
className,
1616
allowsReset = false,
17+
unit = "px",
1718
}: {
1819
title: string;
1920
min: number;
@@ -23,6 +24,7 @@ export default function PageBuilderSlider({
2324
tooltip?: string;
2425
className?: string;
2526
allowsReset?: boolean;
27+
unit?: string;
2628
}) {
2729
return (
2830
<div className={`flex flex-col gap-2 ${className}`}>
@@ -54,10 +56,10 @@ export default function PageBuilderSlider({
5456
);
5557
onChange(clamped);
5658
}}
57-
className="h-7 w-16 rounded-md border px-2 py-1 text-xs text-center bg-gray-50"
59+
className="h-7 w-16 rounded-md border border-input bg-background px-2 py-1 text-xs text-center"
5860
/>
5961
<span className="text-xs text-muted-foreground">
60-
px
62+
{unit}
6163
</span>
6264
</div>
6365
</div>

0 commit comments

Comments
 (0)