From 879e9fcd76f65107390bffa7d8c8999cb6c6a853 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 7 Oct 2013 11:31:12 +0200 Subject: Fix issue #165: @import CSS enlevés MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implique une modification des fichiers metadata.json pour les thèmes : ajout d'un champ "files" répertoriant les fichiers CSS à utiliser --- app/App_FrontController.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'app/App_FrontController.php') diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 920e3baa8..844956cf9 100644 --- a/app/App_FrontController.php +++ b/app/App_FrontController.php @@ -10,13 +10,13 @@ class App_FrontController extends FrontController { $this->loadLibs (); $this->loadModels (); - Session::init (); // lancement de la session doit se faire après chargement des modèles sinon bug (pourquoi ?) + Session::init (); + RSSThemes::init (); + Translate::init (); $this->loadParamsView (); $this->loadStylesAndScripts (); $this->loadNotifications (); - - Translate::init (); } private function loadLibs () { @@ -51,8 +51,12 @@ class App_FrontController extends FrontController { } private function loadStylesAndScripts () { - $theme = $this->conf->theme(); - View::appendStyle (Url::display ('/themes/' . $theme . '/style.css')); + $theme = RSSThemes::get_infos($this->conf->theme()); + if ($theme) { + foreach($theme["files"] as $file) { + View::appendStyle (Url::display ('/themes/' . $theme['path'] . '/' . $file)); + } + } View::appendStyle (Url::display ('/themes/printer/style.css'), 'print'); if (login_is_conf ($this->conf)) { View::appendScript ('https://login.persona.org/include.js'); -- cgit v1.2.3