From f88ebca23b57f64bcd0b82cc0deda62cc24e1955 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Wed, 30 Jul 2025 16:32:01 +0330 Subject: [PATCH] =?UTF-8?q?=D8=A8=D9=87=D8=A8=D9=88=D8=AF=20=DA=A9=D8=A7?= =?UTF-8?q?=D9=85=D9=BE=D9=88=D9=86=D9=86=D8=AA=E2=80=8C=D9=87=D8=A7=DB=8C?= =?UTF-8?q?=20personality=20=D9=88=20=D8=A8=D8=B1=D9=88=D8=B2=D8=B1=D8=B3?= =?UTF-8?q?=D8=A7=D9=86=DB=8C=20export=20HTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personality/components/ContentSection.tsx | 8 +++--- .../personality/components/FooterSection.tsx | 6 ++--- .../personality/components/HeaderSection.tsx | 2 +- .../setting/personality/utils/ExportHTML.ts | 26 ++++++------------- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/pages/setting/personality/components/ContentSection.tsx b/src/pages/setting/personality/components/ContentSection.tsx index 47d0cd4..cf713f5 100644 --- a/src/pages/setting/personality/components/ContentSection.tsx +++ b/src/pages/setting/personality/components/ContentSection.tsx @@ -17,7 +17,7 @@ const ContentSection: FC = () => { if (!data || !data.content) { return ( - +
در حال بارگذاری...
@@ -86,7 +86,7 @@ const ContentSection: FC = () => { return ( handleSectionClick(SectionName.CONTENT, e)}> - + { data.content.columnsCount > 0 ? @@ -178,7 +178,7 @@ const ContentSection: FC = () => { - @@ -83,7 +83,7 @@ const FooterSection: FC = () => { return ( handleSectionClick(SectionName.FOOTER, e)}> -
0 ? "203" : "230"} - align={item?.texts?.[0]?.alignment || 'center'} + align={item?.texts?.[0]?.alignment || 'right'} valign={item?.texts?.[0]?.verticalAlignment === VerticalAlignment.TOP ? 'top' : item?.texts?.[0]?.verticalAlignment === VerticalAlignment.BOTTOM ? 'bottom' : 'middle'} style={{ @@ -255,7 +255,7 @@ const ContentSection: FC = () => { height: '286px', border: activeSection === SectionName.CONTENT ? '1px dashed #0038FF' : '1px dashed #E5E7EB', borderRadius: '24px', - textAlign: 'center', + textAlign: 'right', verticalAlign: 'middle', padding: '10px', cursor: 'pointer' diff --git a/src/pages/setting/personality/components/FooterSection.tsx b/src/pages/setting/personality/components/FooterSection.tsx index 11f768a..226bae3 100644 --- a/src/pages/setting/personality/components/FooterSection.tsx +++ b/src/pages/setting/personality/components/FooterSection.tsx @@ -17,7 +17,7 @@ const FooterSection: FC = () => { if (!data || !data.footer) { return (
+
در حال بارگذاری...
+ { data.footer.columnsCount > 0 ? @@ -118,7 +118,7 @@ const FooterSection: FC = () => { backgroundRepeat: item?.style?.backgroundRepeat || 'no-repeat', backgroundPosition: item?.style?.backgroundPosition || 'center', cursor: 'pointer', - padding: '8px', + // padding: '8px', verticalAlign: 'top', borderRadius: '8px', position: 'relative' diff --git a/src/pages/setting/personality/components/HeaderSection.tsx b/src/pages/setting/personality/components/HeaderSection.tsx index e7a00db..843dc8b 100644 --- a/src/pages/setting/personality/components/HeaderSection.tsx +++ b/src/pages/setting/personality/components/HeaderSection.tsx @@ -120,7 +120,7 @@ const HeaderSection: FC = () => { backgroundRepeat: item?.style?.backgroundRepeat || 'no-repeat', backgroundPosition: item?.style?.backgroundPosition || 'center', cursor: 'pointer', - padding: '8px', + // padding: '8px', verticalAlign: 'top', borderRadius: '8px', position: 'relative' diff --git a/src/pages/setting/personality/utils/ExportHTML.ts b/src/pages/setting/personality/utils/ExportHTML.ts index f6e0a65..263961e 100644 --- a/src/pages/setting/personality/utils/ExportHTML.ts +++ b/src/pages/setting/personality/utils/ExportHTML.ts @@ -48,7 +48,7 @@ export const exportPersonalityToHTML = async ( `
- - -
+ ${
           image.alt ||
+ @@ -336,22 +336,12 @@ export const exportPersonalityToHTML = async ( : "67"; result += ` - @@ -409,7 +399,7 @@ export const exportPersonalityToHTML = async (
+ ${renderTexts(item?.texts || [])} ${renderImages(item?.images || [])} ${ isContentSection - ? '
{{content}}
' + ? '
{{content}}
' : "" }
+ }; border-radius: 24px; text-align: right; vertical-align: middle; padding: 0px;">
${emptyMessage}
@@ -427,8 +417,8 @@ export const exportPersonalityToHTML = async ( ${renderSection(data.header, "123px")} - ${renderSection(data.content, "246px", "16px", true)} - ${renderSection(data.footer, "123px", "16px")} + ${renderSection(data.content, "246px", "", true)} + ${renderSection(data.footer, "123px", "")}
`;