Skip to content

Commit

Permalink
Merge pull request #154 from canopas/fix-url-preview
Browse files Browse the repository at this point in the history
Fix url preview
  • Loading branch information
cp-sumi-k authored Apr 9, 2024
2 parents f6e641f + 2050d5e commit 3c7e778
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions admin/src/api/post/content-types/post/lifecycles.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ async function generatePreview(event) {
box-shadow: rgb(242, 242, 242) 0px 0px 0px 1px inset;
"
>
<a href="${element.attributes.url.value}" target="_blank" style="text-decoration: none; ">
<a href="${
element.attributes.url.value
}" target="_blank" style="text-decoration: none; ">
<div style="display: flex">
<div
style="
Expand All @@ -269,7 +271,7 @@ async function generatePreview(event) {
-webkit-box-orient:vertical;
"
>
${data.title}
${data?.title || ""}
</h2>
<div style="margin-top: 8px">
<h3
Expand All @@ -285,7 +287,7 @@ async function generatePreview(event) {
-webkit-box-orient:vertical;
"
>
${data.description}
${data?.description || ""}
</h3>
</div>
<div>
Expand All @@ -300,14 +302,14 @@ async function generatePreview(event) {
text-overflow: ellipsis;
"
>
${data.domain}
${data?.domain || ""}
</p>
</div>
</div>
<div style="width: 160px">
<div
style="
background-image: url('${data.img}');
background-image: url('${data?.img || ""}');
background-position: 50% 50%;
height: 167px;
width: 160px;
Expand Down

0 comments on commit 3c7e778

Please sign in to comment.