WebOrbiton
v3.0.0.0

FlatlyPage

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