From: bruno@cubedesigners.com Date: Fri, 17 Jan 2014 15:42:59 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4a0f0f1a6ab6f09f6781ee59698c61d7b66ae24d;p=cubedesigners-v7.git --- diff --git a/css/fonts/robotocondensed-light-webfont.eot b/css/fonts/robotocondensed-light-webfont.eot new file mode 100644 index 0000000..1473501 Binary files /dev/null and b/css/fonts/robotocondensed-light-webfont.eot differ diff --git a/css/fonts/robotocondensed-light-webfont.svg b/css/fonts/robotocondensed-light-webfont.svg new file mode 100644 index 0000000..f853f29 --- /dev/null +++ b/css/fonts/robotocondensed-light-webfont.svg @@ -0,0 +1,643 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/fonts/robotocondensed-light-webfont.ttf b/css/fonts/robotocondensed-light-webfont.ttf new file mode 100644 index 0000000..5803554 Binary files /dev/null and b/css/fonts/robotocondensed-light-webfont.ttf differ diff --git a/css/fonts/robotocondensed-light-webfont.woff b/css/fonts/robotocondensed-light-webfont.woff new file mode 100644 index 0000000..1811568 Binary files /dev/null and b/css/fonts/robotocondensed-light-webfont.woff differ diff --git a/css/fonts/robotocondensed-light.css b/css/fonts/robotocondensed-light.css new file mode 100644 index 0000000..2a07355 --- /dev/null +++ b/css/fonts/robotocondensed-light.css @@ -0,0 +1,15 @@ +/* Generated by Font Squirrel (http://www.fontsquirrel.com) on January 17, 2014 */ + + + +@font-face { + font-family: 'roboto_condensedlight'; + src: url('robotocondensed-light-webfont.eot'); + src: url('robotocondensed-light-webfont.eot?#iefix') format('embedded-opentype'), + url('robotocondensed-light-webfont.woff') format('woff'), + url('robotocondensed-light-webfont.ttf') format('truetype'), + url('robotocondensed-light-webfont.svg#roboto_condensedlight') format('svg'); + font-weight: normal; + font-style: normal; + +} \ No newline at end of file diff --git a/desktop.ini b/desktop.ini index 648ef12..20076ec 100644 --- a/desktop.ini +++ b/desktop.ini @@ -1,2 +1,2 @@ [.ShellClassInfo] -IconResource=H:\Works\ZendSample\images\favicon\favicon.ico,0 +IconResource=H:\Works\Cubedesigners\images\favicon\favicon.ico,0 diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 8294566..e83cfa1 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -2,64 +2,69 @@ class Bootstrap extends CubeIT_Bootstrap { - protected function _initMinimum() { - parent::_initMinimum(); - // If a project with html display (don't activate by default for web services apps - $this->bootstrap('doctype'); - $this->bootstrap('scripts'); - } + protected function _initMinimum() { + parent::_initMinimum(); + // If a project with html display (don't activate by default for web services apps + $this->bootstrap('doctype'); + $this->bootstrap('scripts'); + } - protected function _initScripts() { - parent::_initScripts(); - $this->getView()->headLink()->appendStylesheet('/css/fonts/fonts.css'); - } + protected function _initScripts() { + parent::_initScripts(); + $this->getView()->headLink()->appendStylesheet('/css/fonts/fonts.css'); + } - protected function _initRouter($initCms = true) { - $router = parent::_initRouter($initCms); - return $router; - } + protected function _initRouter($initCms = true) { + $router = parent::_initRouter($initCms); + return $router; + } - /** - * - * @param \Doctrine\DBAL\Schema\Schema $schema - * @param array $options - */ - protected function _defineSchema(&$schema, $options) { - parent::_defineSchema($schema, $options); + /** + * + * @param \Doctrine\DBAL\Schema\Schema $schema + * @param array $options + */ + protected function _defineSchema(&$schema, $options) { + parent::_defineSchema($schema, $options); - $user = $schema->createTable('user'); - $user->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $user->setPrimaryKey(array('id')); - $user->addColumn('username', 'string', array('length' => 64)); - $user->addUniqueIndex(array('username')); - $user->addColumn('password', 'string', array('length' => 255)); - $user->addColumn('role', 'string', array('length' => 32)); - } + $user = $schema->createTable('user'); + $user->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $user->setPrimaryKey(array('id')); + $user->addColumn('username', 'string', array('length' => 64)); + $user->addUniqueIndex(array('username')); + $user->addColumn('password', 'string', array('length' => 255)); + $user->addColumn('role', 'string', array('length' => 32)); + } - protected function _initAcl() { - $acl = parent::_initAcl(); - return $acl; - } + protected function _initAcl() { + $acl = parent::_initAcl(); + return $acl; + } - /** - * - * @return array - */ - public function getCMSTemplates() { - $templates = parent::getCMSTemplates(); + /** + * + * @return array + */ + public function getCMSTemplates() { + $templates = parent::getCMSTemplates(); + $templates['Agence'] = array('agence' => 'L\'agence'); + $templates['Realisations'] = array('realisations' => 'Réalisations'); + $templates['Casestudies'] = array('casestudies' => 'Case-Studies'); + $templates['Expertises'] = array('expertises' => 'Expertises'); + $templates['Contact'] = array('contact' => 'Contact'); + $templates['Mentions'] = array('mentions' => 'Mentions légales'); - return $templates; - } + return $templates; + } - public function run() { - // run have to be the last call of bootstrap - parent::run(); - } + public function run() { + // run have to be the last call of bootstrap + parent::run(); + } - function __destroy() { - endProfile(); - } + function __destroy() { + endProfile(); + } } - diff --git a/framework/application/forms/CMS.php b/framework/application/forms/CMS.php index 125bf48..824177f 100644 --- a/framework/application/forms/CMS.php +++ b/framework/application/forms/CMS.php @@ -1,9 +1,11 @@ diff --git a/framework/application/forms/CMS/Agence.php b/framework/application/forms/CMS/Agence.php new file mode 100644 index 0000000..856b70e --- /dev/null +++ b/framework/application/forms/CMS/Agence.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Casestudies.php b/framework/application/forms/CMS/Casestudies.php new file mode 100644 index 0000000..4705ad6 --- /dev/null +++ b/framework/application/forms/CMS/Casestudies.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Contact.php b/framework/application/forms/CMS/Contact.php new file mode 100644 index 0000000..dcf7ef7 --- /dev/null +++ b/framework/application/forms/CMS/Contact.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Expertises.php b/framework/application/forms/CMS/Expertises.php new file mode 100644 index 0000000..207b873 --- /dev/null +++ b/framework/application/forms/CMS/Expertises.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Home.php b/framework/application/forms/CMS/Home.php index ae8a8e0..9093f06 100644 --- a/framework/application/forms/CMS/Home.php +++ b/framework/application/forms/CMS/Home.php @@ -1,9 +1,14 @@ + $titre = new Zend_Form_Element_Text('titre'); + $titre->setLabel('Titre'); + $this->addElement($titre); + } + +} +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Mentions.php b/framework/application/forms/CMS/Mentions.php new file mode 100644 index 0000000..4d6c18b --- /dev/null +++ b/framework/application/forms/CMS/Mentions.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Realisations.php b/framework/application/forms/CMS/Realisations.php new file mode 100644 index 0000000..a387744 --- /dev/null +++ b/framework/application/forms/CMS/Realisations.php @@ -0,0 +1,15 @@ +setLabel('Titre'); + $this->addElement($titre); + } + +} + +?> \ No newline at end of file diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index d2baf42..fbf11d0 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -1,20 +1,25 @@ setTitle('Edition des paramètres du site'); + $this->setTitle('Edition des paramètres du site'); - $longTitle = new Zend_Form_Element_Text('longTitle'); - $longTitle->setLabel('Titre long par défaut'); - $this->addElementLocalized($longTitle); + $longTitle = new Zend_Form_Element_Text('longTitle'); + $longTitle->setLabel('Titre long par défaut'); + $this->addElementLocalized($longTitle); - $description = new CubeIT_Form_Element_Textarea('description'); - $description->setLabel('Description de la page par défaut'); - $this->addElementLocalized($description); - } + $description = new CubeIT_Form_Element_Textarea('description'); + $description->setLabel('Description de la page par défaut'); + $this->addElementLocalized($description); + + /* COPYRIGHT */ + $copyright = new Zend_Form_Element_Text('copyright'); + $copyright->setLabel('Copyright du bas de page'); + $this->addElementLocalized($copyright); + } } diff --git a/framework/application/forms/User.php b/framework/application/forms/User.php index 8f3fccf..bdfdc15 100644 --- a/framework/application/forms/User.php +++ b/framework/application/forms/User.php @@ -1,9 +1,11 @@ diff --git a/framework/application/layouts/scripts/layout.phtml b/framework/application/layouts/scripts/layout.phtml new file mode 100644 index 0000000..1a088db --- /dev/null +++ b/framework/application/layouts/scripts/layout.phtml @@ -0,0 +1,18 @@ + array('families' => array('roboto_condensedlight'), 'urls' => array('/css/fonts/robotocondensed-light.css?nocache=1'))); +$this->headScript()->addWebFont($fonts); + +if ($this->acl()->isAllowed('edition')) { + $this->headScript()->addCommonsAdmin(); +} +$this->headScript()->addIEConditionnals(); +$this->headScript()->appendFile('/js/common.js'); +$this->headLink()->appendStylesheet('/less/common.less', 'all'); + + +profile(__FILE__, __LINE__, 'Before rendering body'); +$res = $this->htmlPage($this->render('common/body.phtml')); +profile(__FILE__, __LINE__, 'Body rendered'); +echo $res; +endProfile(); diff --git a/framework/application/models/Content.php b/framework/application/models/Content.php index df6a828..38004bc 100644 --- a/framework/application/models/Content.php +++ b/framework/application/models/Content.php @@ -1,10 +1,10 @@ layout()->content . "\n"; -echo $this->render('common/header.phtml'); echo '
'; +echo $this->render('common/header.phtml'); +echo '
'; echo $content; echo '
'; echo $this->render('common/footer.phtml'); +echo '
'; ?> \ No newline at end of file diff --git a/framework/application/views/scripts/common/footer.phtml b/framework/application/views/scripts/common/footer.phtml index 4cf4158..3656131 100644 --- a/framework/application/views/scripts/common/footer.phtml +++ b/framework/application/views/scripts/common/footer.phtml @@ -1,4 +1,24 @@ headLink()->appendStylesheet('/less/footer.less'); + +$mentions_page = $this->navigation()->getContainer()->findOneById($this->localeDefault() . '/7'); +fb($mentions_page); +$mentions = '/'; +if (!is_null($mentions_page)) { + $mentions = $mentions_page->getHref(); +} ?> - \ No newline at end of file + \ No newline at end of file diff --git a/framework/application/views/scripts/common/header.phtml b/framework/application/views/scripts/common/header.phtml index 7d15c25..27802b8 100644 --- a/framework/application/views/scripts/common/header.phtml +++ b/framework/application/views/scripts/common/header.phtml @@ -1,4 +1,25 @@ headLink()->appendStylesheet('/less/header.less'); + +$homepage = $this->navigation()->getContainer()->findOneById($this->localeDefault() . '/1'); +$home = '/'; +if (!is_null($homepage)) { + $home = $homepage->getHref(); +} ?> - \ No newline at end of file + +'; + } + + /* NAVIGATION */ + $mainMenu = $this->navigation()->findOneById($this->localeDefault() . '/' . CubeIT_Navigation::MAIN); + + echo $this->navigation()->menu()->renderMenu($mainMenu, array('maxDepth' => 0)) . "\n"; + ?> + + \ No newline at end of file diff --git a/framework/application/views/scripts/templates/home.phtml b/framework/application/views/scripts/templates/home.phtml index e69de29..e9a66b6 100644 --- a/framework/application/views/scripts/templates/home.phtml +++ b/framework/application/views/scripts/templates/home.phtml @@ -0,0 +1,4 @@ +headScript()->addScriptAndStyle('home'); +?> \ No newline at end of file diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..54638b7 Binary files /dev/null and b/images/logo.png differ diff --git a/less/admin.less b/less/admin.less index e69de29..01e2d75 100644 --- a/less/admin.less +++ b/less/admin.less @@ -0,0 +1,27 @@ +#adminBar{ + background:rgb(56,133,224); + background:rgba(56,133,224,0.7); + height:12px; + color:#fff; + padding:4px 0; + font-size:12px; + line-height: 12px; + text-transform: uppercase; + position:absolute; + z-index:101; + width:100%; + font-family: "roboto_condensedlight"; +} + +#adminBar a{ + color:#fff; + margin:0 5px; +} + +#adminBar .content{ + padding:0 15px; +} + +#adminBar a.right{ + float:right; +} \ No newline at end of file diff --git a/less/common.less b/less/common.less index e69de29..dd4e599 100644 --- a/less/common.less +++ b/less/common.less @@ -0,0 +1,9 @@ +body { + font-family: 'roboto_condensedlight'; + font-size:16px; + color:#1b1b1b; +} + +#wrapper { + +} \ No newline at end of file diff --git a/less/footer.less b/less/footer.less new file mode 100644 index 0000000..9a849b4 --- /dev/null +++ b/less/footer.less @@ -0,0 +1,28 @@ +#footer { + width:100%; + height:550px; +} + +#footer .footer-top { + background-color: #282828; + height: 520px; +} + +#footer .footer-bottom { + background-color: #191919; + height: 30px; + color: #6c6c6c; + text-align: center; + font-size: 12px; + line-height: 30px; +} + +#footer .footer-bottom a{ + text-decoration: none; + color:#3885e0; +} + +#footer .footer-bottom a:hover, +#footer .footer-bottom .active a{ + color:#3885e0; +} \ No newline at end of file diff --git a/less/header.less b/less/header.less new file mode 100644 index 0000000..562b9cc --- /dev/null +++ b/less/header.less @@ -0,0 +1,45 @@ +#header { + margin: 0 auto; + min-width: 1024px; + max-width: 1200px; + width:100%; + height:130px; +} + +#header ul{ + text-transform: uppercase; + font-size:15px; + color:#3885e0; + list-style: none; +} + +#header ul a{ + text-decoration: none; + color:#3885e0; + + padding: 10px; +} + +#header ul a:hover, +#header ul .active a{ + border-radius: 2px; + background-color: #84ae1e; + color:#356bac; +} + +#header ul li{ + float:left; +} + +#header .logo { + float:left; +} + +#header .navigation{ + margin: 50px 0; + float:right; +} + +#header .navigation li{ + margin:0 20px 0 0; +} \ No newline at end of file diff --git a/less/home.less b/less/home.less new file mode 100644 index 0000000..e69de29