default.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. $settingsContent = settings('content')->getAll();
  3. ?>
  4. <!DOCTYPE html>
  5. <html lang="<?= $seo['extra_fields']['locale'] ?? 'en' ?>">
  6. <head>
  7. <meta charset="UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <base href="/">
  10. <title><?= $seo['title'] ?></title>
  11. <link rel="stylesheet" href="css/styles.css">
  12. <meta name='robots' content='index, follow' />
  13. <?php if (!empty($settingsContent['favicon'])): ?>
  14. <link rel="icon" href="<?= htmlspecialchars($settingsContent['favicon']) ?>" type="image/x-icon">
  15. <?php endif; ?>
  16. <meta property="og:title" content="<?= $seo['title'] ?? '' ?>">
  17. <meta property="og:description" content="<?= $seo['description'] ?? '' ?>">
  18. <meta property="og:locale" content="<?= $seo['extra_fields']['locale'] ?? '' ?>">
  19. <meta property="og:image" content="<?= htmlspecialchars($seo['image'] ?? '') ?>">
  20. <meta name="description" content="<?= $seo['description'] ?? '' ?>">
  21. <link rel="canonical" href="<?= $seo['canonical'] ?? '' ?>">
  22. <script type="application/ld+json">
  23. <?php include __DIR__ . '/../partials/schema.php'; ?>
  24. </script>
  25. <?php include __DIR__ . '/../partials/styles.php'; ?>
  26. </head>
  27. <body>
  28. <?php include __DIR__ . '/../partials/header.php'; ?>
  29. <main class="main">
  30. <?php if (!empty($topContent)): ?>
  31. <section class="top-content">
  32. <div class="container">
  33. <?= $topContent ?>
  34. </div>
  35. </section>
  36. <?php endif; ?>
  37. <section class="page-content">
  38. <div class="container">
  39. <h1><?= htmlspecialchars($pageData['name']) ?></h1>
  40. <div class="content">
  41. <?= $pageContent ?>
  42. </div>
  43. </div>
  44. </section>
  45. <?php if (!empty($faqItems)): ?>
  46. <section class="faq-section">
  47. <div class="container">
  48. <h2>FAQ</h2>
  49. <div class="faq-list">
  50. <?php foreach ($faqItems as $faq): ?>
  51. <div class="faq-item">
  52. <h3><?= htmlspecialchars($faq['question']) ?></h3>
  53. <div class="faq-answer">
  54. <?= $faq['answer'] ?>
  55. </div>
  56. </div>
  57. <?php endforeach; ?>
  58. </div>
  59. </section>
  60. <?php endif; ?>
  61. </main>
  62. <?php include __DIR__ . '/../partials/footer.php'; ?>
  63. <script src="js/script.js"></script>
  64. </body>
  65. </html>