oh god how did this get here i am not good with computer

 


 

Background music:
Click here because I can't put an audio widget in the profile

 

The scenes with the shark are usually very intense and disturbing.

 

I use Arch BTW

 

Fun fact: Neo-Nazi dipshit cartoonist Stonetoss is in fact Hans Kristian Graebener of Spring, Texas


caro
@caro

im working on my neocities page and im wondering if theres a way to use html or whatnot to make, like... templates? a 'master key' piece of html i can then insert on other pages, and change that master copy to change all of them? i want to make a header that i can edit without having to edit every page


DecayWTF
@DecayWTF

HTML doesn't really have a good mechanism for doing includes like that unfortunately; it was a major application of frames and server-side includes back in the day. If you want to do something like that you probably want to use a static site generator that gives you more options for page assembly... Neocities has some recommendations on their tutorials page


You must log in to comment.

in reply to @caro's post:

I should preface this by saying I know very little about webdev stuff, and have only learned bits and pieces here and there, especially by making little sites on neocities, but:

I've been using javascript to do this (something I learned was possible bc my chosen site template Zonelets does this) for my nav/footer stuff.

You can learn more by digging into the Zonelets files, but basically you're putting all the info you want to be able to change in the script.js file, defining parameters for it in your css (or probably just your html if you want?), and then calling your script file in the html.

That probably isn't the best explanation, but hopefully gives you a direction to investigate! Good luck!

yes! you can use jquery!

put this in your html, along with a <div> you want to replace with an id!

<script src="https://code.jquery.com/jquery-3.6.0.min.js"
			  integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
			  crossorigin="anonymous"></script>
        <script src="/load.js"></script>

then just put this in load.js!

$(function(){
      $("#your id here").load("link to your template html");
});

in reply to @DecayWTF's post: