PHP Classes

File: resources/views/index/cookie18.blade.php

Recommend this page to a friend!
  Classes of adam berger   Laravel Cookie 18   resources/views/index/cookie18.blade.php   Download  
File: resources/views/index/cookie18.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Cookie 18
Ask the users to confirm they are adults
Author: By
Last change:
Date: 8 months ago
Size: 2,528 bytes


Class file image Download
.cookis-box {

  background: #000000;
  opacity: 0.9;
  z-index: 9999;
  position: fixed; /* Stoi w jednym miejscu niezaleznie od strony */
.cookis-box .container {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  padding-bottom: 20px;

<div class="cookis-box">
    <div class="cookis-history">
        <i class="bi bi-clock-history"></i>
    <div class="container">
        <div class="modal bg-dark text-black-50" id="box18Input" tabindex="-1" aria-labelledby="titleModalLabel" aria-hidden="true" >
          <div class="modal-dialog">
            <div class="modal-content bg-secondary">
              <div class="modal-header">
                <h5 class="modal-title" id="titleModalLabel">Informacja Strony</h5>
                <button type="button" class="btn-close close-cookis" data-bs-dismiss="modal" aria-label="Close"></button>
              <div class="modal-body">
                  <p>Ta strona ma tre?ci przeznaczone tylko dla osób które uko?czy?y <b class="text-danger">18 lat</b></p>
                <p>Je?eli nie masz tyle lat to opu?? t? stron? poprzez naci?ni?cie przycisku Zamknij</p>
              <div class="modal-footer">
                <button type="button" class="btn btn-warning close-cookis" data-bs-dismiss="modal">Zamknij</button>
                <button type="button" class="btn btn-success accept-cookis">Wchodz? na stron?</button>

        // otwieramy box
       // blokujemy t?o na klikanie

    const nameCookis = '{{ $cookis[1] }}';
    const coc = '{{ $cookis[0] }}';
    // przekierowanie po klikni?ciu Zamknij

          // Zapisz cookie
          // wy??cz box
    function setCookis(name) {
                const value = '{{ $cookis[2] }}';
              // Save
                document.cookie = name + '=' + value
                    + '; max-age='+(360 * 24 * 60 * 60)
                    + '; path=/'
                    + '; samesite= Lax';