test iframe
authorClaromes <claromes@hey.com>
Mon, 14 Aug 2023 22:27:09 +0000 (19:27 -0300)
committerClaromes <claromes@hey.com>
Mon, 14 Aug 2023 22:27:09 +0000 (19:27 -0300)
app.py

diff --git a/app.py b/app.py
index 717b545db3f3d3f4a27cc7521663f075781c98fc..7be3ca6719050df24aca1f6220869fa3a122495e 100644 (file)
--- a/app.py
+++ b/app.py
@@ -49,6 +49,10 @@ hide_streamlit_style = '''
         height: 0%;
         position: fixed;
     }
+    iframe {
+        background-color: #dddddd;
+        border-radius: 0.5rem;
+    }
 </style>
 '''
 
@@ -275,7 +279,7 @@ if query or handle:
                     st.error('Tweet has been deleted.')
 
                     # components.iframe(link, height=500, width=700)
-                    st.markdown('<iframe src="{}" loading="lazy" height=500 width=auto></iframe>'.format(link), unsafe_allow_html=True)
+                    st.markdown('<iframe srcdoc="Loading..." onload="this.removeAttribute(\'srcdoc\')" src="{}" loading="lazy" height=500 width="100%"></iframe>'.format(link), unsafe_allow_html=True)
 
                     st.divider()