diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..2cc76d9 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,413 @@ +:root { + --parchment: #f4e4bc; + --parchment-dark: #d2b48c; + --gold: #c5a059; + --dark-red: #5d0000; + --text-dark: #000000; + --border-classic: 1px solid #c5a059; +} + +body { + margin: 0; + padding: 0; + font-family: 'Times New Roman', Times, serif; + background-color: #000; + color: var(--text-dark); + overflow: hidden; + height: 100vh; +} + +.elot-wrapper { + display: grid; + grid-template-columns: 240px 1fr; + grid-template-rows: 60px 1fr 25px; + height: 100vh; + background: #000; + gap: 1px; +} + +/* Header / Tabs */ +.elot-header { + grid-column: 1 / -1; + background: #5d0000; + border-bottom: 2px solid var(--gold); + display: flex; + padding: 0 10px; + align-items: center; + justify-content: flex-start; + gap: 15px; +} + +.elot-tab { + color: var(--gold); + text-decoration: none; + font-size: 13px; + font-weight: bold; + text-transform: uppercase; + padding: 5px 8px; + border: 1px solid transparent; + transition: all 0.2s; +} + +.elot-tab:hover, .elot-tab.active { + border: var(--border-classic); + background: rgba(255,255,255,0.1); + color: #fff; +} + +/* Sidebar */ +.elot-sidebar { + background: #f4e4bc url('https://www.transparenttextures.com/patterns/parchment.png'); + border-right: 2px solid var(--gold); + display: flex; + flex-direction: column; + padding: 8px; + overflow-y: auto; + font-size: 12px; +} + +.sidebar-info { + text-align: center; + margin-bottom: 10px; + font-weight: bold; + color: var(--dark-red); + border: var(--border-classic); + padding: 5px; + background: rgba(255,255,255,0.3); +} + +.location-box { + background: #000; + border: 2px solid var(--gold); + margin-bottom: 10px; + text-align: center; + padding: 2px; +} + +.location-img { + width: 100%; + height: auto; + display: block; +} + +.nav-compass { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 2px; + width: 120px; + margin: 0 auto 15px; +} + +.compass-btn { + background: #5d0000; + color: var(--gold); + border: 1px solid var(--gold); + text-align: center; + padding: 5px 0; + font-weight: bold; + cursor: pointer; + font-size: 14px; +} + +.compass-btn.empty { background: transparent; border: none; cursor: default; } + +.section-header { + background: var(--gold); + color: #5d0000; + text-align: center; + font-weight: bold; + padding: 2px; + margin: 10px 0 5px; + border: 1px solid #5d0000; +} + +.presenti-list { + background: rgba(255,255,255,0.2); + padding: 5px; + border: 1px solid var(--gold); + flex-grow: 1; +} + +.presenti-entry { + margin-bottom: 2px; + border-bottom: 1px solid rgba(197, 160, 89, 0.3); +} + +.entry-name { + color: #0000ff; + text-decoration: underline; + cursor: pointer; +} + +/* Main Content */ +.elot-main { + background: #f4e4bc url('https://www.transparenttextures.com/patterns/parchment.png'); + position: relative; + overflow: auto; + padding: 15px; +} + +.content-frame { + border: 3px double var(--gold); + padding: 20px; + background: rgba(255,255,255,0.1); + min-height: 90%; +} + +.main-title { + color: var(--dark-red); + text-align: center; + font-variant: small-caps; + border-bottom: 2px solid var(--dark-red); + margin-bottom: 20px; +} + +/* Footer area */ +.elot-footer { + grid-column: 2; + background: #5d0000; + color: var(--gold); + display: flex; + justify-content: center; + align-items: center; + gap: 20px; + font-size: 11px; +} + +.footer-link { + color: var(--gold); + text-decoration: none; +} + +.footer-link:hover { text-decoration: underline; } + +/* Scheda Form */ +.scheda-table { + width: 100%; + border-collapse: collapse; +} + +.scheda-table td { + padding: 8px; + border: var(--border-classic); +} + +.label-td { + background: rgba(93, 0, 0, 0.1); + width: 30%; + font-weight: bold; + color: var(--dark-red); +} + +input[type="text"], input[type="number"], textarea { + width: 100%; + border: 1px solid var(--gold); + background: #fff; + padding: 4px; + font-family: serif; +} + +.btn-lot { + background: #5d0000; + color: var(--gold); + border: 2px solid var(--gold); + padding: 8px 25px; + font-weight: bold; + cursor: pointer; + margin-top: 15px; +} + + +body { + margin: 0; + padding: 0; + font-family: 'Georgia', 'Times New Roman', serif; + background-color: #1a0d00; + color: var(--text-dark); + overflow: hidden; + height: 100vh; +} + +.elot-wrapper { + display: grid; + grid-template-columns: 260px 1fr; + grid-template-rows: 40px 1fr 30px; + height: 100vh; + background: #000; + gap: 2px; +} + +/* Header / Tabs */ +.elot-header { + grid-column: 1 / -1; + background: #8b4513 linear-gradient(to bottom, #d2b48c, #8b4513); + border-bottom: 2px solid var(--gold); + display: flex; + padding: 0 10px; + gap: 2px; + align-items: flex-end; +} + +.elot-tab { + background: #e6ccb3; + border: 1px solid var(--gold); + border-bottom: none; + padding: 5px 15px; + font-size: 12px; + font-weight: bold; + cursor: pointer; + border-radius: 5px 5px 0 0; + text-transform: uppercase; + color: #330000; + text-decoration: none; +} + +.elot-tab:hover { + background: #f5f5dc; +} + +.elot-tab.active { + background: var(--gold); + color: #000; + border-top: 1px solid #fff; +} + +/* Sidebar */ +.elot-sidebar { + background: #f5e6c4; + background-image: radial-gradient(circle, #f5e6c4 0%, #e6ccb3 100%); + border-right: 2px solid var(--gold); + display: flex; + flex-direction: column; + padding: 10px; + overflow-y: auto; + box-shadow: inset -5px 0 10px rgba(0,0,0,0.1); +} + +.sidebar-header { + background: var(--dark-red); + color: var(--gold); + padding: 5px; + text-align: center; + font-weight: bold; + border: 1px solid var(--gold); + margin-bottom: 10px; + font-size: 12px; +} + +.nav-buttons { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 5px; + margin-bottom: 15px; +} + +.nav-btn { + background: #660000; + color: var(--gold); + border: 1px solid var(--gold); + font-size: 11px; + padding: 3px; + text-align: center; + cursor: pointer; +} + +.nav-btn:hover { + background: #800000; +} + +.presenti-list { + font-size: 12px; + line-height: 1.4; +} + +.presenti-entry { + margin-bottom: 4px; + border-bottom: 1px dotted #8b4513; + padding-bottom: 2px; +} + +.entry-time { + color: #8b4513; + font-weight: bold; +} + +/* Main Content */ +.elot-main { + background: var(--parchment); + position: relative; + overflow: auto; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + padding: 20px; +} + +.map-container { + border: 8px double var(--gold); + background: #fff8dc; + width: 90%; + max-width: 900px; + aspect-ratio: 16/10; + display: flex; + align-items: center; + justify-content: center; + position: relative; + box-shadow: 0 0 20px rgba(0,0,0,0.3); + background-image: url('https://www.extremelot.eu/images/mappa_regno.jpg'); /* This might not work, let's use a placeholder */ + background-size: cover; +} + +.map-overlay-text { + background: rgba(0,0,0,0.5); + color: var(--gold); + padding: 10px 20px; + font-size: 24px; + text-transform: uppercase; + letter-spacing: 2px; + font-weight: bold; + border: 2px solid var(--gold); +} + +/* Footer area */ +.elot-footer { + grid-column: 2; + background: var(--parchment-dark); + border-top: 2px solid var(--gold); + padding: 5px; + text-align: center; + font-size: 12px; +} + +.footer-link { + margin: 0 10px; + color: var(--dark-red); + text-decoration: underline; + font-weight: bold; +} + +/* Forms (Scheda) */ +.scheda-form { + max-width: 600px; + width: 100%; + background: rgba(255,255,255,0.5); + padding: 20px; + border: 2px solid var(--gold); +} + +input, select, textarea { + background: #fff; + border: 1px solid var(--gold); + color: var(--text-dark); + padding: 5px; +} + +.btn-submit { + background: var(--dark-red); + color: var(--gold); + border: 2px solid var(--gold); + padding: 5px 20px; + font-weight: bold; + cursor: pointer; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..3fff33f --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,9 @@ +document.addEventListener('DOMContentLoaded', () => { + const shouldShowToast = document.body.dataset.showToast === '1'; + const toastEl = document.getElementById('saveToast'); + + if (shouldShowToast && toastEl && window.bootstrap) { + const toast = new window.bootstrap.Toast(toastEl, { delay: 3500 }); + toast.show(); + } +}); diff --git a/assets/pasted-20260217-203132-ed9617b4.png b/assets/pasted-20260217-203132-ed9617b4.png new file mode 100644 index 0000000..5200c54 Binary files /dev/null and b/assets/pasted-20260217-203132-ed9617b4.png differ diff --git a/index.php b/index.php index 7205f3d..67f822e 100644 --- a/index.php +++ b/index.php @@ -2,149 +2,219 @@ declare(strict_types=1); @ini_set('display_errors', '1'); @error_reporting(E_ALL); -@date_default_timezone_set('UTC'); +@date_default_timezone_set('Europe/Rome'); + +require_once __DIR__ . '/db/config.php'; + +$projectName = 'EXTREMELOT'; +$view = $_GET['view'] ?? 'mappa'; + +$errors = []; +$success = false; +$input = [ + 'name' => '', + 'role' => 'Giocatore', + 'class' => '', + 'level' => 1, + 'concept' => '', +]; + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && $view === 'scheda') { + $input['name'] = trim((string)($_POST['name'] ?? '')); + $input['role'] = trim((string)($_POST['role'] ?? 'Giocatore')); + $input['class'] = trim((string)($_POST['class'] ?? '')); + $input['level'] = (int)($_POST['level'] ?? 1); + $input['concept'] = trim((string)($_POST['concept'] ?? '')); + + if (mb_strlen($input['name']) < 2) { + $errors[] = 'Inserisci un nome.'; + } + + if (!$errors) { + try { + $db = db(); + $db->exec("CREATE TABLE IF NOT EXISTS characters ( + id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(120) NOT NULL, + role VARCHAR(60) NOT NULL, + class VARCHAR(120) NOT NULL, + level TINYINT UNSIGNED NOT NULL, + concept TEXT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"); + + $stmt = $db->prepare('INSERT INTO characters (name, role, class, level, concept) VALUES (:name, :role, :class, :level, :concept)'); + $stmt->execute([ + ':name' => $input['name'], + ':role' => $input['role'], + ':class' => $input['class'], + ':level' => $input['level'], + ':concept' => $input['concept'] + ]); + $success = true; + } catch (Throwable $e) {} + } +} + +// Mock Log entries +$mockLog = [ + ['time' => '21:30', 'text' => 'find giunge a Lot'], + ['time' => '21:31', 'text' => 'Rhael lascia Lot'], + ['time' => '21:32', 'text' => 'Glykeria lascia Lot'], + ['time' => '21:33', 'text' => 'Ildiko giunge a Lot'], + ['time' => '21:35', 'text' => 'Graviel giunge a Lot'], +]; -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); ?> - + - - New Style - - - - - - - - - - - - - - - - - - + <?= $projectName ?> + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… +
+ +
+ -

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- +
+ Posta + LOT + Scheda + Presenti + Simboli + Regole + Azioni +
+ + + + + + +
+
+ +

Gran Ducato di Lot

+
+ Mappa del Regno +

+ Benvenuto nel Regno di Extremelot, viandante. +

+
+ + +
+
+

[21:40] find: Ben arrivati a tutti!

+

[21:42] Arthemis: Grazie find, la locanda è aperta stasera?

+

[21:45] find: Certamente, tra poco iniziamo la mescita.

+
+
+ + + +
+
+ +

Scheda del Personaggio

+ +
+ LA TUA ESSENZA È STATA IMPRESSA NEI REGISTRI DI LOT. +
+ +
+ + + + + + + + + + + + + + + + + +
Nome
Classe
Livello
Concetto
+
+ +
+
+ +

+
+

Questa pergamena è ancora bianca...

+
+ +
+
+ + + + +