Skip to content

Commit

Permalink
Fix url preview
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sumi-k committed Apr 9, 2024
1 parent f6e641f commit 5f09a44
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 5f09a44

Please sign in to comment.