From 8803152273dc6002f6c99b90632225f06ce87103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sun, 16 Feb 2014 16:55:38 +0100 Subject: [PATCH] Move all default styles in the templates directory. re #79 --HG-- rename : styles/FontAwesome.otf => templates/default/styles/FontAwesome.otf rename : styles/font-awesome.css => templates/default/styles/font-awesome.css rename : styles/fontawesome-webfont.eot => templates/default/styles/fontawesome-webfont.eot rename : styles/fontawesome-webfont.svg => templates/default/styles/fontawesome-webfont.svg rename : styles/fontawesome-webfont.ttf => templates/default/styles/fontawesome-webfont.ttf rename : styles/fontawesome-webfont.woff => templates/default/styles/fontawesome-webfont.woff rename : styles/style-base.css => templates/default/styles/style-base.css rename : styles/style-default.css => templates/default/styles/style-default.css rename : styles/style-eink.css => templates/default/styles/style-eink.css rename : styles/style-iphone.css => templates/default/styles/style-iphone.css --- base.php | 4 ++-- templates/default/file.html | 2 +- .../default/styles}/FontAwesome.otf | Bin .../default/styles}/font-awesome.css | 0 .../default/styles}/fontawesome-webfont.eot | Bin .../default/styles}/fontawesome-webfont.svg | 0 .../default/styles}/fontawesome-webfont.ttf | Bin .../default/styles}/fontawesome-webfont.woff | Bin {styles => templates/default/styles}/style-base.css | 0 .../default/styles}/style-default.css | 0 {styles => templates/default/styles}/style-eink.css | 0 .../default/styles}/style-iphone.css | 0 12 files changed, 3 insertions(+), 3 deletions(-) rename {styles => templates/default/styles}/FontAwesome.otf (100%) rename {styles => templates/default/styles}/font-awesome.css (100%) rename {styles => templates/default/styles}/fontawesome-webfont.eot (100%) rename {styles => templates/default/styles}/fontawesome-webfont.svg (100%) rename {styles => templates/default/styles}/fontawesome-webfont.ttf (100%) rename {styles => templates/default/styles}/fontawesome-webfont.woff (100%) rename {styles => templates/default/styles}/style-base.css (100%) rename {styles => templates/default/styles}/style-default.css (100%) rename {styles => templates/default/styles}/style-eink.css (100%) rename {styles => templates/default/styles}/style-iphone.css (100%) diff --git a/base.php b/base.php index a2c8331..61f877d 100644 --- a/base.php +++ b/base.php @@ -81,7 +81,7 @@ function getCurrentOption ($option) { } function getCurrentCss () { - return "styles/style-" . getCurrentOption ("style") . ".css"; + return "templates/" . getCurrentTemplate () . "/styles/style-" . getCurrentOption ("style") . ".css"; } function getCurrentTemplate () { @@ -940,7 +940,7 @@ class PageCustomize extends Page private function getStyleList () { $result = array (); - foreach (glob ("styles/style-*.css") as $filename) { + foreach (glob ("templates/" . getCurrentTemplate () . "/styles/style-*.css") as $filename) { if (preg_match ('/styles\/style-(.*?)\.css/', $filename, $m)) { array_push ($result, $m [1]); } diff --git a/templates/default/file.html b/templates/default/file.html index 5316645..c712d9d 100644 --- a/templates/default/file.html +++ b/templates/default/file.html @@ -28,7 +28,7 @@ - + {{? it.server_side_rendering == 0}} diff --git a/styles/FontAwesome.otf b/templates/default/styles/FontAwesome.otf similarity index 100% rename from styles/FontAwesome.otf rename to templates/default/styles/FontAwesome.otf diff --git a/styles/font-awesome.css b/templates/default/styles/font-awesome.css similarity index 100% rename from styles/font-awesome.css rename to templates/default/styles/font-awesome.css diff --git a/styles/fontawesome-webfont.eot b/templates/default/styles/fontawesome-webfont.eot similarity index 100% rename from styles/fontawesome-webfont.eot rename to templates/default/styles/fontawesome-webfont.eot diff --git a/styles/fontawesome-webfont.svg b/templates/default/styles/fontawesome-webfont.svg similarity index 100% rename from styles/fontawesome-webfont.svg rename to templates/default/styles/fontawesome-webfont.svg diff --git a/styles/fontawesome-webfont.ttf b/templates/default/styles/fontawesome-webfont.ttf similarity index 100% rename from styles/fontawesome-webfont.ttf rename to templates/default/styles/fontawesome-webfont.ttf diff --git a/styles/fontawesome-webfont.woff b/templates/default/styles/fontawesome-webfont.woff similarity index 100% rename from styles/fontawesome-webfont.woff rename to templates/default/styles/fontawesome-webfont.woff diff --git a/styles/style-base.css b/templates/default/styles/style-base.css similarity index 100% rename from styles/style-base.css rename to templates/default/styles/style-base.css diff --git a/styles/style-default.css b/templates/default/styles/style-default.css similarity index 100% rename from styles/style-default.css rename to templates/default/styles/style-default.css diff --git a/styles/style-eink.css b/templates/default/styles/style-eink.css similarity index 100% rename from styles/style-eink.css rename to templates/default/styles/style-eink.css diff --git a/styles/style-iphone.css b/templates/default/styles/style-iphone.css similarity index 100% rename from styles/style-iphone.css rename to templates/default/styles/style-iphone.css