Skip to content

Instantly share code, notes, and snippets.

@toddprouty
Created August 25, 2023 09:59
Show Gist options
  • Save toddprouty/42a1572fe1cde69be3986ccd3662065b to your computer and use it in GitHub Desktop.
Save toddprouty/42a1572fe1cde69be3986ccd3662065b to your computer and use it in GitHub Desktop.
Responsive map embed inserted with a variable and styled with Tailwind
{# 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