-
Notifications
You must be signed in to change notification settings - Fork 0
fix: restore missing assets (Font Awesome, Sora fonts, favicon) #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| (function () { | ||
| 'use strict'; | ||
| if (localStorage.getItem('ck_cookie_consent')) return; | ||
|
|
||
| var lang = document.documentElement.lang || 'tr'; | ||
| var isTR = lang.startsWith('tr'); | ||
|
|
||
| var banner = document.createElement('div'); | ||
| banner.id = 'cookieConsent'; | ||
| banner.setAttribute('role', 'alert'); | ||
| banner.setAttribute('aria-live', 'polite'); | ||
|
|
||
| var inner = document.createElement('div'); | ||
| inner.className = 'cc-inner'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script relies on the |
||
|
|
||
| var p = document.createElement('p'); | ||
| p.textContent = isTR | ||
| ? 'Bu site yalnızca güvenlik amaçlı teknik çerezler (Cloudflare) kullanmaktadır. Analiz veya izleme çerezi kullanılmamaktadır. ' | ||
| : 'This site only uses technical cookies (Cloudflare) for security purposes. No analytics or tracking cookies are used. '; | ||
|
|
||
| var link = document.createElement('a'); | ||
| link.href = isTR ? '/privacy-policy.html' : '/en/privacy-policy.html'; | ||
| link.textContent = isTR ? 'Gizlilik Politikası' : 'Privacy Policy'; | ||
| p.appendChild(link); | ||
|
|
||
| var btn = document.createElement('button'); | ||
| btn.id = 'ccAccept'; | ||
| btn.type = 'button'; | ||
| btn.textContent = isTR ? 'Anladım' : 'Got it'; | ||
|
|
||
| inner.appendChild(p); | ||
| inner.appendChild(btn); | ||
| banner.appendChild(inner); | ||
| document.body.appendChild(banner); | ||
|
|
||
| btn.addEventListener('click', function () { | ||
| localStorage.setItem('ck_cookie_consent', '1'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| banner.classList.add('cc-hidden'); | ||
| setTimeout(function () { banner.remove(); }, 400); | ||
| }); | ||
| })(); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly accessing
localStoragecan throw aSecurityErrororReferenceErrorin certain browser configurations, such as when cookies are blocked or in restricted private browsing modes. It is safer to wrap this check in atry...catchblock to prevent the script from crashing and ensuring the rest of the page logic remains functional.