click here for a plain text version
<?php
/*
    background-image styles..        v1.0
    NOTE: This MUST be included, usually via @@module@@ statements. It is /not/ called directly.
*/

if (isset($GLOBALS['site_scheme']['bg_img_front']) and !empty($GLOBALS['site_scheme']['bg_img_front'])) {
// if two background images are set, we layer them..
echo <<<CSS
body {
    background-image: url("%%bg_img_front%%"), url("%%bg_img%%");
    background-position: %%bg_img_front_pos%%, %%bg_img_pos%%;
    background-repeat: %%bg_img_front_repeat%%, %%bg_img_repeat%%;
    background-attachment: %%bg_img_front_attch%%, %%bg_img_attch%%;
}
CSS;
// only one background image is specified..
} else {
echo <<<CSS
body {
    background-image: url("%%bg_img%%");
    background-position: %%bg_img_pos%%;
    background-repeat: %%bg_img_repeat%%;
    background-attachment: %%bg_img_attch%%;
}
CSS;
}
// a mobile-specific background image has been set in the prefs..
if (isset($GLOBALS['site_scheme']['bg_img_mobile']) and !empty($GLOBALS['site_scheme']['bg_img_mobile'])) {
echo <<<CSS
@media screen and (max-width: 920px) {
    body {
        background-image: url(%%bg_img_mobile%%);
        background-position: %%bg_img_mobile_pos%%;
        background-repeat: %%bg_img_mobile_repeat%%;
        background-attachment: %%bg_img_mobile_attch%%;
    }
}
CSS;
}?>
back to the source menu
test

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!