bare-site/html/app/model/menu.php
cclohmar b93de83519 bare-site v1.0 — zero-dependency PHP micro-framework
7 languages, 3 pages (What/How/Start), 80-line router, 98KB total.

Features:
- No database, no Composer, no build step — just files on disk
- nginx PHP isolation: only index.php executes
- Bot detection with browser heuristic bypass
- Rate limiting, structured weekly logs, geo-location, Telegram alerts
- Multi-language: Accept-Language auto-detect, nav dropdown
- Article sub-page routing via /start/{slug}
- Apache + Caddy config alternatives documented in Start page
- Sample config — no real keys or secrets
2026-06-25 14:12:46 +00:00

19 lines
930 B
PHP

<?php
// Build the menu from language constants
$menue = '';
if (!empty(PAGE_00_TXT)) {$menue .= '<a href="'.__URL__.PAGE_00_SLUG.'">'.PAGE_00_TXT.'</a>';}
if (!empty(PAGE_01_TXT)) {$menue .= '<a href="'.__URL__.PAGE_01_SLUG.'">'.PAGE_01_TXT.'</a>';}
if (!empty(PAGE_02_TXT)) {$menue .= '<a href="'.__URL__.PAGE_02_SLUG.'">'.PAGE_02_TXT.'</a>';}
if (!empty(PAGE_03_TXT)) {$menue .= '<a href="'.__URL__.PAGE_03_SLUG.'">'.PAGE_03_TXT.'</a>';}
if (!empty(PAGE_04_TXT)) {$menue .= '<a href="'.__URL__.PAGE_04_SLUG.'">'.PAGE_04_TXT.'</a>';}
if (!empty(PAGE_05_TXT)) {$menue .= '<a href="'.__URL__.PAGE_05_SLUG.'">'.PAGE_05_TXT.'</a>';}
$menue .= '<div class="dropdown">';
$menue .= '<button class="dropbtn">' . LANGUAGE_TITLE . '</button>';
$menue .= '<div class="dropdown-content">';
foreach (LANGUAGES as $code => $name) {
$menue .= '<a href="'.__URL__.'set/'.$code.'">'.$name.'</a>';
}
$menue .= '</div>';
$menue .= '</div>';