From e3da49fcbc2f8b1da8a13ab273bf48836c1897b4 Mon Sep 17 00:00:00 2001
From: Keegan Rankin <keegan@agaric.coop>
Date: Thu, 3 Oct 2024 14:01:46 -0700
Subject: [PATCH] Allow mastodon embeds to display properly

Ref #125
---
 web/themes/custom/geofresco/src/global/_content.scss           | 3 +++
 .../custom/geofresco/src/global/js/responsive-iframes.js       | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/web/themes/custom/geofresco/src/global/_content.scss b/web/themes/custom/geofresco/src/global/_content.scss
index 6b89080..f7df403 100644
--- a/web/themes/custom/geofresco/src/global/_content.scss
+++ b/web/themes/custom/geofresco/src/global/_content.scss
@@ -6,4 +6,7 @@
 iframe {
   width: 100%;
   height: 100%;
+  &.mastodon-embed {
+    height: revert-layer;
+  }
 }
diff --git a/web/themes/custom/geofresco/src/global/js/responsive-iframes.js b/web/themes/custom/geofresco/src/global/js/responsive-iframes.js
index d28ba1d..d44de87 100644
--- a/web/themes/custom/geofresco/src/global/js/responsive-iframes.js
+++ b/web/themes/custom/geofresco/src/global/js/responsive-iframes.js
@@ -8,7 +8,7 @@
   'use strict';
 
   // Find all iframes
-  var $iframes = $( "iframe" );
+  var $iframes = $( "iframe" ).not(".mastodon-embed");
 
   // Find and save the aspect ratio for all iframes
   $iframes.each(function () {