function user_css_render_page_early($args)
{
    // include the global usercss if it exists
    if (@is_file(CONTENT_DIR . '/usercss')) {
        html_add_css_inline(@file_get_contents(CONTENT_DIR . '/usercss'), 5);
    }
}
Пример #2
0
function text_render_page_early($args)
{
    if ($args['edit']) {
        if (USE_MIN_FILES) {
            html_add_js(base_url() . 'modules/text/text-edit.min.js');
        } else {
            html_add_js(base_url() . 'modules/text/text-edit.js');
        }
        html_add_css(base_url() . 'modules/text/text-edit.css');
        html_add_js_var('$.glue.conf.text.auto_br', TEXT_AUTO_BR);
        if (TEXT_USE_WOFF_FONTS) {
            $woff_fonts = _woff_fonts();
            foreach ($woff_fonts as $font => $styles) {
                _include_woff_font($font);
                // TODO (later): check css encoding
                $rule = '.glue-font-woff-' . $font . ' {' . nl();
                // we use single quotes as they don't clash with inline styles
                $rule .= tab() . 'font-family: \'' . $font . '\';' . nl();
                $rule .= '}';
                html_add_css_inline($rule, 6);
            }
        }
    }
}