function _omega_compile_layout($layout, $layout_id, $theme)
{
    // Options for phpsass compiler. Defaults in SassParser.php
    $options = array('style' => 'nested', 'cache' => FALSE, 'syntax' => 'scss', 'debug' => TRUE);
    $scss = _omega_compile_layout_sass($layout, $layout_id, $theme, $options);
    // generate the CSS from the SCSS created above
    $css = _omega_compile_layout_css($scss, $options);
    // save the SCSS and CSS files to the theme's filesystem
    _omega_save_layout_files($scss, $css, $theme, $layout_id);
}
예제 #2
0
function omega_theme_settings_submit(&$form, &$form_state)
{
    // Get the theme name.
    $theme = $form_state['build_info']['args'][0];
    $values = $form_state['values'];
    $layout = $values['layouts'];
    //dsm($values);
    // Options for phpsass compiler. Defaults in SassParser.php
    $options = array('style' => 'nested', 'cache' => FALSE, 'syntax' => 'scss', 'debug' => TRUE, 'callbacks' => array());
    // Execute the compiler.
    $parser = new SassParser($options);
    // create CSS from SCSS
    $scss = _omega_compile_layout_sass($layout, $theme, $options);
    //dsm($scss);
    $css = _omega_render_layout_css($scss, $options);
    //dsm($css);
    _omega_save_layout_files($scss, $css, $theme);
    //dsm($form_state['values']);
}