WebOrbiton
v3.0.0.2

FlatlyPage

132 lines · 4.6 KB
  1. <?php
  2. require_once __DIR__ . '/../../config.php';
  3. require_login();
  4. session_start();
  5. ?>
  6. ​
  7. <!-- Powered by Renderion Engine -->
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. ​
  11. <head>
  12. <meta charset="UTF-8">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. <?php $domain = $_SERVER['HTTP_HOST'] ?? 'localhost';
  15. $domain = preg_replace('/[^a-z0-9\.\-]/i', '', $domain);
  16. $domain = ucfirst(strtolower($domain)); ?>
  17. <title>Create your own Theme</title>
  18. <meta name="author" content="FlatlyPage Team">
  19. <meta name="robots" content="noindex, nofollow">
  20. ​
  21. <link rel="stylesheet" href="/css/styles.css?v=<?= filemtime('/css/styles.css'); ?>">
  22. <?= theme_link_html() ?>
  23. ​
  24. <style>
  25. body {
  26. font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  27. }
  28. </style>
  29. ​
  30. </head>
  31. ​
  32. <body>
  33. ​
  34. <main>
  35. ​
  36. <section class="hero" id="hero-1">
  37. <div class="hero-grid"></div>
  38. <div class="container hero-content">
  39. <h1>Theme Editor</h1>
  40. <p>To use the <strong>Theme Builder</strong>, you must download it from the FlatlyPage Marketplace and extract it into this folder.</p>
  41. <div class="hero-buttons">
  42. <a href="https://marketplace.flatlypage.com/product.php?id=theme-builder" class="btn btn-primary" target="_blank">Download from Marketplace</a>
  43. </div>
  44. </div>
  45. </section>
  46. ​
  47. </main>
  48. ​
  49. <footer class="footer">
  50. <div class="container">
  51. <div class="footer-brand">
  52. <h3>
  53. FlatlyPage CMS
  54. </h3>
  55. <p>Build websites faster and easier.</p>
  56. </div>
  57. <div class="footer-bottom">
  58. <div style="flex: 1;">
  59. <p>© 2026 FlatlyPage CMS. All rights reserved.</p>
  60. </div>
  61. <button class="theme-toggle" aria-label="Toggle theme" title="Toggle light/dark theme">
  62. <svg class="theme-icon-sun" viewBox="0 0 24 24" style="display: none;">
  63. <circle cx="12" cy="12" r="5" />
  64. <line x1="12" y1="1" x2="12" y2="3" />
  65. <line x1="12" y1="21" x2="12" y2="23" />
  66. <line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
  67. <line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
  68. <line x1="1" y1="12" x2="3" y2="12" />
  69. <line x1="21" y1="12" x2="23" y2="12" />
  70. <line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
  71. <line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
  72. </svg>
  73. <svg class="theme-icon-moon" viewBox="0 0 24 24" style="display: block;">
  74. <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
  75. </svg>
  76. </button>
  77. </div>
  78. </div>
  79. </footer>
  80. ​
  81. <script>
  82. const themeToggle = document.querySelector('.theme-toggle');
  83. const sunIcon = document.querySelector('.theme-icon-sun');
  84. const moonIcon = document.querySelector('.theme-icon-moon');
  85. const html = document.documentElement;
  86. ​
  87. function initTheme() {
  88. let theme = localStorage.getItem('theme');
  89. if (!theme) {
  90. const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
  91. theme = prefersDark ? 'dark' : 'light';
  92. }
  93. setTheme(theme);
  94. }
  95. ​
  96. function setTheme(theme) {
  97. if (theme === 'light') {
  98. html.setAttribute('data-theme', 'light');
  99. sunIcon.style.display = 'block';
  100. moonIcon.style.display = 'none';
  101. localStorage.setItem('theme', 'light');
  102. } else {
  103. html.removeAttribute('data-theme');
  104. sunIcon.style.display = 'none';
  105. moonIcon.style.display = 'block';
  106. localStorage.setItem('theme', 'dark');
  107. }
  108. }
  109. ​
  110. function toggleTheme() {
  111. const currentTheme = html.getAttribute('data-theme') || 'dark';
  112. const newTheme = currentTheme === 'light' ? 'dark' : 'light';
  113. setTheme(newTheme);
  114. }
  115. ​
  116. if (themeToggle) {
  117. themeToggle.addEventListener('click', toggleTheme);
  118. }
  119. ​
  120. initTheme();
  121. ​
  122. document.querySelectorAll('.mobile-nav a').forEach(link => {
  123. link.addEventListener('click', () => {
  124. document.querySelector('.mobile-nav').classList.remove('active');
  125. });
  126. });
  127. </script>
  128. ​
  129. ​
  130. </body>
  131. ​
  132. </html>