Skip to content

Instantly share code, notes, and snippets.

@toddprouty
Created August 25, 2023 09:59
Show Gist options
  • Select an option

  • Save toddprouty/42a1572fe1cde69be3986ccd3662065b to your computer and use it in GitHub Desktop.

Select an option

Save toddprouty/42a1572fe1cde69be3986ccd3662065b to your computer and use it in GitHub Desktop.

Revisions

  1. toddprouty created this gist Aug 25, 2023.
    5 changes: 5 additions & 0 deletions map-embed.twig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    {# 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>