Advertisement
leostfn

lgpd

Apr 30th, 2022
953
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.63 KB | None | 0 0
  1. <!--- LGPD ---->
  2. <div class="custom-container-lgpd">
  3.   <div class="box-content">
  4.     <p>Bem-vindo!</p>
  5.     <p style="margin-top: 10px">A DuNordy usa cookies para armazenar informações sobre como você usa o nosso site. Tudo para tornar sua experiência a mais agradável possível. Para entender os tipos de
  6.       cookies que utilizamos, clique em '<a href="/paginas/lgpd_parceiro">Termos de Uso e Política de Privacidade</a>'.
  7.       Ao clicar em 'Aceitar', você consente com a utilização de cookies e com os termos de uso e política de
  8.       privacidade.</p></div>
  9.   <div class="box-button">
  10.     <button id="lgpdAaceitarBtn">ACEITAR</button>
  11.     <button onclick="location.href='/paginas/lgpd_parceiro'">TERMOS DE USO</button>
  12.   </div>
  13. </div>
  14.  
  15. <style>
  16.     .custom-container-lgpd {
  17.         position: fixed;
  18.         bottom: 20px;
  19.         left: 50%;
  20.         transform: translate(-50%);
  21.         background-color: #fff;
  22.         color: #555;
  23.         z-index: 999;
  24.         box-sizing: border-box;
  25.         padding: 20px;
  26.         max-width: 1170px;
  27.         width: 100%;
  28.         display: none;
  29.         align-items: center;
  30.         justify-content: space-between;
  31.         border: 1px solid hsla(0,0%,44%,.25);
  32.         box-shadow: 0 2px 4px 0 rgb(0 0 0 / 16%);
  33.     }
  34.  
  35.     .custom-container-lgpd .box-content {
  36.         font-size: 14px;
  37.         flex: 1;
  38.     }
  39.  
  40.     .custom-container-lgpd .box-button {
  41.         margin-left: 20px;
  42.         display: flex;
  43.         flex-direction: column;
  44.         justify-content: space-between;
  45.         height: 80px;
  46.     }
  47.  
  48.     .custom-container-lgpd .box-button button {
  49.         padding: 8px 15px;
  50.         background: #dd3e45;
  51.         color: #fbfcff;
  52.         border-radius: 0;
  53.         font-weight: 700;
  54.         border: transparent;
  55.         font-size: 12px;
  56.         width: 150px;
  57.     }
  58.  
  59.     @media (max-width: 767px) {
  60.         .custom-container-lgpd {
  61.             flex-direction: column;
  62.         }
  63.  
  64.         .custom-container-lgpd .box-button {
  65.             flex-direction: row;
  66.             align-items: center;
  67.             width: 100%;
  68.             margin: 15px 0 0;
  69.             height: auto;
  70.         }
  71.     }
  72. </style>
  73. <script>
  74.     function lgpdAceito() {
  75.         return localStorage.getItem('lgpd-aceito') === 'sim';
  76.     }
  77.  
  78.     const lgpdElement = $('.custom-container-lgpd');
  79.     const lgpdAceitarBtnElement = $('#lgpdAaceitarBtn');
  80.  
  81.     if(!lgpdAceito()) {
  82.         lgpdElement.css('display', 'flex');
  83.     }
  84.  
  85.     lgpdAceitarBtnElement.on('click touchend', function (e) {
  86.         localStorage.setItem('lgpd-aceito', 'sim');
  87.         lgpdElement.css('display', 'none');
  88.     });
  89. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement