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__).'/../../../../').'/');
12 if(!defined('EPUB_DIR')) define('EPUB_DIR',realpath(dirname(__FILE__).'/../').'/');
13 require_once(DOKU_INC.'inc/init.php');
21 * @author Andreas Gohr <andi@splitbrain.org>
38 // load styl.ini
52 $files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/';
55 …$files[$mediatype][DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/…
80 $css .= '@media screen {';
83 $css .= '}';
87 …ugins/upgrade|plugins/acl|plugins/plugin|plugins/auth|plugins/config|plugins/revert|_imgdetail.css'
88 . '|plugins/fckg|plugins/ckgedit|plugins/edittable'
89 . '|_media_popup.css|_media_fullscreen.css|_fileuploader.css|_toc.css|_search.css|_recent.css|_diff
95 if(preg_match('#' .$xcl . '#',$file)) continue;
97 $css_content .= "\n/* XXXXXXXXX $display XXXXXXXXX */\n";
98 $css_content .= css_loadfile($file, $location);
102 …$css .= NL.'@media screen { /* START screen styles */'.NL.$css_content.NL.'} /* /@media END scree…
106 $css .= NL.'/* START rest styles */ '.NL.$css_content.NL.'/* END rest styles */'.NL;
111 // apply style replacements
131 …// $css = preg_replace_callback('#(url\([ \'"]*)('.$base.')(.*?(?:\.(png|gif)))#i','css_datauri',$…
134 io_saveFile($path . 'Styles/style.css' ,$css);
164 if(preg_match('/\/(\* XXXXXXXXX )(.*?)( XXXXXXXXX \*)\//', $lines[$i], $m)){
166 $msg .= ' in '.$m[2].' at line '.($lno-$i);
173 $error = 'A fatal error occured during compilation of the CSS files. '.
174 'If you recently installed a new plugin or template it '.
175 'might be broken and you should try disabling it again. ['.$msg.']';
184 * Does placeholder replacements in the style according to
185 * the ones defined in a templates style.ini file
187 * This also adds the ini defined placeholders as less variables
190 * @author Andreas Gohr <andi@splitbrain.org>
193 // we convert ini replacements to LESS variable names
198 $lkey = '@ini_'.$lkey;
199 $less .= "$lkey: $value;\n";
204 // we now replace all old ini replacements with LESS variables
208 $css = $less.$css;
213 * Load style ini contents
215 * Loads and merges style.ini files from template and config and prepares
218 * @author Andreas Gohr <andi@splitbrain.org>
226 // load template's style.ini
229 $ini = $incbase.'style.ini';
230 if(file_exists($ini)){
231 $data = parse_ini_file($ini, true);
235 $stylesheets[$mode][$incbase.$file] = $webbase;
244 // load configs's style.ini
246 $ini = DOKU_CONF."tpl/$tpl/style.ini";
247 $incbase = dirname($ini).'/';
248 if(file_exists($ini)){
249 $data = parse_ini_file($ini, true);
253 $stylesheets[$mode][$incbase.$file] = $webbase;
271 * @author Chris Smith <chris@jalakai.co.uk>
275 …$key] = preg_replace('#(url\([ \'"]*)(?!/|data:|http://|https://| |\'|")#','\\1'.$location,$value);
284 * $name is the identifier given in the config. All Interwiki links get
285 * an default style with a default icon. If a special icon is available
286 * for an interwiki URL it is set in it's own class. Both classes can be
287 * overwritten in the template or userstyles.
289 * @author Andreas Gohr <andi@splitbrain.org>
293 // default style
294 $css .= 'a.interwiki {';
295 … $css .= ' background: transparent url('.DOKU_BASE.'lib/images/interwiki.png) 0px 1px no-repeat;';
296 $css .= ' padding: 1px 0px 1px 16px;';
297 $css .= '}';
303 if(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.png')){
304 $css .= "a.iw_$class {";
305 $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.png)';
306 $css .= '}';
307 }elseif(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.gif')){
308 $css .= "a.iw_$class {";
309 $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.gif)';
310 $css .= '}';
318 * @author Andreas Gohr <andi@splitbrain.org>
322 // default style
323 $css .= '.mediafile {';
324 …$css .= ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repea…
325 $css .= ' padding-left: 18px;';
326 $css .= ' padding-bottom: 1px;';
327 $css .= '}';
332 if($dh = opendir(DOKU_INC.'lib/images/fileicons')){
334 if(preg_match('/([_\-a-z0-9]+(?:\.[_\-a-z0-9]+)*?)\.(png|gif)/i',$file,$match)){
336 $type = '.'.strtolower($match[2]);
337 if($ext!='file' && (!isset($exts[$ext]) || $type=='.png')){
346 $css .= ".mf_$class {";
347 $css .= ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')';
348 $css .= '}';
364 * @author Chris Smith <chris@jalakai.co.uk>
379 * for less files.
392 …$css = preg_replace_callback('#(url\( *)([\'"]?)(.*?)(\2)( *\))#',array($this,'replacements'),$css…
393 … $css = preg_replace_callback('#(@import\s+)([\'"])(.*?)(\2)#',array($this,'replacements'),$css);
409 $regex = '/^('.join('|',$basedir).')/';
420 * @param array see http://php.net/preg_replace_callback
421 * @return string see http://php.net/preg_replace_callback
430 else if (substr($match[3],-5) == '.less') {
432 $match[3] = $this->getRelativePath() . '/' . $match[3];
437 $match[3] = $this->location . $match[3];
445 * Convert local image URLs to data URLs if the filesize is small
457 $local = DOKU_INC.$url;
458 $size = @filesize($local);
460 $data = base64_encode(file_get_contents($local));
463 $url = 'data:image/'.$ext.';base64,'.$data;
465 $url = $base.$url;
467 return $pre.$url;
474 * @author Andreas Gohr <andi@splitbrain.org>
480 $list[DOKU_PLUGIN."$p/$mediatype.css"] = DOKU_BASE."lib/plugins/$p/";
481 $list[DOKU_PLUGIN."$p/$mediatype.less"] = DOKU_BASE."lib/plugins/$p/";
482 // alternative for screen.css
484 $list[DOKU_PLUGIN."$p/style.css"] = DOKU_BASE."lib/plugins/$p/";
485 $list[DOKU_PLUGIN."$p/style.less"] = DOKU_BASE."lib/plugins/$p/";
494 * @author Andreas Gohr <andi@splitbrain.org>
498 $css = preg_replace_callback('#(/\*)(.*?)(\*/)#s','css_comment_cb',$css);
501 $css = preg_replace('/(?<!:)\/\/.*$/m','',$css);
509 …ss = preg_replace('/([: ])0+(\.\d+?)0*((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2$3'…
510 …$css = preg_replace('/([: ])\.(0)+((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2', $css…
511 …$css = preg_replace('/([: ]0)0*(\.0*)?((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1', $c…
512 …$css = preg_replace('/([: ]\d+)(\.0*)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1$3', $…
513 …$css = preg_replace('/([: ])0+(\d+|\d*\.\d+)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$…
516 …$css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width|radius)):)([\w\.]+)( \2…
517 …$css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width)):)([\w\.]+) ([\w\.]+) …
530 * @author Andreas Gohr <andi@splitbrain.org>