|
4 | 4 | --- |
5 | 5 | <meta name="facebook-domain-verification" content="iyq6csa05w60ox2ouz7tjma4owsvlf" /> |
6 | 6 |
|
7 | | -<!-- Cookie Consent CSS & JS z CDN --> |
8 | | -<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.9.2/dist/cookieconsent.css"> |
9 | | -<script defer src="https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.9.2/dist/cookieconsent.js"></script> |
10 | | - |
11 | 7 | <style> |
12 | 8 | :root { |
13 | 9 | --bg-main: #0a0c10; |
|
375 | 371 | color: var(--accent-green); |
376 | 372 | } |
377 | 373 |
|
378 | | - /* Dynamic Style Overrides for Cookie Consent Dark Theme */ |
379 | | - #cc--main { |
380 | | - --cc-bg: #12161f; |
381 | | - --cc-text: #f3f4f6; |
382 | | - --cc-btn-primary-bg: #22c55e; |
383 | | - --cc-btn-primary-text: #000000; |
384 | | - --cc-btn-primary-hover-bg: #16a34a; |
385 | | - --cc-btn-secondary-bg: #1e2638; |
386 | | - --cc-btn-secondary-text: #f3f4f6; |
387 | | - --cc-btn-secondary-hover-bg: #2a344d; |
388 | | - --cc-cookie-category-title-color: #06b6d4; |
389 | | - font-family: 'JetBrains Mono', monospace !important; |
| 374 | + /* Native Cookie Banner Styles */ |
| 375 | + #cookie-banner { |
| 376 | + position: fixed; |
| 377 | + bottom: 20px; |
| 378 | + left: 50%; |
| 379 | + transform: translateX(-50%); |
| 380 | + width: calc(100% - 40px); |
| 381 | + max-width: 580px; |
| 382 | + background-color: #12161f; |
| 383 | + border: 1px solid var(--border-color); |
| 384 | + border-radius: 12px; |
| 385 | + padding: 20px; |
| 386 | + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8); |
| 387 | + z-index: 999999; |
| 388 | + display: none; |
| 389 | + font-family: 'JetBrains Mono', monospace; |
| 390 | + color: var(--text-primary); |
| 391 | + } |
| 392 | + |
| 393 | + .cookie-title { |
| 394 | + font-size: 0.95rem; |
| 395 | + font-weight: 700; |
| 396 | + color: var(--text-primary); |
| 397 | + margin-bottom: 8px; |
| 398 | + display: flex; |
| 399 | + align-items: center; |
| 400 | + gap: 8px; |
| 401 | + } |
| 402 | + |
| 403 | + .cookie-content { |
| 404 | + font-size: 0.8rem; |
| 405 | + line-height: 1.5; |
| 406 | + color: var(--text-secondary); |
| 407 | + margin-bottom: 16px; |
| 408 | + } |
| 409 | + |
| 410 | + .cookie-content a { |
| 411 | + color: var(--accent-cyan); |
| 412 | + text-decoration: underline; |
| 413 | + } |
| 414 | + |
| 415 | + .cookie-actions { |
| 416 | + display: flex; |
| 417 | + gap: 10px; |
| 418 | + justify-content: flex-end; |
| 419 | + } |
| 420 | + |
| 421 | + .cookie-btn { |
| 422 | + padding: 8px 16px; |
| 423 | + border-radius: 6px; |
| 424 | + font-size: 0.78rem; |
| 425 | + font-weight: 600; |
| 426 | + font-family: 'JetBrains Mono', monospace; |
| 427 | + cursor: pointer; |
| 428 | + border: none; |
| 429 | + transition: all 0.2s ease; |
| 430 | + } |
| 431 | + |
| 432 | + .cookie-btn-accept { |
| 433 | + background-color: var(--accent-green); |
| 434 | + color: #000; |
| 435 | + } |
| 436 | + |
| 437 | + .cookie-btn-accept:hover { |
| 438 | + background-color: #16a34a; |
| 439 | + } |
| 440 | + |
| 441 | + .cookie-btn-reject { |
| 442 | + background-color: rgba(255, 255, 255, 0.05); |
| 443 | + color: var(--text-primary); |
| 444 | + border: 1px solid var(--border-color); |
| 445 | + } |
| 446 | + |
| 447 | + .cookie-btn-reject:hover { |
| 448 | + background-color: rgba(255, 255, 255, 0.1); |
| 449 | + border-color: var(--text-muted); |
390 | 450 | } |
391 | 451 |
|
392 | 452 | /* Responsive Design */ |
@@ -542,46 +602,41 @@ <h3>// ROADMAP & PLANS</h3> |
542 | 602 | <p> |
543 | 603 | © DevLabStudy | |
544 | 604 | <a href="/polityka-prywatnosci">Polityka Prywatności</a> | |
545 | | - <a href="#" data-cc="c-settings">Ustawienia Cookies</a> |
| 605 | + <a href="#" onclick="openCookieSettings(event)">Ustawienia Cookies</a> |
546 | 606 | </p> |
547 | 607 | </footer> |
548 | 608 | </div> |
549 | 609 |
|
550 | | -<!-- Skrypt inicjalizujący Baner CookieConsent --> |
| 610 | +<!-- Niewidoczna struktura banera cookie --> |
| 611 | +<div id="cookie-banner"> |
| 612 | + <div class="cookie-title">🍪 Strona używa plików cookie</div> |
| 613 | + <div class="cookie-content"> |
| 614 | + Używamy plików cookie w celu zapewnienia prawidłowego działania witryny oraz wyświetlania multimediów. Więcej szczegółów znajdziesz w naszej <a href="/polityka-prywatnosci">Polityce Prywatności</a>. |
| 615 | + </div> |
| 616 | + <div class="cookie-actions"> |
| 617 | + <button class="cookie-btn cookie-btn-reject" onclick="setCookieConsent('necessary')">Tylko niezbędne</button> |
| 618 | + <button class="cookie-btn cookie-btn-accept" onclick="setCookieConsent('all')">Akceptuję</button> |
| 619 | + </div> |
| 620 | +</div> |
| 621 | + |
| 622 | +<!-- Czysty skrypt JavaScript bez bibliotek zewnętrznych --> |
551 | 623 | <script> |
552 | | - window.addEventListener('load', function () { |
553 | | - var cc = initCookieConsent(); |
554 | | - |
555 | | - cc.run({ |
556 | | - current_lang: 'pl', |
557 | | - autoclear_cookies: true, |
558 | | - page_scripts: true, |
559 | | - |
560 | | - gui_options: { |
561 | | - consent_modal: { |
562 | | - layout: 'cloud', |
563 | | - position: 'bottom center', |
564 | | - transition: 'slide', |
565 | | - swap_buttons: false |
566 | | - } |
567 | | - }, |
568 | | - |
569 | | - languages: { |
570 | | - 'pl': { |
571 | | - consent_modal: { |
572 | | - title: 'Strona używa plików cookie 🍪', |
573 | | - description: 'Używamy plików cookie w celu prawidłowego działania witryny oraz multimediów. Więcej dowiesz się w naszej <a href="/polityka-prywatnosci">Polityce Prywatności</a>.', |
574 | | - primary_btn: { |
575 | | - text: 'Akceptuję', |
576 | | - role: 'accept_all' |
577 | | - }, |
578 | | - secondary_btn: { |
579 | | - text: 'Tylko niezbędne', |
580 | | - role: 'accept_necessary' |
581 | | - } |
582 | | - } |
583 | | - } |
584 | | - } |
585 | | - }); |
586 | | - }); |
| 624 | + function checkCookieConsent() { |
| 625 | + var consent = localStorage.getItem('devlab_cookie_consent'); |
| 626 | + if (!consent) { |
| 627 | + document.getElementById('cookie-banner').style.display = 'block'; |
| 628 | + } |
| 629 | + } |
| 630 | + |
| 631 | + function setCookieConsent(type) { |
| 632 | + localStorage.setItem('devlab_cookie_consent', type); |
| 633 | + document.getElementById('cookie-banner').style.display = 'none'; |
| 634 | + } |
| 635 | + |
| 636 | + function openCookieSettings(e) { |
| 637 | + if (e) e.preventDefault(); |
| 638 | + document.getElementById('cookie-banner').style.display = 'block'; |
| 639 | + } |
| 640 | + |
| 641 | + document.addEventListener('DOMContentLoaded', checkCookieConsent); |
587 | 642 | </script> |
0 commit comments