Updating branch refs/heads/master to 1468e8af9afa0c1bebfa9e4fca7edff8d0ad570d (commit) from 45dfaba5df3c2843aaffa28a0b08986cb63fb0e7 (commit)
commit 1468e8af9afa0c1bebfa9e4fca7edff8d0ad570d Author: Nick Schermer <n...@xfce.org> Date: Sat Apr 14 17:42:14 2012 +0200 Rename bundle.php, so everybody is forced to load it. pages/header.php | 2 +- style/{bundle.php => css.php} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/header.php b/pages/header.php index 02a93b1..f77d37e 100644 --- a/pages/header.php +++ b/pages/header.php @@ -12,7 +12,7 @@ else <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title><?php echo $title ?></title> <link rel="shortcut icon" href="/style/favicon.png" type="image/png" /> - <link rel="stylesheet" media="screen" href="/style/bundle.php" type="text/css" /> + <link rel="stylesheet" media="screen" href="/style/css.php" type="text/css" /> <?php if (isset ($head['description'])) echo "\t<meta name=\"description\" content=\"".$head['description']."\" />\n"; diff --git a/style/bundle.php b/style/css.php similarity index 91% rename from style/bundle.php rename to style/css.php index 69a0c26..3f49996 100644 --- a/style/bundle.php +++ b/style/css.php @@ -19,14 +19,14 @@ function write_header ($mtime) function base64data ($matches) { - $file = $matches[1] .'.png'; + $file = $matches[1] .'.'. $matches[2]; $size = filesize ($file); if ($size > 0) { $imgbinary = fread (fopen ($file, "r"), $size); $base64 = base64_encode ($imgbinary); - return "url('data:image/png;base64,$base64')"; + return "url('data:image/".$matches[2].";base64,$base64')"; } return $matches[0]; @@ -70,7 +70,7 @@ $buf = str_replace (array (': ', ' {', ', '), array (':', '{', ','), $buf); /* c $buf = str_replace (array ("\r\n", "\r", "\n", "\t", ' '), '', $buf); /* strip lines and spaces */ /* embed images in css */ -$buf = preg_replace_callback ('!url\(\'([a-z/]*?).png\'\)!', 'base64data', $buf); +$buf = preg_replace_callback ('!url\(\'([a-z/]*?).(png|gif)\'\)!', 'base64data', $buf); /* output */ write_header ($mtime); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits