gargoyle
gargoyle copied to clipboard
Make the header/footer file modular using theme folder
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
.
@lantis1008 Was this implemented so I can close this?
No it was never done. It seems a bit of a pipe dream to be honest. I can't see huge benefits.