styling for without image

This commit is contained in:
cupcakearmy 2020-12-29 20:57:04 +01:00
parent 80cbf9790c
commit c255ea209a
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -8,7 +8,7 @@
<style> <style>
a { a {
display: block; display: block;
margin-bottom: 6em; margin-bottom: 5em;
} }
a > :global(img) { a > :global(img) {
height: 12em; height: 12em;
@ -33,9 +33,16 @@
a:hover > :global(div) { a:hover > :global(div) {
opacity: 0; opacity: 0;
} }
a.without {
border: 2px solid var(--clr-primary);
padding: 5%;
width: calc(100% + 10%);
transform: translateX(-5%);
}
</style> </style>
<a href={`blog/${post.slug}`}> <a href={`blog/${post.slug}`} class:without={!post.featured}>
{#if post.featured} {#if post.featured}
<ImageFrame src={post.featured.url} alt={post.featured.description} /> <ImageFrame src={post.featured.url} alt={post.featured.description} />
{/if} {/if}