Lines Matching +full:style +full:. +full:local +full:. +full:ini

5  * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author Andreas Gohr <andi@splitbrain.org>
9 if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../../').'/');
10 require_once(DOKU_INC.'inc/init.php');
17 * @author Andreas Gohr <andi@splitbrain.org>
35 $copy_path = DOKU_PLUGIN . 'ckgedit/ckeditor/css/_style.css';
40 // load styl.ini
54 $files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/';
75 $css .= '@media screen {';
78 $css .= '}';
86 if(preg_match('#' .$xcl . '#',$file) ) {
90 $css_ckg_content .= "\n/* XXXXXXXXX $display XXXXXXXXX */\n";
91 $css_ckg_content .= css_ckg_loadfile($file, $location);
95 …$css .= NL.'@media screen { /* START screen styles */'.NL.$css_ckg_content.NL.'} /* /@media END s…
99 … $css .= NL.'/* START rest styles */ '.NL.$css_ckg_content.NL.'/* END rest styles */'.NL;
104 // apply style replacements
112 …$css = preg_replace_callback('#(url\([ \'"]*)('.$base.')(.*?(?:\.(png|gif)))#i','css_ckg_datauri',…
115 $css = preg_replace("/(\#?|\.?|div\.)dokuwiki\.?/", '', $css);
117 …$css = "@import 'additional.css';\n/* template: $tpl */\n@media screen {\n.$tpl{color:#ccc;}\n}\n"…
118 $css .= '
119 span.multi_p_open {
127 padding-left: .5em;
130 ' . "\n";
132 if( io_saveFile($path . 'Styles/_style.css' ,$css)) {
135 if(!$retv) msg("failed: " . $copy_path);
171 if(preg_match('/\/(\* XXXXXXXXX )(.*?)( XXXXXXXXX \*)\//', $lines[$i], $m)){
173 $msg .= ' in '.$m[2].' at line '.($lno-$i);
180 $error = 'A fatal error occured during compilation of the CSS files. '.
181 'If you recently installed a new plugin or template it '.
182 'might be broken and you should try disabling it again. ['.$msg.']';
191 * Does placeholder replacements in the style according to
192 * the ones defined in a templates style.ini file
194 * This also adds the ini defined placeholders as less variables
197 * @author Andreas Gohr <andi@splitbrain.org>
200 // we convert ini replacements to LESS variable names
205 $lkey = '@ini_'.$lkey;
206 $less .= "$lkey: $value;\n";
211 // we now replace all old ini replacements with LESS variables
215 $css = $less.$css;
220 * Load style ini contents
222 * Loads and merges style.ini files from template and config and prepares
225 * @author Andreas Gohr <andi@splitbrain.org>
233 // load template's style.ini
236 $ini = $incbase.'style.ini';
237 if(file_exists($ini)){
238 $data = parse_ini_file($ini, true);
242 $stylesheets[$mode][$incbase.$file] = $webbase;
251 // load configs's style.ini
253 $ini = DOKU_CONF."tpl/$tpl/style.ini";
254 $incbase = dirname($ini).'/';
255 if(file_exists($ini)){
256 $data = parse_ini_file($ini, true);
260 $stylesheets[$mode][$incbase.$file] = $webbase;
278 * @author Chris Smith <chris@jalakai.co.uk>
282 …$key] = preg_replace('#(url\([ \'"]*)(?!/|data:|http://|https://| |\'|")#','\\1'.$location,$value);
291 * $name is the identifier given in the config. All Interwiki links get
292 * an default style with a default icon. If a special icon is available
293 * for an interwiki URL it is set in it's own class. Both classes can be
294 * overwritten in the template or userstyles.
296 * @author Andreas Gohr <andi@splitbrain.org>
300 // default style
301 $css .= 'a.interwiki {';
302 … $css .= ' background: transparent url('.DOKU_BASE.'lib/images/interwiki.png) 0px 1px no-repeat;';
303 $css .= ' padding: 1px 0px 1px 16px;';
304 $css .= '}';
310 if(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.png')){
311 $css .= "a.iw_$class {";
312 $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.png)';
313 $css .= '}';
314 }elseif(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.gif')){
315 $css .= "a.iw_$class {";
316 $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.gif)';
317 $css .= '}';
325 * @author Andreas Gohr <andi@splitbrain.org>
329 // default style
330 $css .= '.mediafile {';
331 …$css .= ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repea…
332 $css .= ' padding-left: 18px;';
333 $css .= ' padding-bottom: 1px;';
334 $css .= '}';
339 if($dh = opendir(DOKU_INC.'lib/images/fileicons')){
341 if(preg_match('/([_\-a-z0-9]+(?:\.[_\-a-z0-9]+)*?)\.(png|gif)/i',$file,$match)){
343 $type = '.'.strtolower($match[2]);
344 if($ext!='file' && (!isset($exts[$ext]) || $type=='.png')){
353 $css .= ".mf_$class {";
354 $css .= ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')';
355 $css .= '}';
371 * @author Chris Smith <chris@jalakai.co.uk>
386 * for less files.
399 …$css = preg_replace_callback('#(url\( *)([\'"]?)(.*?)(\2)( *\))#',array($this,'replacements'),$css…
400 … $css = preg_replace_callback('#(@import\s+)([\'"])(.*?)(\2)#',array($this,'replacements'),$css);
416 $regex = '/^('.join('|',$basedir).')/';
427 * @param array see http://php.net/preg_replace_callback
428 * @return string see http://php.net/preg_replace_callback
437 else if (substr($match[3],-5) == '.less') {
439 $match[3] = $this->getRelativePath() . '/' . $match[3];
444 $match[3] = $this->location . $match[3];
452 * Convert local image URLs to data URLs if the filesize is small
464 $local = DOKU_INC.$url;
465 $size = @filesize($local);
467 $data = base64_encode(file_get_contents($local));
470 $url = 'data:image/'.$ext.';base64,'.$data;
472 $url = $base.$url;
474 return $pre.$url;
482 * @author Andreas Gohr <andi@splitbrain.org>
486 $css = preg_replace_callback('#(/\*)(.*?)(\*/)#s','css_ckg_comment_cb',$css);
489 $css = preg_replace('/(?<!:)\/\/.*$/m','',$css);
497 …ss = preg_replace('/([: ])0+(\.\d+?)0*((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2$3'…
498 …$css = preg_replace('/([: ])\.(0)+((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2', $css…
499 …$css = preg_replace('/([: ]0)0*(\.0*)?((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1', $c…
500 …$css = preg_replace('/([: ]\d+)(\.0*)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1$3', $…
501 …$css = preg_replace('/([: ])0+(\d+|\d*\.\d+)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$…
504 …$css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width|radius)):)([\w\.]+)( \2…
505 …$css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width)):)([\w\.]+) ([\w\.]+) …
518 * @author Andreas Gohr <andi@splitbrain.org>