Replies: 5 comments
-
I think the main intention was to use it on landing pages, so it's possible that using the cover in the docs is not widely tested. But after a quick check it seems to work for me, if use it within the page is what you want (you might want to wrap the shortcode in a div so you can adjust the margins). |
Beta Was this translation helpful? Give feedback.
-
<div class="card-container">
{{% blocks/cover image_anchor="top" height="auto" %}}
{{% /blocks/cover %}}
</div> |
Beta Was this translation helpful? Give feedback.
-
Yes, I meant it like that, but just noticed that wrapping it in a div doesn't let you adjust the margins within the shortcode, so you'll have to override them with a more direct css selector. (Something like But how do you mean it's not working? In the samples you are showing you don't have any content within the cover shortcode, so it only creates an empty gray rectangle (unless you have a properly named image file in the same folder). |
Beta Was this translation helpful? Give feedback.
-
Because I like to insert images in the documentation/blog etc.. , I'm confused when using 'blocks/cover' because it doesn't generate style code. As for the image file issue, I wrote an API to fetch random images, and of course, I tested it on the homepage and other places without any problems. Haha, perhaps I need to make some modifications to better fit my usage. |
Beta Was this translation helpful? Give feedback.
-
Moving this thread to discussions. |
Beta Was this translation helpful? Give feedback.
-
I have some questions about using 'blocks/cover.' Can it be used in the documentation/blog
If it can be used in these places, I found that it didn't generate any
<style>
code.For example, it generates
<style>
code on the homepage, so it displaysBeta Was this translation helpful? Give feedback.
All reactions