|
|
@@ -425,13 +425,69 @@ ob_start();
|
|
|
|
|
|
<!-- SEO Tab -->
|
|
|
<div x-show="activeTab === 'seo'" class="bg-white rounded-lg shadow-sm">
|
|
|
- <div class="p-6">
|
|
|
- <div class="text-center py-12">
|
|
|
- <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
|
|
- </svg>
|
|
|
- <h3 class="mt-2 text-sm font-medium text-gray-900">SEO Coming Soon</h3>
|
|
|
- <p class="mt-1 text-sm text-gray-500">SEO settings will be implemented in the next update.</p>
|
|
|
+ <div class="p-6 space-y-8">
|
|
|
+
|
|
|
+ <!-- Hreflang Settings -->
|
|
|
+ <div x-data="{
|
|
|
+ hreflangs: <?= htmlspecialchars(json_encode(isset($seo['hreflang']) ? json_decode($seo['hreflang'], true) ?: [] : []), ENT_QUOTES, 'UTF-8') ?>,
|
|
|
+ addHreflang() {
|
|
|
+ this.hreflangs.push({hreflang: '', href: ''});
|
|
|
+ },
|
|
|
+ removeHreflang(index) {
|
|
|
+ this.hreflangs.splice(index, 1);
|
|
|
+ }
|
|
|
+ }">
|
|
|
+ <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
|
|
|
+ <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
|
|
|
+ <path fill-rule="evenodd" d="M7 2a1 1 0 011 1v1h3a1 1 0 110 2H9.578a18.87 18.87 0 01-1.724 4.78c.29.354.596.696.914 1.026a1 1 0 11-1.44 1.389c-.188-.196-.373-.396-.554-.6a18.9 18.9 0 01-2.62 3.624 1 1 0 11-1.44-1.389A16.9 16.9 0 003.578 8H2a1 1 0 110-2h2.578c.15-.667.34-1.32.578-1.96A1 1 0 015.5 4c.76 0 1.5.11 2.5.342V3a1 1 0 011-1zm1.578 6H7.422c.12.456.264.903.428 1.34.164-.437.308-.884.428-1.34zM17 6a3 3 0 11-6 0 3 3 0 016 0z" clip-rule="evenodd"/>
|
|
|
+ </svg>
|
|
|
+ Hreflang Settings
|
|
|
+ </h3>
|
|
|
+
|
|
|
+ <!-- Hidden input to store JSON data -->
|
|
|
+ <input type="hidden" name="seo[hreflang]" x-bind:value="JSON.stringify(hreflangs)">
|
|
|
+
|
|
|
+ <div class="space-y-4">
|
|
|
+ <template x-for="(item, index) in hreflangs" :key="index">
|
|
|
+ <div class="flex gap-4 items-end">
|
|
|
+ <div class="flex-1">
|
|
|
+ <label class="block text-sm font-medium text-gray-700 mb-2">Language Code</label>
|
|
|
+ <input type="text" x-model="item.hreflang" placeholder="en, ru, de, x-default"
|
|
|
+ class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
|
+ </div>
|
|
|
+ <div class="flex-2">
|
|
|
+ <label class="block text-sm font-medium text-gray-700 mb-2">URL</label>
|
|
|
+ <input type="url" x-model="item.href" placeholder="https://example.com/en/"
|
|
|
+ class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
|
+ </div>
|
|
|
+ <button type="button" @click="removeHreflang(index)"
|
|
|
+ class="px-3 py-2 text-red-600 hover:text-red-800 border border-red-300 hover:border-red-500 rounded-md transition-colors">
|
|
|
+ <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
|
+ <path fill-rule="evenodd" d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z" clip-rule="evenodd"/>
|
|
|
+ <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/>
|
|
|
+ </svg>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <button type="button" @click="addHreflang()"
|
|
|
+ class="inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
|
|
|
+ <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
|
|
|
+ <path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd"/>
|
|
|
+ </svg>
|
|
|
+ Add Hreflang
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Save Button -->
|
|
|
+ <div class="pt-6 border-t border-gray-200">
|
|
|
+ <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
|
|
|
+ <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
|
|
|
+ <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
|
|
|
+ </svg>
|
|
|
+ Save Settings
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|