I am making a new little web site. Each page has it's own css/js files
apart. I want to include any of that css/js files on the application
layout depending on wich page will be loaded. For example if "upload"
page will be loaded, the application layout should just include the
"upload.css" and the "upload.js".
I tryed, using an if-else aproach so, using if stataments in the app
layout i just load the files i need, for example:
if @page == "upload"
# include upload.cc
I think this aproach is kinda ugly, so i used another one, in this
case, i made multiple layouts for any of the pages i need to load, but
this aproach will repeat a lot of my html code, for example: header
and footer will be the same on each page, so making a change in any of
these parts will require to modify all the pages layouts that i have,
this is too much work.
Any ideas of how can i solve this? (is there any other way to do this)