From ff095c7165425c49ec90fa8cdfd906498d52a4a6 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 6 Mar 2015 15:05:07 +0000 Subject: [PATCH] Implement privacy banner and settings --- framework/application/configs/application.ini | 3 + framework/application/forms/Settings.php | 7 + less/bannerCookies.less | 3 + less/common.less | 129 ++++++++++-------- 4 files changed, 84 insertions(+), 58 deletions(-) create mode 100644 less/bannerCookies.less diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index da808d7..2ef479f 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -49,6 +49,9 @@ acl.roles[] = admin mail.test = APPLICATION_PATH "/../data/email/test" +privacy.dnt = 1 +privacy.analytics = 1 + [testing : production] dev = true diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index def7559..339bfbe 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -60,9 +60,16 @@ class Cubedesigners_Form_Settings extends CubeIT_Form_Settings { $copyright->setLabel('Copyright du bas de page'); $this->addElementLocalized($copyright); + + $privacy = new CubeIT_Form_Element_Markitup('privacy_text'); + $privacy->setLabel(__('Mention vie privée')); + $this->addElement($privacy); + $tags = new Cubedesigners_Form_Element_Tags('tags'); $tags->setLabel(__('Tags')); $this->addElement($tags); + + } } \ No newline at end of file diff --git a/less/bannerCookies.less b/less/bannerCookies.less new file mode 100644 index 0000000..61d41b5 --- /dev/null +++ b/less/bannerCookies.less @@ -0,0 +1,3 @@ +#cookieBanner { + background-color: #262626; +} \ No newline at end of file diff --git a/less/common.less b/less/common.less index bddc56c..e3cf91a 100644 --- a/less/common.less +++ b/less/common.less @@ -3,30 +3,30 @@ /* apply a natural box layout model to all elements, but allowing components to change */ /* Reference: http://www.paulirish.com/2012/box-sizing-border-box-ftw/ */ html { - box-sizing: border-box; + box-sizing: border-box; } + *, *:before, *:after { - box-sizing: inherit; + box-sizing: inherit; } img.responsive { - max-width: 100%; - height: auto; + max-width: 100%; + height: auto; } -.content,.cubeit-content{ - max-width: 1048px; // = 980+(34*2) - Allow room for the 34px padding on each side - min-width: 530px; // Be careful of this setting and affecting the viewport initial-scale - margin:0 auto; - padding-right: 34px; - padding-left: 34px; - position:relative; - - -// @media screen and (max-width: 980 + (34*2)px) { -// padding: 0; -// margin: 0 34px; -// } +.content, .cubeit-content { + max-width: 1048px; // = 980+(34*2) - Allow room for the 34px padding on each side + min-width: 530px; // Be careful of this setting and affecting the viewport initial-scale + margin: 0 auto; + padding-right: 34px; + padding-left: 34px; + position: relative; + + // @media screen and (max-width: 980 + (34*2)px) { + // padding: 0; + // margin: 0 34px; + // } } //.small{ @@ -35,74 +35,73 @@ img.responsive { // } //} - body { font-family: @roboto; - font-size:16px; - font-weight:300; - color:#1b1b1b; - opacity:0; - transition:opacity 0.25s linear; + font-size: 16px; + font-weight: 300; + color: #1b1b1b; + opacity: 0; + transition: opacity 0.25s linear; } -#wrapper{ - overflow:hidden; +#wrapper { + overflow: hidden; max-width: 100%; } -.wf-active body{ - opacity:1; +.wf-active body { + opacity: 1; } -h1,h2,h3,h4,h5,h6 { +h1, h2, h3, h4, h5, h6 { font-weight: 300; } -strong,b{ + +strong, b { font-weight: 400; } a { text-decoration: none; - color:#3885e0; + color: #3885e0; } a:hover, a:active { - color:#3885e0; + color: #3885e0; } a.but { display: inline-block; - color:#fff; - background-color: #2874ce; - clear:both; + color: #fff; + background-color: #2874ce; + clear: both; border-radius: 2px; padding: 10px 15px 12px; - line-height:12px; - margin:15px 0 0 0; - font-weight:400; - font-size:16px; - text-decoration:none !important; - &:hover,&.active { + line-height: 12px; + margin: 15px 0 0 0; + font-weight: 400; + font-size: 16px; + text-decoration: none !important; + &:hover, &.active { background-color: #84ae1e !important; - color:#fff !important; + color: #fff !important; } } - -#main{ - overflow-x:hidden; - overflow-y:visible; +#main { + overflow-x: hidden; + overflow-y: visible; .main-holder { - width:100%; + width: 100%; padding: 0 20px 50px 20px; } - ul{ - list-style:none; - li{ - &:before{ - content:"- "; + ul { + list-style: none; + li { + &:before { + content: "- "; } } } @@ -120,19 +119,33 @@ a.but { text-align: left; font-size: 22px; line-height: 25px; - white-space: pre-line; // Preserve line breaks from content + white-space: pre-line; // Preserve line breaks from content - @media screen and (max-width: 980px){ - white-space: normal; - } + @media screen and (max-width: 980px) { + white-space: normal; + } } } -.dotclear{ - h3,h4{ +.dotclear { + h3, h4 { font-weight: 400; } - p{ + p { line-height: 1.56em; } +} + +.ajaxpopup { + .dotclear { + font-size: 16px; + p { + margin: 10px 0; + } + + h2 { + font-weight: 400; + } + } + } \ No newline at end of file -- 2.39.5