Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @102.52
Activity rating: Three Stars Posts & Arts: 44/1k.beats ~ Boop! The forum will close in 898.beats! Random | Recent Posts | Guild Recents
News: :skull: Websites are like whispers in the night  :skull: Guild Events: There are no events!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  How to make complex layout


« previous next »
Pages: [1] Print Embed
Author Topic: How to make complex layout  (Read 396 times)
CinPunk
Casual Poster ⚓︎
*
View Profile WWW


:3
⛺︎ My Room
iMood: CinPunk
Matrix: Chat!
Itch.io: My Games

Guild Memberships:
Artifacts:
First 1000 Members!Joined 2023!
« on: a Spring day » Embed

Hiya guyz :3. It's been more than a year since I touched my website and a lot changend. I want to refresh it to the ground up ( and make it work since is janky lanky af  :ha: ) and I wanted to make it maximalist ( I've been thinking of drawing all the single parts and put them togheter for a long time ). I've read that you need the iframe for maintaing the same page but changing the content of a specific part, like having the same layout but the content of the body changes when you click over the sidebar for seein the "gallery", for example. Someone did something similar? I wonder what's the best method to put it up and how to scale the different part so it doesn't break ( making it responsive is going to be something else lol )

Logged

:3
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #1 on: a Spring day » Embed

Iframes: An iframe could work, but has knock-on effects like being slower loading (more HTTP round-trips), much harder to make responsive (suitable for a wider variety of screen widths), and making more work to ensure that links in-iframes open in the right place (whole page, other subframe, or whatever). Personally, I'm not a fan of iframes, but I appreciate that they might be the least-bad solution for some people, some of the time.

Single pages: The gold standard from a user perspective is, of course, to deliver all the HTML the visitor needs in a single request. I've described some of the different ways to do this before, but the essence of it is that you either need big HTML files (and manage copy-pasting shared elements between them yourself) or some kind of process that makes those big HTML files from small pieces (e.g. using a Static Site Generator [SSG], or else something running on the server side like SSI [which is available on Nekoweb!], PHP, or similar). All of these are fantastic options, but not all of them are available to everybody, and some of them aren't suitable for some folks, which collectively might mean they're a no-go for you.

<embed-html> or similar: The limitations of the approaches above are what inspired me to create <embed-html>, which I think is a good middle-ground approach that gets some of the best of both worlds. Bear in mind that I'm biased! It introduces a JavaScript dependency, which is its weakest point, but there are ways by which you can partially-mitigate that. The short of it is that you load a JavaScript file and then add e.g. this code anywhere on a page, and it dynamically loads the "other" HTML snippet and includes it inside this one:


Code
<embed-html src="embedded-content.html" cache></embed-html>

It's simple and fast and I think more people should consider it as an alternative to iframes, where using an SSG or SSI isn't feasible. But again, I'm biased. Anyway: if you want to try it then it's got its own website to explain it or I'm happy to provide a more-concrete example. You can see a toy example of it working at embed-html.neocities.org where the menu bar is shared between all of the pages.

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net