On 7/10/2014 2:28 PM, Adam D. Ruppe wrote:
On Thursday, 10 July 2014 at 18:05:35 UTC, Nick Sabalausky wrote:
Common headers, common footers, common CSS imports, etc.

The way I do it is every html file is a full tree, so there isn't really
a common header/footer and instead a common skeleton. So we'd have

skeleton.html
<html><head> all that stuff </head>
<body>
   header
   <div id="content-container"></div>
   footer
</body></html>

All as a single file. Then each page would be a file that contains a div
and the content.

To view a whole page, you simply paste that code into the
#content-container on the main page, which can be done with a javascript
request easily enough, or just plain text editor copy/paste, and move it
back into the independent file when finished with it.


Hmm, a little more manual-effort than I'd have hoped for, although maybe, as you suggest, JS can be used to improve that. Hadn't thought of that.

Reply via email to