Created
August 25, 2023 09:59
-
-
Save toddprouty/42a1572fe1cde69be3986ccd3662065b to your computer and use it in GitHub Desktop.
Responsive map embed inserted with a variable and styled with Tailwind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Map Embed #} | |
{# Twig is the templating language used in this example, but these Tailwind classes could be used with any platform where the `iframe` is inserted via a variable. Apply them to the parent element of the iframe. #} | |
<div class="[&>iframe]:aspect-[5/4] [&>iframe]:w-full [&>iframe]:h-auto"> | |
{{ entry.mapEmbed|raw }} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment