Siteβ―Builder
Editing:
amenu1.php
writable 0666
<!-- menu.php --> <?php // Define your menu items with associated icons $menuItems = [ 'AI Tools' => 'π€', 'Subscription' => 'π³', 'Modules' => 'π§©', 'Backup' => 'πΎ', ]; ?> <nav class="menu-grid"> <?php foreach ($menuItems as $label => $icon): // Generate a slug for the link (lowercase, spaces to hyphens) $slug = strtolower(str_replace(' ', '-', $label)) . '.php'; ?> <a href="<?= $slug ?>"> <span class="menu-icon"><?= $icon ?></span> <span class="menu-label"><?= htmlspecialchars($label, ENT_QUOTES, 'UTF-8') ?></span> </a> <?php endforeach; ?> </nav> <style> /* Grid container: fixed 100px squares */ .menu-grid { display: grid; grid-template-columns: repeat(auto-fit, 100px); gap: 0.5rem; margin: 1rem 0; justify-content: center; } /* Menu items styled as fixed 100x100px squares */ .menu-grid a { box-sizing: border-box; width: 100px; height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.5rem; border: 2px solid gold; border-radius: 8px; background-color: #fff; color: #333; text-decoration: none; transition: background-color 0.2s, transform 0.2s; } /* Icon above label */ .menu-icon { font-size: 1.5rem; margin-bottom: 0.25rem; } .menu-label { font-weight: 500; text-align: center; font-size: 0.875rem; } /* Hover and focus states */ .menu-grid a:hover, .menu-grid a:focus { background-color: rgba(255, 215, 0, 0.2); transform: translateY(-2px); outline: none; } </style>
Save changes
Create folder
writable 0777
Create
Cancel