ʚ My Sweet Escape ɞ

toffii.neocities.org

12,758 views
62 followers
803 updates
0 tips
Begging and pleading for somebody to teach me how to keep the same layout when switching tabs. I used to just update my index + sitemap individually, but omg... I don't want to go back to that... v.v
cozyamanda's avatar cozyamanda 45 minutes ago

i'm not 100% sure if it's applicable but i think you can achieve this with javascript. i believe i'm doing this on my site by flipping through the 'tabs' or different sections of my site. you can check the bottom of my index code if it's helpful. i hope someone else is able to chime in with more useful info!

1 like
toffii's avatar toffii 40 minutes ago

@cozyamanda Thank you, Amanda, for letting me looksie! 🥹 I'm going to do a lot of trial and error and see what I can come up with LOL!!

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 34 minutes ago

easiest beginner-friendly fix is to put your shared layout (header, nav, footer, etc.) in one JavaScript file so you only have to edit it once. Create a file called layout.js in your root folder and put something like this inside it:document.addEventListener("DOMContentLoaded", function () { if (!document.body.classList.contains("no-layout")) {

2 likes
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 33 minutes ago

document.body.insertAdjacentHTML("afterbegin", headerEl); document.body.insertAdjacentHTML("beforeend", footerEl); } });

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 32 minutes ago

const headerEl = ` <header> <!-- your header / nav HTML goes here --> <nav> <a href="/">Home</a> <a href="/about.html">About</a> <!-- etc --> </nav> </header> `;

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 32 minutes ago

const footerEl = ` <footer> <!-- your footer HTML goes here --> </footer> `;

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 31 minutes ago

Put all these lines in one .js. on every page, put this in the <head> (or just before the closing </body>): <script src="layout.js"></script>

1 like
chiisana-wasurenagusa's avatar chiisana-wasurenagusa 30 minutes ago

Just don't forget to put relative paths if you have any subfolders like I do.

1 like
Hi guys! Just wanted to let you all know that I have a new site button, so if you could change out my buttons, I'd appreciate it a lot! Thank you and I'm sorry for the inconvenience! 🥹🫶🏼 I also want to say how grateful I am to Valentinely for drawing it for me!
9 likes
deerdear's avatar deerdear 1 day ago

omg that is SOO cute!!

1 like
spotties's avatar spotties 21 hours ago

Thank you for notice! :D ill try to remember to update your button

1 like
junkdrawergarden's avatar junkdrawergarden 20 hours ago

adorable!! just changed it out <3

1 like
toffii's avatar toffii 18 hours ago

Thank you guys so much!! 🫶🏼

toffii updated their site.
1 day ago
4 likes
toffii updated their site.
4 days ago
6 likes
oktober's avatar oktober 2 days ago

I love the idea of a microblog ~ yours is so cute!

1 like
toffii's avatar toffii 1 day ago

@oktober Thank you so much, you're too kind! 😭 I really love having a microblog! It kind of takes some pressure off of writing since you just write whatever ya want!! Definitely recommend! 🫶🏼

your site is SO cute + Shawshank Redemption mention (such a good movie)!! really excited to see more from you! ♡
1 like
mellimallows's avatar mellimallows 2 days ago

thank you ! your site is so cute too ❤️

1 like
toffii updated their site.
1 week ago
8 likes
toffii's avatar toffii 1 week ago

Updated my credits page! As always, if anybody sees anything that needs to be credited, /please/ let me know! I don't mean to use anything improperly. <3

3 likes
toffii updated their site.
1 week ago
6 likes

Website Stats

Last updated 6 minutes ago
CreatedJan 21, 2025

Tags

personal blog pink cute cutecore