]> _ Git - fluidbook-v3.git/commitdiff
General setup and footer development. WIP #481 @4
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Jun 2016 14:47:54 +0000 (14:47 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 22 Jun 2016 14:47:54 +0000 (14:47 +0000)
12 files changed:
framework/application/configs/application.ini
framework/application/forms/CMS/Sub/Social/Network.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Social/Networks.php [new file with mode: 0644]
framework/application/forms/Settings.php
framework/application/layouts/scripts/layout.phtml
framework/application/views/scripts/common/footer.phtml
index.php
less/000-imports.less
less/001-variables.less
less/002-common.less
less/003-mixins.less
less/footer.less [new file with mode: 0644]

index 3acee9bdbbd7f6495633652d1fd7561e51ce389e..02b88f1c807e8c5e75d332c94fdd3ba1a220c9e1 100644 (file)
@@ -60,6 +60,10 @@ compat_ie = 9
 [testing : production]
 
 dev = true
+firephp = true
+
+minify.js = false
+minify.css = false
 
 seo.universalAnalytics =
 
@@ -70,7 +74,7 @@ httpauth.ip_whitelist[] = 82.216.164.184
 
 robots = false
 
-webhost = dev.fluidbook.com
+webhost = fluidbookwebv3.dev.cubedesigners.com
 
-locales.fr = dev.fluidbook.com
-locales.en = en.dev.fluidbook.com
\ No newline at end of file
+locales.fr = fluidbookwebv3.dev.cubedesigners.com
+locales.en = en.fluidbookwebv3.dev.cubedesigners.com
\ No newline at end of file
diff --git a/framework/application/forms/CMS/Sub/Social/Network.php b/framework/application/forms/CMS/Sub/Social/Network.php
new file mode 100644 (file)
index 0000000..b7bbf56
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+class Fluidbook_Form_CMS_Sub_Social_Network extends CubeIT_Form_SubForm {
+
+    public function init() {
+        parent::init();
+
+        $title = new Zend_Form_Element_Text('title');
+        $title->setLabel('Titre du réseau social');
+        $this->addElement($title);
+
+        $url = new CubeIT_Form_Element_Url('url');
+        $url->setLabel('URL');
+        $this->addElement($url);
+
+        $icon = new CubeIT_Form_Element_File_Image('icon');
+        $icon->setLabel('Pictogramme');
+        $icon->setMaxItems(1);
+        $this->addElement($icon);
+    }
+
+}
\ No newline at end of file
diff --git a/framework/application/forms/CMS/Sub/Social/Networks.php b/framework/application/forms/CMS/Sub/Social/Networks.php
new file mode 100644 (file)
index 0000000..2825442
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+class Fluidbook_Form_CMS_Sub_Social_Networks extends CubeIT_Form_Multi_SubForm {
+
+    public function init() {
+        parent::init();
+
+        $network = new Fluidbook_Form_CMS_Sub_Social_Network();
+        $this->setBaseSubForm($network);
+        $this->setBaseLegend('Edition du réseau social « $title »');
+        $this->setNewLegend('Nouveau réseau social');
+    }
+
+}
\ No newline at end of file
index 1718b545299356f07ba2e53d7a4f5e9b3d830736..fc72ab4526e48ea977909a4dc50a182768a2872c 100644 (file)
@@ -7,6 +7,10 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings {
 
                $this->setTitle('Edition des paramètres du site');
 
+               $logo = new CubeIT_Form_Element_File_Image('logo');
+               $logo->setLabel('Logo');
+               $this->addElement($logo);
+
                $longTitle = new Zend_Form_Element_Text('longTitle');
                $longTitle->setLabel('Titre long par défaut');
                $this->addElementLocalized($longTitle);
@@ -29,6 +33,10 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings {
                $workshop->fileEnabled(false);
                $workshop->pageEnabled(false);
                $this->addSubFormLocalized($workshop, 'workshop');
+
+               $social = new Fluidbook_Form_CMS_Sub_Social_Networks();
+               $social->setLegend('Réseaux Sociaux');
+               $this->addSubFormLocalized($social, 'social_networks');
        }
 
 }
\ No newline at end of file
index fc4531b6c68d2b6e88fc6a3ae21233cb1a70a7e5..99c8114d014f248856095e47a57ad85e81c1e613 100644 (file)
@@ -17,6 +17,11 @@ $this->headLink()->appendStylesheet('/less/002-common.less', 'all');
  * $this->headScript()->addWebFont($fonts);
  *
  */
+
+// Google Font
+$fonts = array('google' => array('families' => array('Open+Sans|Playfair+Display')));
+$this->headScript()->addWebFont($fonts);
+
 profile(__FILE__, __LINE__, 'Before rendering body');
 $res = $this->htmlPage($this->render('common/body.phtml'));
 profile(__FILE__, __LINE__, 'Body rendered');
index f5f4b28891f22b3cea7548c89c0e09b93540fcae..f92e427e26a70e6154a669c1f67ed572e86792d1 100644 (file)
@@ -1,5 +1,10 @@
 <?php\r
-$res = '<footer>';\r
+\r
+$this->headScript()->addScriptAndStyle('footer');\r
+\r
+$res = '<footer class="site">';\r
+\r
+$res .= $this->imageCms($this->option('logo'), 'Fluidbook', 258, 64);\r
 \r
 $res .= '<address>';\r
 $res .= $this->option('address')['adresse'];\r
@@ -9,10 +14,17 @@ $res .= '<br>';
 $res .= $this->option('address')['email'];\r
 $res .= '</address>';\r
 \r
-$res .= '<div class="footer-bottom">';\r
-$res .= $this->markupDotclear($this->option('footer'));\r
-$res .= '</div>'; // .footer-bottom\r
-\r
+$res .= '<div class="footer-social">';\r
+foreach ($this->option('social_networks') as $social) {\r
+    $res .= '<a href="'. $social['url'] .'" class="social-link" target="_blank">';\r
+    $res .= $this->imageCms($social['icon'], $social['title'], 52, 52);\r
+    $res .= '</a>';\r
+}\r
+$res .= '</div>'; // .footer-social\r
 $res .= '</footer>';\r
 \r
+$res .= '<footer class="legal">';\r
+$res .= $this->markupDotclear($this->option('footer'));\r
+$res .= '</footer>'; // footer.legal\r
+\r
 echo $res;
\ No newline at end of file
index bf7569b145a3656fd0698e2cad6d9cddb662ada2..a3411bb5f8ac364d813b55669453cceffb5e3e19 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,9 +4,9 @@ $start = microtime(true);
 ini_set('log_errors', '1');
 ini_set('error_log', dirname(__FILE__) . '/log/php_error.log');
 
-if ($_SERVER['HTTP_HOST'] == 'dev.fluidbook.com') {
+if (strpos($_SERVER['HTTP_HOST'], 'dev.') !== false) {
        define('APPLICATION_ENV', 'testing');
-} else if ($_SERVER['HTTP_HOST'] == 'www.') {
+} else {
        define('APPLICATION_ENV', 'production');
 }
 
index 786ced1baaa43f345714a8f82511d11dc6816008..683c8a901aa542b3e3ff08e9af0918a20a29f101 100644 (file)
@@ -1,2 +1,2 @@
-@import "001-variables";\r
+@import "001-variables";
 @import "003-mixins";
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..339d97ac6fa7050d426ad35392bcac7a2db084ec 100644 (file)
@@ -0,0 +1,16 @@
+//-- Fonts
+@opensans: 'Open Sans', sans-serif;
+@playfair: 'Playfair Display', serif;
+@montserrat: 'Montserrat', sans-serif;
+
+//-- General Fonts
+@heading-font: @playfair;
+@sub-heading-font: @montserrat;
+@body-font: @opensans;
+
+//-- Colours
+@color-footer-bg-primary: #263340;
+@color-footer-bg-secondary: #161e26;
+
+//-- Content and breakpoints
+@mobile-breakpoint: 1024px;
\ No newline at end of file
index 3626b599757a6a7d61791e3b751b11a5c1f70ac4..856b7561acadac11ba40bc633c7537c0c11fb1bf 100644 (file)
@@ -1,3 +1,5 @@
-body{\r
-       background: #f00;\r
+@import "000-imports";\r
+\r
+body {\r
+       font-family: @body-font;\r
 }
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..adacd16123e55f02b777e8d6a6368bb913a0aea2 100644 (file)
@@ -0,0 +1,12 @@
+// Special mixin to be used when fonts render too bold
+// See: https://maximilianhoffmann.com/posts/better-font-rendering-on-osx
+// also: http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
+.font-thinning() {
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.font-thinning-off() {
+  -webkit-font-smoothing: auto;
+  -moz-osx-font-smoothing: auto;
+}
\ No newline at end of file
diff --git a/less/footer.less b/less/footer.less
new file mode 100644 (file)
index 0000000..947c828
--- /dev/null
@@ -0,0 +1,23 @@
+@import "000-imports";
+
+footer {
+  .font-thinning();
+
+  a {
+    color: #fff;
+    text-decoration: none;
+  }
+}
+
+footer.site {
+  color: #fff;
+  background-color: @color-footer-bg-primary;
+  padding: 75px 85px 75px 42px;
+}
+
+// Copyright and legal bar
+footer.legal {
+  background-color: @color-footer-bg-secondary;
+  color: #5c6268;
+  padding: 40px 85px;
+}
\ No newline at end of file