Created
May 21, 2018 07:53
-
-
Save davidDigio/94be529dbe30d852a7b2785a416aa45b to your computer and use it in GitHub Desktop.
Revisions
-
davidDigio created this gist
May 21, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ /* Mensaje aviso cookies */ #cookiebar { display: none; position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: 20px; width: 100%; text-align: center; min-height: 110px; background-color: rgba(0, 0, 0, .5); color: #fff; z-index: 99999 } #cookiebar .inner { width: 100%; position: absolute; padding-left: 5px; font-family: Verdana; font-size: 12px; top: 22% } #cookiebar .inner a.ok { padding: 4px; color: #00ff2e; text-decoration: none } #cookiebar .inner a.info { padding-left: 5px; text-decoration: none; color: #faff00 } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <div id="cookiebar"> <div class="inner"> <?= __('Utilizamos cookies propias y de terceros, analizando sus hábitos de navegación en nuestra página web, con la finalidad de garantizar la calidad, seguridad y mejora de los servicios ofrecidos a través de la misma. En los casos en que el usuario no manifieste expresamente si acepta o no la instalación de las cookies, pero continúe utilizando nuestra página web, se entenderá que éste ha dado su consentimiento, informándole expresamente de la posibilidad de bloquear o eliminar las cookies instaladas en su equipo mediante la configuración de las opciones del navegador. Puede obtener más información a este respecto consultando nuestra “Política de Cookies”.') ?> <a href="javascript:void(0);" class="ok" onclick="acceptCookie();"><b><?= __('Aceptar') ?></b></a> | <a href="legal/cookies" target="_blank" class="info"><?= __('Política de cookies') ?></a> </div> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ function getCookie(c_name){ var c_value = document.cookie; var c_start = c_value.indexOf(" " + c_name + "="); if (c_start == -1){ c_start = c_value.indexOf(c_name + "="); } if (c_start == -1){ c_value = null; }else{ c_start = c_value.indexOf("=", c_start) + 1; var c_end = c_value.indexOf(";", c_start); if (c_end == -1){ c_end = c_value.length; } c_value = decodeURI(c_value.substring(c_start,c_end)); } return c_value; } function setCookie(c_name,value,exdays){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=encodeURI(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value+';path=/;domain=.' + document.domain; } if(getCookie('cookieAccepted')!="1"){ document.getElementById("cookiebar").style.display="block"; } function acceptCookie(){ setCookie('cookieAccepted','1',365); document.getElementById("cookiebar").style.display="none"; }