So! Derek set us our way today to explore a little bit on iFrames. Now, what is that? The way I see it is a website within a website. Yes, I’m gonna say it. Websiteception. It allows you to sorta have a “one-page website” where you have all your links and the “viewport” within your website changes with each link clicked. So i’m not really being linked to a fresh new page, my “inner” website just changes.
One example thrown our way was the Substack iframe, which is a piece of code that allows us to embed the Substack sign up form into our websites! Pretty cool but a minor downside is that we can’t really change how it looks. They’re pretty set on that I guess *shrugs*.
My experience with is was pretty straightforward. My task was to embed the code into an HTML file. So I chose to do it in Codepen, along with my other assignment to create a 4-link 1 page website, and stuck the code in the contact sheet near the bottom. Here’s how that went:
Firstly I googled [Substack embed code] and I found instructions to do so. THEN,
1) Log into account and navigate to “Dashboard” settings
2) Scroll to “Import your list”
3) Find the HTML code under the “Embed email signup form on other websites” section
4) Copy and paste HTML in file
It was relatively easy and straightforward to do.
Here’s the code.
So I looked up “scrolling” and “style” because I noticed another pen in Codepen that had the code but without the two attributes. What I found out was that both “scrolling” and “frameborder” is obsolete. The resolution for that is to take out the scrolling attribute and refactor the code for frameborder to “border: none”
BEEP BEEP! Time’s up!
There's no easy way to customize the iframe from Substack. The only solution I was able to come up with was to change the width and height of the iframe until it cut off all the parts I didn't want to show.
This is a very very bad solution but Substack doesn't let you customize it at all, and I didn't want a giant ugly rectangle on the bottom of every page.
https://www.smallprojects.dev -- scroll down and look! I was able to force it to only the button 😎
Of course, I reach out to them - and explain all about the iframes non-match styles... and the problems with that / and offer my view of the solution: https://codepen.io/sheriffderek/pen/b35aa88d0da0e9943c2678c731826aee