padding mail and fix border

This commit is contained in:
hamid zarghami
2025-08-07 10:01:13 +03:30
parent 2a039c7e70
commit 521d53d1c8
@@ -442,12 +442,8 @@ export const exportPersonalityToHTML = async (
<tr>
<td style="padding: ${
section.padding || "0px"
}; margin: 0; border-radius: 24px; vertical-align: top; ${generateBorderStyle(
section.border
)}">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout: fixed; border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; ${generateBorderStyle(
section.border
)}">
}; margin: 0; border-radius: 24px; vertical-align: top;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout: fixed; border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;">
<tbody>
<tr>
${Array.from(
@@ -492,9 +488,7 @@ export const exportPersonalityToHTML = async (
};`
: ""
} padding: 0; vertical-align: top; border-radius: 8px; position: relative;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; height: ${sectionHeight}; ${generateBorderStyle(
section.border
)}">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; height: ${sectionHeight};">
<tbody>`;
// اگر محتوایی وجود دارد (متن، دکمه، تصویر، یا شبکه اجتماعی)
@@ -515,7 +509,7 @@ export const exportPersonalityToHTML = async (
item.buttons[0]
)}; vertical-align: ${getButtonVerticalAlign(
item.buttons[0]
)}; ${generateBorderStyle(section.border)}">
)};">
${renderImages(item?.images || [])}
${renderSocials(item?.socials || [])}
${
@@ -554,9 +548,7 @@ export const exportPersonalityToHTML = async (
: "middle"
: "middle";
result += `<tr>
<td width="100%" height="${mainHeight}" align="${textAlignment}" valign="${textVerticalAlignment}" style="padding: 20px; text-align: ${textAlignment}; vertical-align: ${textVerticalAlignment}; font-size: 15px; line-height: 1.8; ${generateBorderStyle(
section.border
)}">
<td width="100%" height="${mainHeight}" align="${textAlignment}" valign="${textVerticalAlignment}" style="padding: 4px; text-align: ${textAlignment}; vertical-align: ${textVerticalAlignment}; font-size: 15px; line-height: 1.8;">
${renderTexts(item?.texts || [])}
${renderImages(item?.images || [])}
${renderSocials(item?.socials || [])}
@@ -582,7 +574,7 @@ export const exportPersonalityToHTML = async (
item.buttons[0]
)}; vertical-align: ${getButtonVerticalAlign(
item.buttons[0]
)}; ${generateBorderStyle(section.border)}">
)};">
${renderButtons(item.buttons)}
</td>
</tr>`;
@@ -606,9 +598,7 @@ export const exportPersonalityToHTML = async (
30
);
result += `<tr>
<td width="100%" height="${emptyHeight}" style="padding: 20px; text-align: right; vertical-align: top; font-size: 15px; line-height: 1.8; ${generateBorderStyle(
section.border
)}">
<td width="100%" height="${emptyHeight}" style="padding: 4px; text-align: right; vertical-align: top; font-size: 15px; line-height: 1.8;">
<div style="margin: 0; text-align: right; color: #888; font-size: 14px;">{{content}}</div>
</td>
</tr>`;
@@ -665,7 +655,7 @@ export const exportPersonalityToHTML = async (
<tr>
<td style="height: ${displayHeight}; margin: 0; border-radius: 24px; text-align: right; vertical-align: middle; padding: ${
section.padding || "0px"
}; ${generateBorderStyle(section.border)}">
};">
<div style="color: #888; font-size: 14px; margin: 0; padding: 0;">
${emptyMessage}
</div>