fix: resolve Decap CMS media 404s and add Turkish translations
- Fix Decap CMS configuration with proper media folder paths - Add Turkish translations for sharing interface elements - Implement smart background handling for transparent logos - Update image path conversion system for CMS compatibility - Add comprehensive image optimization with Astro assets - Update all blog post image paths for consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
@@ -3,6 +3,5 @@
|
||||
/#recovery_token=* /auth?recovery_token=:splat 200
|
||||
/#invite_token=* /auth?invite_token=:splat 200
|
||||
|
||||
# Admin panel redirect
|
||||
/admin/ /decapcms/index.html 200
|
||||
/admin/index.html /decapcms/index.html 200
|
||||
# Admin panel access
|
||||
/admin /admin/ 302
|
||||
@@ -6,8 +6,8 @@ backend:
|
||||
- editor
|
||||
squash_merges: true
|
||||
|
||||
media_folder: 'src/assets/images'
|
||||
public_folder: '~/assets/images'
|
||||
media_folder: 'public/images'
|
||||
public_folder: '/images'
|
||||
|
||||
locale: 'tr'
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex" />
|
||||
<title>ARC İçerik Yöneticisi</title>
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Decap CMS -->
|
||||
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||
<script>
|
||||
// Initialize Netlify Identity widget with role checking
|
||||
if (window.netlifyIdentity) {
|
||||
window.netlifyIdentity.on('init', (user) => {
|
||||
if (!user) {
|
||||
window.netlifyIdentity.on('login', () => {
|
||||
document.location.href = '/admin/';
|
||||
});
|
||||
} else {
|
||||
// Check if user has required roles
|
||||
checkUserRole(user);
|
||||
}
|
||||
});
|
||||
|
||||
window.netlifyIdentity.on('login', (user) => {
|
||||
checkUserRole(user);
|
||||
});
|
||||
}
|
||||
|
||||
function checkUserRole(user) {
|
||||
const allowedRoles = ['admin', 'editor'];
|
||||
const userRoles = user.app_metadata?.roles || [];
|
||||
|
||||
// Check if user has any of the allowed roles
|
||||
const hasAccess = allowedRoles.some(role => userRoles.includes(role));
|
||||
|
||||
if (!hasAccess) {
|
||||
// User doesn't have required roles
|
||||
alert('Erişim reddedildi. Bu alanı kullanmak için yönetici izni gereklidir.');
|
||||
window.netlifyIdentity.logout();
|
||||
window.location.href = '/';
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,8 +6,8 @@ backend:
|
||||
- editor
|
||||
squash_merges: true
|
||||
|
||||
media_folder: 'src/assets/images'
|
||||
public_folder: '~/assets/images'
|
||||
media_folder: 'public/images'
|
||||
public_folder: '/images'
|
||||
|
||||
locale: 'tr'
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 384 KiB |
|
After Width: | Height: | Size: 541 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 172 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 7.1 MiB |
|
After Width: | Height: | Size: 403 KiB |
|
After Width: | Height: | Size: 499 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 200 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 177 KiB |
|
After Width: | Height: | Size: 271 KiB |
|
After Width: | Height: | Size: 289 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 573 KiB |
|
After Width: | Height: | Size: 402 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 270 KiB |
|
After Width: | Height: | Size: 571 KiB |
|
After Width: | Height: | Size: 7.1 MiB |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="1200px" height="1200px" viewBox="0 0 1200 1200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group">
|
||||
<rect id="Rectangle" fill="#f0f5fb" x="0" y="0" width="1200" height="1200"></rect>
|
||||
<g id="avada" transform="translate(391.000000, 391.000000)" fill="#9eb8e6" fill-rule="nonzero">
|
||||
<path d="M0.918313734,405.706043 C-2.00418604,411.476457 2.42131362,418 8.93431312,418 C193.970299,418.334049 332.079289,239.116723 230.710296,34.9779032 L215.596797,4.70414119 C212.423798,-1.56804706 203.572798,-1.56804706 200.399799,4.70414119 L0.918313734,405.706043 Z" id="Path"></path>
|
||||
<path d="M323.729254,220.712286 C320.553105,214.429238 311.609737,214.429238 308.517171,220.712286 L262.546589,310.601763 C237.806059,360.112182 268.898888,418 328.493478,418 L409.485283,418 C415.753999,418 419.933143,411.381856 417.091325,405.685226 L323.729254,220.712286 Z" id="Path"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 402 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 270 KiB |
|
After Width: | Height: | Size: 475 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 292 KiB |
|
After Width: | Height: | Size: 310 KiB |
|
After Width: | Height: | Size: 420 KiB |
|
After Width: | Height: | Size: 380 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 644 KiB |
|
After Width: | Height: | Size: 674 KiB |
|
After Width: | Height: | Size: 730 KiB |
|
After Width: | Height: | Size: 765 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 74 KiB |