From e4ef7cb8c53f0e02f004a724c4d42178c65411de Mon Sep 17 00:00:00 2001 From: mathieu Date: Mon, 15 Jun 2015 13:55:29 -0400 Subject: [PATCH] Mobile version. #32 --- application/config/autoload.php | 2 +- application/controllers/home.php | 7 +- application/views/footer.php | 2 + application/views/header.php | 7 +- application/views/home.php | 163 +++---------------------------- assets/css/main.css | 6 -- assets/js/application.js | 2 +- assets/js/sharrre.logic.js | 3 - 8 files changed, 27 insertions(+), 165 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index 3453e9a8..69f4ec51 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -52,7 +52,7 @@ | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ -$autoload['libraries'] = array('session', 'database'); +$autoload['libraries'] = array('session', 'database', 'user_agent'); /* diff --git a/application/controllers/home.php b/application/controllers/home.php index 2951e4b6..e5a5a688 100644 --- a/application/controllers/home.php +++ b/application/controllers/home.php @@ -9,7 +9,12 @@ function __construct() function index() { - array_push($this->_headerData['javaScripts'], "watch.animation"); + if(!$this->agent->is_mobile()){ + array_push($this->_headerData['javaScripts'], "home.logic", "watch.animation"); + }else{ + array_push($this->_headerData['javaScripts'], "home.logic.mobile"); + } + $this->load->view('header', $this->_headerData); $this->load->view('home'); $this->load->view('footer'); diff --git a/application/views/footer.php b/application/views/footer.php index dbb20d85..6797cd68 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -1,10 +1,12 @@