front_page.php 5.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!-- Front Page Layout Form -->
  2. <div class="space-y-6">
  3. <!-- Hero Section -->
  4. <div class="bg-gray-50 rounded-lg p-4">
  5. <h4 class="text-md font-medium text-gray-800 mb-4">Hero Section</h4>
  6. <div class="space-y-4">
  7. <div>
  8. <label for="hero_title" class="block text-sm font-medium text-gray-700 mb-2">Hero Title</label>
  9. <input type="text" name="extra_fields[hero_title]" id="hero_title"
  10. value="<?= htmlspecialchars($page['extra_fields']['hero_title'] ?? '') ?>"
  11. 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"
  12. placeholder="Welcome to Our Amazing Site">
  13. </div>
  14. <div>
  15. <label for="hero_subtitle" class="block text-sm font-medium text-gray-700 mb-2">Hero Subtitle</label>
  16. <textarea name="extra_fields[hero_subtitle]" id="hero_subtitle" rows="2"
  17. 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"
  18. placeholder="Discover amazing content and experiences..."><?= htmlspecialchars($page['extra_fields']['hero_subtitle'] ?? '') ?></textarea>
  19. </div>
  20. <div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
  21. <div>
  22. <label for="hero_button_text" class="block text-sm font-medium text-gray-700 mb-2">Hero Button Text</label>
  23. <input type="text" name="extra_fields[hero_button_text]" id="hero_button_text"
  24. value="<?= htmlspecialchars($page['extra_fields']['hero_button_text'] ?? '') ?>"
  25. 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"
  26. placeholder="Get Started">
  27. </div>
  28. <div>
  29. <label for="hero_button_url" class="block text-sm font-medium text-gray-700 mb-2">Hero Button URL</label>
  30. <input type="text" name="extra_fields[hero_button_url]" id="hero_button_url"
  31. value="<?= htmlspecialchars($page['extra_fields']['hero_button_url'] ?? '') ?>"
  32. 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"
  33. placeholder="/contact">
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <!-- Featured Sections -->
  39. <div class="bg-gray-50 rounded-lg p-4">
  40. <h4 class="text-md font-medium text-gray-800 mb-4">Featured Sections</h4>
  41. <div class="space-y-4">
  42. <div>
  43. <label for="featured_title" class="block text-sm font-medium text-gray-700 mb-2">Featured Section Title</label>
  44. <input type="text" name="extra_fields[featured_title]" id="featured_title"
  45. value="<?= htmlspecialchars($page['extra_fields']['featured_title'] ?? '') ?>"
  46. 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"
  47. placeholder="Why Choose Us">
  48. </div>
  49. <div>
  50. <label for="featured_content" class="block text-sm font-medium text-gray-700 mb-2">Featured Content</label>
  51. <textarea name="extra_fields[featured_content]" id="featured_content" rows="6"
  52. 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"
  53. placeholder="Describe your featured content..."><?= htmlspecialchars($page['extra_fields']['featured_content'] ?? '') ?></textarea>
  54. </div>
  55. </div>
  56. </div>
  57. <!-- Main Content -->
  58. <div>
  59. <label for="content" class="block text-sm font-medium text-gray-700 mb-2">Main Page Content</label>
  60. <textarea name="content" id="content" rows="8"
  61. 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"
  62. placeholder="Enter main content for the homepage..."><?= htmlspecialchars($page['content'] ?? '') ?></textarea>
  63. </div>
  64. <!-- SEO Settings for Homepage -->
  65. <div class="bg-gray-50 rounded-lg p-4">
  66. <h4 class="text-md font-medium text-gray-800 mb-4">SEO Settings</h4>
  67. <div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
  68. <div>
  69. <label for="meta_description" class="block text-sm font-medium text-gray-700 mb-2">Meta Description</label>
  70. <textarea name="extra_fields[meta_description]" id="meta_description" rows="3"
  71. 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"
  72. placeholder="Homepage description for search engines..."><?= htmlspecialchars($page['extra_fields']['meta_description'] ?? '') ?></textarea>
  73. </div>
  74. <div>
  75. <label for="og_image" class="block text-sm font-medium text-gray-700 mb-2">Social Share Image URL</label>
  76. <input type="text" name="extra_fields[og_image]" id="og_image"
  77. value="<?= htmlspecialchars($page['extra_fields']['og_image'] ?? '') ?>"
  78. 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"
  79. placeholder="/uploads/homepage-share.jpg">
  80. </div>
  81. </div>
  82. </div>
  83. </div>