gargoyle icon indicating copy to clipboard operation
gargoyle copied to clipboard

Make the header/footer file modular using theme folder

Open stopspazzing opened this issue 8 years ago • 2 comments

I'm still working out the nitty gritty, but adding the ability for people to customize the front-end by making the header/footer file pull "sections" of code from specific locations of a theme would be amazing.

Example as I envision it: In header footer pull for "head section" from themes folder file name is head.sh

Other file names would be obvious in naming: body.sh footer.sh

Should be a javascript folder that gets auto loaded, and same with a css folder. Javascript can and should typically be loaded before closing

tag for faster page loading.

So all themes as I envision, would be like this starting from theme folder:

mytheme/js/custom.js
mytheme/css/style.css
mytheme/images/awesome-logo.jpg
mytheme/head.sh
mytheme/header.sh
mytheme/body.sh
mytheme/footer.sh

Both header and footer are located in body, so body.sh calls them. This will make it easier to manage a theme for people. At a minimum head.sh and body.sh would be required.

Also might be nice to be able to override the default .sh files above the theme folder, so a way to do that is to create the same named file in the theme folder and have it parse for it first then fall back to default.

Example:

mytheme/overview.sh would override the default overview.sh.

stopspazzing avatar Jun 04 '16 03:06 stopspazzing

@lantis1008 Was this implemented so I can close this?

stopspazzing avatar Dec 30 '20 01:12 stopspazzing

No it was never done. It seems a bit of a pipe dream to be honest. I can't see huge benefits.

lantis1008 avatar Dec 30 '20 01:12 lantis1008