index_new.php 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <?php
  2. $pageTitle = 'Site Settings - Admin Panel';
  3. $headerTitle = 'Site Settings';
  4. $activeTab = 'content';
  5. $tabs = [
  6. 'content' => [
  7. 'label' => 'Content',
  8. 'icon' => 'M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z'
  9. ],
  10. 'options' => [
  11. 'label' => 'Options',
  12. 'icon' => 'M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z'
  13. ],
  14. 'styles' => [
  15. 'label' => 'Styles',
  16. 'icon' => 'M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z'
  17. ],
  18. 'seo' => [
  19. 'label' => 'SEO & Meta',
  20. 'icon' => 'M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z'
  21. ]
  22. ];
  23. ob_start();
  24. ?>
  25. <?php include __DIR__ . '/partials/tabs.php'; ?>
  26. <!-- Form -->
  27. <form method="POST" action="" enctype="multipart/form-data">
  28. <input type="hidden" name="form_submitted" value="1">
  29. <!-- Content Tab -->
  30. <div x-show="activeTab === 'content'" class="bg-white rounded-lg shadow-sm">
  31. <div class="p-6 space-y-8">
  32. <!-- Button Settings -->
  33. <div>
  34. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  35. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  36. <path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
  37. </svg>
  38. Header Button Settings
  39. </h3>
  40. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  41. <div>
  42. <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 1</label>
  43. <input type="text" name='content[header_btn_1]' value="<?= htmlspecialchars($content['header_btn_1'] ?? '') ?>"
  44. 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">
  45. </div>
  46. <div>
  47. <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 2</label>
  48. <input type="text" name='content[header_btn_2]' value="<?= htmlspecialchars($content['header_btn_2'] ?? '') ?>"
  49. 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">
  50. </div>
  51. <div class="flex items-center lg:col-span-2">
  52. <input type="hidden" name="content[hide-btns]" value="0">
  53. <input type="checkbox" name="content[hide-btns]" value="1" <?= !empty($content['hide-btns']) ? 'checked' : '' ?>
  54. class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
  55. <label class="ml-2 block text-sm text-gray-900">Hide header buttons</label>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- Images & Media Section -->
  60. <div>
  61. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  62. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  63. <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/>
  64. </svg>
  65. Images & Media
  66. </h3>
  67. <!-- Header Logo -->
  68. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  69. <h4 class="text-md font-medium text-gray-800 mb-4">Header Logo</h4>
  70. <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
  71. <div>
  72. <?php
  73. $headerLogo = [];
  74. if (isset($content['header-logo']) && !empty($content['header-logo'])) {
  75. $headerLogo = json_decode($content['header-logo'], true) ?: [];
  76. }
  77. ?>
  78. <?php if (!empty($headerLogo['src'])): ?>
  79. <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $headerLogo['src'] ?>" alt="Header Logo">
  80. <?php endif; ?>
  81. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Header Logo</label>
  82. <input type="file" name="content[header-logo]" accept="image/*"
  83. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  84. </div>
  85. <div>
  86. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  87. <input type="text" name='content[header-logo][title]' value="<?= htmlspecialchars($headerLogo['title'] ?? '') ?>"
  88. 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">
  89. </div>
  90. <div>
  91. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  92. <input type="text" name='content[header-logo][alt]' value="<?= htmlspecialchars($headerLogo['alt'] ?? '') ?>"
  93. 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">
  94. </div>
  95. </div>
  96. </div>
  97. <!-- Banner Logo -->
  98. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  99. <h4 class="text-md font-medium text-gray-800 mb-4">Banner Image</h4>
  100. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  101. <div>
  102. <?php
  103. $bannerLogo = [];
  104. if (isset($content['banner-logo']) && !empty($content['banner-logo'])) {
  105. $bannerLogo = json_decode($content['banner-logo'], true) ?: [];
  106. }
  107. ?>
  108. <?php if (!empty($bannerLogo['src'])): ?>
  109. <img class="w-full h-24 object-cover rounded-lg border mb-2" src="../<?= $bannerLogo['src'] ?>" alt="Banner Image">
  110. <?php endif; ?>
  111. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Banner Image</label>
  112. <input type="file" name="content[banner-logo]" accept="image/*"
  113. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  114. </div>
  115. <div class="space-y-4">
  116. <div>
  117. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  118. <input type="text" name='content[banner-logo][title]' value="<?= htmlspecialchars($bannerLogo['title'] ?? '') ?>"
  119. 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">
  120. </div>
  121. <div>
  122. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  123. <input type="text" name='content[banner-logo][alt]' value="<?= htmlspecialchars($bannerLogo['alt'] ?? '') ?>"
  124. 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">
  125. </div>
  126. <div class="grid grid-cols-2 gap-4">
  127. <div>
  128. <label class="block text-sm font-medium text-gray-700 mb-2">Width</label>
  129. <input type="text" name='content[banner-logo][width]' value="<?= htmlspecialchars($bannerLogo['width'] ?? '') ?>"
  130. 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">
  131. </div>
  132. <div>
  133. <label class="block text-sm font-medium text-gray-700 mb-2">Height</label>
  134. <input type="text" name='content[banner-logo][height]' value="<?= htmlspecialchars($bannerLogo['height'] ?? '') ?>"
  135. 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">
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <!-- Footer Logo -->
  142. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  143. <h4 class="text-md font-medium text-gray-800 mb-4">Footer Logo</h4>
  144. <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
  145. <div>
  146. <?php
  147. $footerLogo = [];
  148. if (isset($content['footer-logo']) && !empty($content['footer-logo'])) {
  149. $footerLogo = json_decode($content['footer-logo'], true) ?: [];
  150. }
  151. ?>
  152. <?php if (!empty($footerLogo['src'])): ?>
  153. <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $footerLogo['src'] ?>" alt="Footer Logo">
  154. <?php endif; ?>
  155. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Footer Logo</label>
  156. <input type="file" name="content[footer-logo]" accept="image/*"
  157. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  158. </div>
  159. <div>
  160. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  161. <input type="text" name='content[footer-logo][title]' value="<?= htmlspecialchars($footerLogo['title'] ?? '') ?>"
  162. 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">
  163. </div>
  164. <div>
  165. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  166. <input type="text" name='content[footer-logo][alt]' value="<?= htmlspecialchars($footerLogo['alt'] ?? '') ?>"
  167. 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">
  168. </div>
  169. </div>
  170. </div>
  171. <!-- Other Images -->
  172. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  173. <div class="bg-gray-50 p-4 rounded-lg">
  174. <h4 class="text-md font-medium text-gray-800 mb-4">Favicon</h4>
  175. <?php if (!empty($content['favicon'])): ?>
  176. <img class="w-16 h-16 object-cover rounded border mb-2" src="../<?= $content['favicon'] ?>" alt="Favicon">
  177. <?php endif; ?>
  178. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Favicon</label>
  179. <input type="file" name="content[favicon]" accept="image/*"
  180. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  181. </div>
  182. </div>
  183. </div>
  184. <!-- Footer Settings -->
  185. <div>
  186. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  187. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  188. <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
  189. </svg>
  190. Footer Content
  191. </h3>
  192. <div class="grid grid-cols-1 gap-6">
  193. <div>
  194. <label class="block text-sm font-medium text-gray-700 mb-2">Footer Text</label>
  195. <textarea name='content[footer__text]' rows="4"
  196. 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"><?= htmlspecialchars($content['footer__text'] ?? '') ?></textarea>
  197. </div>
  198. <div>
  199. <label class="block text-sm font-medium text-gray-700 mb-2">Copyright</label>
  200. <textarea name='content[copyright]' rows="2"
  201. 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"><?= htmlspecialchars($content['copyright'] ?? '') ?></textarea>
  202. </div>
  203. </div>
  204. </div>
  205. <!-- Save Button -->
  206. <div class="pt-6 border-t border-gray-200">
  207. <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">
  208. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  209. <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"/>
  210. </svg>
  211. Save Changes
  212. </button>
  213. </div>
  214. </div>
  215. </div>
  216. <!-- Options Tab -->
  217. <div x-show="activeTab === 'options'" class="bg-white rounded-lg shadow-sm">
  218. <div class="p-6 space-y-8">
  219. <!-- Hash Fields Section -->
  220. <div>
  221. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  222. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  223. <path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
  224. </svg>
  225. Hash Fields
  226. </h3>
  227. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  228. <div>
  229. <label class="block text-sm font-medium text-gray-700 mb-2">Hash</label>
  230. <input type="text" name='content[hash]' value="<?= htmlspecialchars($content['hash'] ?? '') ?>"
  231. 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">
  232. </div>
  233. <div>
  234. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 1</label>
  235. <input type="text" name='content[hash-1]' value="<?= htmlspecialchars($content['hash-1'] ?? '') ?>"
  236. 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">
  237. </div>
  238. <div>
  239. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 2</label>
  240. <input type="text" name='content[hash-2]' value="<?= htmlspecialchars($content['hash-2'] ?? '') ?>"
  241. 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">
  242. </div>
  243. <div>
  244. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 3</label>
  245. <input type="text" name='content[hash-3]' value="<?= htmlspecialchars($content['hash-3'] ?? '') ?>"
  246. 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">
  247. </div>
  248. <div>
  249. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 4</label>
  250. <input type="text" name='content[hash-4]' value="<?= htmlspecialchars($content['hash-4'] ?? '') ?>"
  251. 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">
  252. </div>
  253. <div>
  254. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 5</label>
  255. <input type="text" name='content[hash-5]' value="<?= htmlspecialchars($content['hash-5'] ?? '') ?>"
  256. 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">
  257. </div>
  258. </div>
  259. </div>
  260. <!-- Save Button -->
  261. <div class="pt-6 border-t border-gray-200">
  262. <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">
  263. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  264. <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"/>
  265. </svg>
  266. Save Changes
  267. </button>
  268. </div>
  269. </div>
  270. </div>
  271. <!-- Styles Tab -->
  272. <div x-show="activeTab === 'styles'" class="bg-white rounded-lg shadow-sm">
  273. <div class="p-6 space-y-8">
  274. <!-- Color Settings Section -->
  275. <div>
  276. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  277. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  278. <path fill-rule="evenodd" d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z" clip-rule="evenodd"/>
  279. </svg>
  280. Цветовые настройки
  281. </h3>
  282. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  283. <!-- Цвет хедера -->
  284. <div>
  285. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет хедера (шапки сайта)</label>
  286. <div class="flex gap-3">
  287. <input type="color" value="<?= $styles['header_color'] ?? '#1E1E1E' ?>"
  288. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  289. onchange="this.nextElementSibling.value = this.value">
  290. <input type="text" name='styles[header_color]' value="<?= htmlspecialchars($styles['header_color'] ?? '') ?>"
  291. placeholder="#1E1E1E"
  292. class="flex-1 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">
  293. </div>
  294. </div>
  295. <!-- Цвет body (фон) -->
  296. <div>
  297. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет body (фон сайта)</label>
  298. <div class="flex gap-3">
  299. <input type="color" value="<?= $styles['body_bg_color'] ?? '#0A0A0A' ?>"
  300. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  301. onchange="this.nextElementSibling.value = this.value">
  302. <input type="text" name='styles[body_bg_color]' value="<?= htmlspecialchars($styles['body_bg_color'] ?? '') ?>"
  303. placeholder="#0A0A0A"
  304. class="flex-1 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">
  305. </div>
  306. </div>
  307. <!-- Цвет контентной части -->
  308. <div>
  309. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет контентной части</label>
  310. <div class="flex gap-3">
  311. <input type="color" value="<?= $styles['content_bg_color'] ?? '#1A1A1A' ?>"
  312. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  313. onchange="this.nextElementSibling.value = this.value">
  314. <input type="text" name='styles[content_bg_color]' value="<?= htmlspecialchars($styles['content_bg_color'] ?? '') ?>"
  315. placeholder="#1A1A1A"
  316. class="flex-1 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">
  317. </div>
  318. </div>
  319. <!-- Цвет текста основного -->
  320. <div>
  321. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста основного</label>
  322. <div class="flex gap-3">
  323. <input type="color" value="<?= $styles['text_color'] ?? '#FFFFFF' ?>"
  324. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  325. onchange="this.nextElementSibling.value = this.value">
  326. <input type="text" name='styles[text_color]' value="<?= htmlspecialchars($styles['text_color'] ?? '') ?>"
  327. placeholder="#FFFFFF"
  328. class="flex-1 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">
  329. </div>
  330. </div>
  331. <!-- Цвет текста ссылок в контенте -->
  332. <div>
  333. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста ссылок в контенте</label>
  334. <div class="flex gap-3">
  335. <input type="color" value="<?= $styles['link_color'] ?? '#4A9EFF' ?>"
  336. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  337. onchange="this.nextElementSibling.value = this.value">
  338. <input type="text" name='styles[link_color]' value="<?= htmlspecialchars($styles['link_color'] ?? '') ?>"
  339. placeholder="#4A9EFF"
  340. class="flex-1 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">
  341. </div>
  342. </div>
  343. <!-- Цвет таблицы -->
  344. <div>
  345. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет таблицы (фон)</label>
  346. <div class="flex gap-3">
  347. <input type="color" value="<?= $styles['table_bg_color'] ?? '#1A1A1A' ?>"
  348. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  349. onchange="this.nextElementSibling.value = this.value">
  350. <input type="text" name='styles[table_bg_color]' value="<?= htmlspecialchars($styles['table_bg_color'] ?? '') ?>"
  351. placeholder="#1A1A1A"
  352. class="flex-1 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">
  353. </div>
  354. </div>
  355. <!-- Цвет шапки таблицы -->
  356. <div>
  357. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет шапки таблицы (thead)</label>
  358. <div class="flex gap-3">
  359. <input type="color" value="<?= $styles['table_header_color'] ?? '#2A2A2A' ?>"
  360. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  361. onchange="this.nextElementSibling.value = this.value">
  362. <input type="text" name='styles[table_header_color]' value="<?= htmlspecialchars($styles['table_header_color'] ?? '') ?>"
  363. placeholder="#2A2A2A"
  364. class="flex-1 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">
  365. </div>
  366. </div>
  367. <!-- Цвет фона футера -->
  368. <div>
  369. <label class="block text-sm font-medium text-gray-700 mb-2">Цвет фона футера</label>
  370. <div class="flex gap-3">
  371. <input type="color" value="<?= $styles['footer_bg_color'] ?? '#1E1E1E' ?>"
  372. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  373. onchange="this.nextElementSibling.value = this.value">
  374. <input type="text" name='styles[footer_bg_color]' value="<?= htmlspecialchars($styles['footer_bg_color'] ?? '') ?>"
  375. placeholder="#1E1E1E"
  376. class="flex-1 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">
  377. </div>
  378. </div>
  379. </div>
  380. </div>
  381. <!-- Save Button -->
  382. <div class="pt-6 border-t border-gray-200">
  383. <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">
  384. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  385. <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"/>
  386. </svg>
  387. Сохранить изменения
  388. </button>
  389. </div>
  390. </div>
  391. </div>
  392. <!-- SEO Tab -->
  393. <div x-show="activeTab === 'seo'" class="bg-white rounded-lg shadow-sm">
  394. <div class="p-6">
  395. <div class="text-center py-12">
  396. <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  397. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
  398. </svg>
  399. <h3 class="mt-2 text-sm font-medium text-gray-900">SEO Coming Soon</h3>
  400. <p class="mt-1 text-sm text-gray-500">SEO settings will be implemented in the next update.</p>
  401. </div>
  402. </div>
  403. </div>
  404. </form>
  405. <?php
  406. $content = ob_get_clean();
  407. include __DIR__ . '/partials/layout.php';
  408. ?>