コード例 #1
0
/**
 * Makes our changes to the CSS
 *
 * @param string $css
 * @param theme_config $theme
 * @return string
 */
function formal_white_user_settings($css, $theme)
{
    // Set the font reference size
    if (empty($theme->settings->fontsizereference)) {
        $fontsizereference = '13';
        // default
    } else {
        $fontsizereference = $theme->settings->fontsizereference;
    }
    $css = formal_white_set_fontsizereference($css, $fontsizereference);
    // Set the page header background color
    if (empty($theme->settings->headerbgc)) {
        $headerbgc = '#E3DFD4';
        // default
    } else {
        $headerbgc = $theme->settings->headerbgc;
    }
    $css = formal_white_set_headerbgc($css, $headerbgc);
    // Set the block content background color
    if (empty($theme->settings->blockcontentbgc)) {
        $blockcontentbgc = '#F6F6F6';
        // default
    } else {
        $blockcontentbgc = $theme->settings->blockcontentbgc;
    }
    $css = formal_white_set_blockcontentbgc($css, $blockcontentbgc);
    // Set the left block column background color
    if (empty($theme->settings->lblockcolumnbgc)) {
        $lblockcolumnbgc = '#E3DFD4';
        // default
    } else {
        $lblockcolumnbgc = $theme->settings->lblockcolumnbgc;
    }
    $css = formal_white_set_lblockcolumnbgc($css, $lblockcolumnbgc);
    // Set the right block column background color
    if (empty($theme->settings->rblockcolumnbgc)) {
        $rblockcolumnbgc = $lblockcolumnbgc;
        // default
    } else {
        $rblockcolumnbgc = $theme->settings->rblockcolumnbgc;
    }
    $css = formal_white_set_rblockcolumnbgc($css, $rblockcolumnbgc);
    // set the width of the two blocks columns
    if (!empty($theme->settings->blockcolumnwidth)) {
        $blockcolumnwidth = $theme->settings->blockcolumnwidth;
    } else {
        $blockcolumnwidth = '200';
        // default
    }
    $css = formal_white_set_blockcolumnwidth($css, $blockcolumnwidth);
    // set the customcss
    if (!empty($theme->settings->customcss)) {
        $customcss = $theme->settings->customcss;
    } else {
        $customcss = null;
    }
    $css = formal_white_set_customcss($css, $customcss);
    // Return the CSS
    return $css;
}
コード例 #2
0
ファイル: lib.php プロジェクト: nfreear/moodle
/**
 * Makes our changes to the CSS
 *
 * @param string $css
 * @param theme_config $theme
 * @return string
 */
function formal_white_user_settings($css, $theme) {

    // Set the page header background color
    if (empty($theme->settings->headerbgc)) {
        $headerbgc = '#E3DFD4'; // default (o forse è meglio #FEF9F6?)
    } else {
        $headerbgc = $theme->settings->headerbgc;
    }
    $css = formal_white_set_headerbgc($css, $headerbgc);

    // Set the block content background color
    if (empty($theme->settings->blockcontentbgc)) {
        $blockcontentbgc = '#F6F6F6'; // default (o forse è meglio #FEF9F6?)
    } else {
        $blockcontentbgc = $theme->settings->blockcontentbgc;
    }
    $css = formal_white_set_blockcontentbgc($css, $blockcontentbgc);

    // Set the block column background color
    if (empty($theme->settings->blockcolumnbgc)) {
        $blockcolumnbgc = '#E3DFD4'; // default
    } else {
        $blockcolumnbgc = $theme->settings->blockcolumnbgc;
    }
    $css = formal_white_set_blockcolumnbgc($css, $blockcolumnbgc);

    // Set the logo image
    if (!empty($theme->settings->logo)) {
        $logo = $theme->settings->logo;
    } else {
        $logo = null;
    }
    $css = formal_white_set_logo($css, $logo);

    // set the width of the two blocks colums
    if (!empty($theme->settings->blockcolumnwidth)) {
        $blockcolumnwidth = $theme->settings->blockcolumnwidth;
    } else {
        $blockcolumnwidth = '200'; // default
    }
    $css = formal_white_set_blockcolumnwidth($css, $blockcolumnwidth);

    // Return the CSS
    return $css;
}
コード例 #3
0
ファイル: lib.php プロジェクト: EmmanuelYupit/educursos
/**
 * Makes our changes to the CSS
 *
 * @param string $css
 * @param theme_config $theme
 * @return string
 */
function formal_white_user_settings($css, $theme)
{
    // Set the font reference size
    if (empty($theme->settings->fontsizereference)) {
        $fontsizereference = '13';
        // default
    } else {
        $fontsizereference = $theme->settings->fontsizereference;
    }
    $css = formal_white_set_fontsizereference($css, $fontsizereference);
    // Set the frame margin
    if (!isset($theme->settings->framemargin)) {
        $framemargin = 15;
        // default
    } else {
        $framemargin = $theme->settings->framemargin;
    }
    $css = formal_white_set_framemargin($css, $framemargin);
    // Set the images according to color trend
    if (!isset($theme->settings->trendcolor)) {
        $trendcolor = 'mink';
        // default
    } else {
        $trendcolor = $theme->settings->trendcolor;
    }
    $css = formal_white_set_trendcolor($css, $trendcolor);
    // Set the page header background color
    if (empty($theme->settings->headerbgc)) {
        $headerbgc = '#E3DFD4';
        // default
    } else {
        $headerbgc = $theme->settings->headerbgc;
    }
    $css = formal_white_set_headerbgc($css, $headerbgc);
    // Set the block content background color
    if (empty($theme->settings->blockcontentbgc)) {
        $blockcontentbgc = '#F6F6F6';
        // default
    } else {
        $blockcontentbgc = $theme->settings->blockcontentbgc;
    }
    $css = formal_white_set_blockcontentbgc($css, $blockcontentbgc);
    // Set the left block column background color
    if (empty($theme->settings->lblockcolumnbgc)) {
        $lblockcolumnbgc = '#E3DFD4';
        // default
    } else {
        $lblockcolumnbgc = $theme->settings->lblockcolumnbgc;
    }
    $css = formal_white_set_lblockcolumnbgc($css, $lblockcolumnbgc);
    // Set the right block column background color
    if (empty($theme->settings->rblockcolumnbgc)) {
        $rblockcolumnbgc = $lblockcolumnbgc;
        // default
    } else {
        $rblockcolumnbgc = $theme->settings->rblockcolumnbgc;
    }
    $css = formal_white_set_rblockcolumnbgc($css, $rblockcolumnbgc);
    // set the width of the two blocks columns
    if (!empty($theme->settings->blockcolumnwidth)) {
        $blockcolumnwidth = $theme->settings->blockcolumnwidth;
    } else {
        $blockcolumnwidth = '200';
        // default
    }
    $css = formal_white_set_blockcolumnwidth($css, $blockcolumnwidth);
    // set blocks margin
    if (!empty($theme->settings->blockpadding)) {
        $blockpadding = $theme->settings->blockpadding;
    } else {
        $blockpadding = '8';
        // default
    }
    $css = formal_white_set_blockpadding($css, $blockcolumnwidth, $blockpadding);
    // set the customcss
    if (!empty($theme->settings->customcss)) {
        $customcss = $theme->settings->customcss;
    } else {
        $customcss = null;
    }
    $css = formal_white_set_customcss($css, $customcss);
    return $css;
}