Nice work on this. Just so you know, HubL is processed on the server before the browser gets it's paws on the css, and the HubL is gone by then, so simply wrapping the background attribute of your css in your if statement would clean up your code considerably. Right now you are repeating redundant css.
I wouldn't consider myself to be the most design savvy programmer (by far) but I think I can offer a pretty decent suggestion for your situation.
I would create a series of if statments to change the urls in a variable's value:
If you want to make this more dynamic, like having the ability to change the images, per industy, per page you can use Image fields, export their data to the template's context, and set their src values to the banner_bg variable in the appropriate condition:
Set a default value to the image modules in your template, and on the page you have the option to change the images. The src values will assign to the banner_bg variable based on your conditions.
Nice work on this. Just so you know, HubL is processed on the server before the browser gets it's paws on the css, and the HubL is gone by then, so simply wrapping the background attribute of your css in your if statement would clean up your code considerably. Right now you are repeating redundant css.
I wouldn't consider myself to be the most design savvy programmer (by far) but I think I can offer a pretty decent suggestion for your situation.
I would create a series of if statments to change the urls in a variable's value:
If you want to make this more dynamic, like having the ability to change the images, per industy, per page you can use Image fields, export their data to the template's context, and set their src values to the banner_bg variable in the appropriate condition:
Set a default value to the image modules in your template, and on the page you have the option to change the images. The src values will assign to the banner_bg variable based on your conditions.