client/posts: different approach for flash background

Something weird was happening during templating, it worked but would
surround the style attribute with %%%template1 and %%%template3
This commit is contained in:
Eva 2023-05-20 20:33:02 +02:00
parent dd56a3b529
commit 8f0981a3f3

View file

@ -1,4 +1,4 @@
<div class='post-content post-type-<%- ctx.post.type %>'<% if (ctx.post.type === 'flash') { %> style='background-image: url(<%- ctx.post.thumbnailUrl %>)'<% } %>>
<div class='post-content post-type-<%- ctx.post.type %>' style='<%- ctx.post.type === 'flash' ? 'background-image: url('+ctx.post.thumbnailUrl+')' : '' %>'>
<% if (['image', 'animation'].includes(ctx.post.type)) { %>
<img class='resize-listener' alt='' src='<%- ctx.post.contentUrl %>'/>