diff --git a/assets/css/style.css b/assets/css/style.css index edca365..79ab86d 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -2892,10 +2892,18 @@ input.shop-approve-quantity { width: 72px; padding: 0.3rem 0.45rem; font-size: 0 @media (max-width: 700px) { .shop-order-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; } } - /* --- Oeffentliche Startseite --- */ -body.home-page .container { max-width: 1200px; } +body.home-page { + background: #14120f; +} + +body.home-page .navbar { + position: relative; + z-index: 2; + background: rgba(18, 16, 13, 0.96); + border-bottom: 1px solid rgba(201, 162, 39, 0.35); +} .navbar-discord { display: inline-flex; @@ -2907,180 +2915,252 @@ body.home-page .container { max-width: 1200px; } .navbar-discord:hover { color: #fff; text-decoration: none; } .navbar-user a.button-small:hover { color: #1a1a1a; } -.home-hero { margin-bottom: 2rem; } +.page-full { display: block; } +/* Banner randlos ueber die ganze Breite, direkt unter der Kopfzeile */ .home-banner { + position: relative; + line-height: 0; + background: #0d0c0a; +} + +.home-banner img { display: block; width: 100%; height: auto; - border-radius: 14px; - border: 1px solid rgba(201, 162, 39, 0.35); - box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); + max-height: 72vh; + object-fit: cover; } -.home-intro { - max-width: 760px; - margin: 2.5rem auto 0; - text-align: center; +.home-banner::after { + content: ''; + position: absolute; + inset: auto 0 0 0; + height: 18%; + background: linear-gradient(transparent, #14120f); + pointer-events: none; } -.home-kicker { - margin: 0 0 0.4rem; +.home-section { + max-width: 1080px; + margin: 0 auto; + padding: 4rem 1.5rem; +} + +.home-eyebrow { + display: flex; + align-items: center; + gap: 0.4rem; + margin: 0 0 0.5rem; color: var(--gold); - font-size: 0.85rem; + font-size: 0.8rem; font-weight: 600; - letter-spacing: 0.18em; + letter-spacing: 0.14em; text-transform: uppercase; } -.home-intro h1 { +.home-eyebrow .discord-logo { color: var(--gold); } + +.home-page h1, +.home-heading, +.home-facts h2, +.home-values h3, +.home-discord h2 { + font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; + font-weight: 700; + color: #f1e6c8; +} + +/* Ueber uns + Steckbrief */ +.home-about { + display: grid; + grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); + gap: 3.5rem; + align-items: start; + padding-top: 2.5rem; +} + +.home-about h1 { + margin: 0 0 1.25rem; + font-size: clamp(2rem, 4.2vw, 2.9rem); + line-height: 1.15; +} + +.home-about-text p { margin: 0 0 1rem; - font-size: clamp(1.8rem, 4vw, 2.6rem); - line-height: 1.2; + color: #d6d0c2; + font-size: 1.08rem; + line-height: 1.7; } -.home-lead { - margin: 0 0 1.75rem; - color: #d0d0d0; - font-size: 1.1rem; +.home-about-text strong { color: #f1e6c8; } + +.home-link { + font-weight: 600; } -.home-lead strong { color: var(--text); } +.home-facts { + padding: 1.5rem 1.6rem; + background: #1d1a15; + border: 1px solid #3a3326; + border-radius: 4px; +} -.home-actions { +.home-facts h2 { + margin: 0 0 0.75rem; + padding-bottom: 0.6rem; + border-bottom: 1px solid #3a3326; + font-size: 1.25rem; +} + +.home-facts dl { margin: 0; } + +.home-facts dl > div { + display: flex; + justify-content: space-between; + gap: 1rem; + padding: 0.55rem 0; + border-bottom: 1px dashed #332d22; +} + +.home-facts dl > div:last-child { border-bottom: none; } +.home-facts dt { color: #9a917f; } +.home-facts dd { margin: 0; color: #f1e6c8; font-weight: 600; text-align: right; } + +/* Werte */ +.home-values-band { + background: #1a1713; + border-top: 1px solid #2c271e; + border-bottom: 1px solid #2c271e; +} + +.home-heading { + margin: 0 0 2.25rem; + font-size: clamp(1.7rem, 3.4vw, 2.3rem); +} + +.home-values { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2.25rem 3.5rem; + margin: 0; + padding: 0; + list-style: none; +} + +.home-values li { + padding-top: 1.1rem; + border-top: 2px solid var(--gold); +} + +.home-values h3 { + margin: 0 0 0.5rem; + font-size: 1.35rem; +} + +.home-values p { + margin: 0; + color: #cfc8b8; + line-height: 1.7; +} + +/* Discord */ +.home-discord-card { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + gap: 1.25rem 2.5rem; + align-items: center; + padding: 2rem 2.25rem; + background: #1b1c2b; + border: 1px solid #34375a; + border-left: 4px solid var(--discord); + border-radius: 4px; +} + +.home-discord-server { + display: flex; + align-items: center; + gap: 1.1rem; +} + +.home-discord-server img { + width: 80px; + height: 80px; + border-radius: 22px; + flex-shrink: 0; +} + +.home-discord h2 { + margin: 0 0 0.35rem; + font-size: 1.6rem; +} + +.home-discord-counts { display: flex; flex-wrap: wrap; - justify-content: center; - gap: 0.75rem; + gap: 0.3rem 1.1rem; + margin: 0; + color: #b5b9d6; + font-size: 0.95rem; } -.home-cta { +.home-discord-counts span { display: inline-flex; align-items: center; gap: 0.4rem; } + +.dot { + width: 9px; + height: 9px; + border-radius: 50%; + background: #80848e; +} + +.dot-online { background: #23a55a; } + +.home-discord-text { + grid-column: 1; + margin: 0; + color: #cfd1e4; + line-height: 1.7; +} + +.home-discord-button { + grid-column: 2; + grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; - padding: 0.8rem 1.5rem; + padding: 0.9rem 1.6rem; font-size: 1.05rem; } -.home-cta:hover { color: #fff; text-decoration: none; } -.home-cta.button-secondary:hover { color: var(--text); } - -.home-stats { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 1rem; - margin: 0 0 3rem; -} - -.home-stat { - padding: 1.25rem 1rem; - text-align: center; - background: rgba(35, 35, 35, 0.62); - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); - border: 1px solid var(--border); - border-top: 2px solid var(--gold); - border-radius: 10px; -} - -.home-stat strong { - display: block; - color: var(--gold); - font-size: 1.6rem; - line-height: 1.2; -} - -.home-stat span { - color: var(--text-muted); - font-size: 0.9rem; -} - -.home-values h2, -.home-join h2 { margin: 0 0 1.25rem; } - -.home-values h2 { - text-align: center; - font-size: 1.8rem; -} - -.home-values-grid { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 1.25rem; - margin-bottom: 1.5rem; -} - -.home-value { - margin: 0; - transition: border-color 0.2s ease, transform 0.2s ease; -} - -.home-value:hover { - border-color: rgba(201, 162, 39, 0.6); - transform: translateY(-2px); -} - -.home-value-emoji { - font-size: 2rem; - line-height: 1; - margin-bottom: 0.6rem; -} - -.home-value h3 { - margin: 0 0 0.5rem; - color: var(--gold); - font-size: 1.2rem; -} - -.home-value p { - margin: 0; - color: #d0d0d0; -} - -.home-join { - display: flex; - align-items: center; - justify-content: space-between; - gap: 1.5rem; - margin-top: 1.5rem; -} - -.home-join h2 { - display: flex; - align-items: center; - gap: 0.6rem; - margin-bottom: 0.5rem; -} - -.home-join p { margin: 0; color: #d0d0d0; } -.home-join .home-cta { flex-shrink: 0; } +.home-discord-button:hover { color: #fff; text-decoration: none; } .home-footer { - margin-top: 2.5rem; - padding-top: 1.25rem; - border-top: 1px solid var(--border); + max-width: 1080px; + margin: 0 auto; + padding: 1.5rem 1.5rem 2.5rem; + border-top: 1px solid #2c271e; text-align: center; font-size: 0.85rem; + color: #9a917f; } .home-footer p { margin: 0.2rem 0; } -@media (max-width: 800px) { - .home-stats { grid-template-columns: repeat(2, 1fr); } - .home-values-grid { grid-template-columns: 1fr; } - .home-join { flex-direction: column; align-items: stretch; text-align: center; } - .home-join h2 { justify-content: center; } - .home-join .home-cta { width: 100%; } +@media (max-width: 860px) { + .home-about { grid-template-columns: 1fr; gap: 2rem; } + .home-values { grid-template-columns: 1fr; gap: 2rem; } + .home-discord-card { grid-template-columns: 1fr; padding: 1.5rem; } + .home-discord-button { grid-column: 1; grid-row: auto; width: 100%; } } @media (max-width: 520px) { .navbar { padding: 0.6rem 1rem; } .navbar-brand img { height: 36px; } .navbar-discord { font-size: 0; gap: 0; } /* nur das Logo */ - .home-banner { border-radius: 8px; } - .home-intro { margin-top: 1.75rem; } - .home-lead { font-size: 1rem; } - .home-stat strong { font-size: 1.3rem; } - .home-actions .home-cta { width: 100%; } -} + .home-section { padding: 2.75rem 1.1rem; } + .home-about { padding-top: 1.5rem; } + .home-about-text p { font-size: 1rem; } + .home-discord-server img { width: 60px; height: 60px; border-radius: 16px; } + .home-discord h2 { font-size: 1.3rem; } +} \ No newline at end of file diff --git a/includes/discord.php b/includes/discord.php index 9b54846..2d60a28 100644 --- a/includes/discord.php +++ b/includes/discord.php @@ -103,6 +103,49 @@ function discord_http(string $method, string $url, array $headers = [], ?array $ return ['status' => $status, 'data' => json_decode((string) $response, true)]; } +/** + * Oeffentliche Angaben zum Discord-Server ueber die Einladung (ohne Bot-Token): Name, + * Beschreibung, Mitglieder und wie viele gerade online sind. Die Antwort wird 15 Minuten + * in der Tabelle settings zwischengespeichert, damit nicht jeder Seitenaufruf Discord fragt. + * Ist Discord nicht erreichbar, gilt der letzte bekannte Stand (oder null). + * + * @return array{name: string, description: string, members: int, online: int, tag: string}|null + */ +function discord_invite_info(): ?array +{ + $cached = json_decode(setting_get('discord_invite_cache'), true); + if (is_array($cached) && (time() - (int) ($cached['fetched_at'] ?? 0)) < 900) { + return $cached['info'] ?? null; + } + + $info = $cached['info'] ?? null; + if (function_exists('curl_init')) { + $ch = curl_init('https://discord.com/api/v10/invites/' . rawurlencode(DISCORD_INVITE_CODE) . '?with_counts=true'); + curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 3, CURLOPT_CONNECTTIMEOUT => 2]); + $response = curl_exec($ch); + $status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE); + $data = $status === 200 ? json_decode((string) $response, true) : null; + if (is_array($data) && isset($data['approximate_member_count'])) { + $info = [ + // Server-Name ohne die Deko-Sterne ("🌟 - Lumina Ascendens - 🌟"). + 'name' => trim((string) preg_replace('/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/u', '', (string) ($data['guild']['name'] ?? ''))), + 'description' => (string) ($data['guild']['description'] ?? ''), + 'members' => (int) $data['approximate_member_count'], + 'online' => (int) ($data['approximate_presence_count'] ?? 0), + 'tag' => (string) ($data['profile']['tag'] ?? ''), + ]; + } + } + + // Auch bei einem Fehler den Zeitpunkt merken, sonst fragt jeder Aufruf erneut. + try { + setting_set('discord_invite_cache', (string) json_encode(['fetched_at' => time(), 'info' => $info])); + } catch (PDOException $e) { + // Ohne settings-Tabelle eben ohne Zwischenspeicher. + } + return $info; +} + /** * Wandelt eine Token-Antwort von Discord in das Format um, das in users gespeichert wird. * diff --git a/includes/functions.php b/includes/functions.php index af57fb1..21796a8 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -146,7 +146,9 @@ function icon(string $name): string } // Einladung auf den Discord-Server der Legion (Startseite, Kopfzeile oeffentlicher Seiten). -const DISCORD_INVITE_URL = 'https://discord.gg/9jmpNsN2b'; +// Die Vanity-Adresse des Servers laeuft im Gegensatz zu normalen Einladungen nicht ab. +const DISCORD_INVITE_CODE = 'luminaascendens'; +const DISCORD_INVITE_URL = 'https://discord.gg/' . DISCORD_INVITE_CODE; // Absolute Adresse dieser Website, z.B. fuer Link-Vorschauen (og:image). function site_url(string $path = '/'): string diff --git a/includes/header.php b/includes/header.php index d95652b..a459fb3 100644 --- a/includes/header.php +++ b/includes/header.php @@ -262,7 +262,8 @@ $otherFlashes = array_values(array_filter($allFlashes, fn (array $f): bool => ($ -
+ +
diff --git a/index.php b/index.php index 9e4d10e..ff83cef 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,8 @@ '🌠', @@ -34,85 +36,103 @@ $values = [ ], ]; +// Steckbrief der Legion (Fraktion und Sprache wie in der Beschreibung des Discord-Servers). +$facts = [ + 'Spiel' => 'Aion 2', + 'Fraktion' => 'Elyos', + 'Sprache' => 'Deutsch', + 'Spielweise' => 'PvE & PvP', +]; +if ($memberCount > 0) { + $facts['Mitglieder'] = number_format($memberCount, 0, ',', '.') . ' aktiv'; +} +if ($discord && $discord['tag'] !== '') { + $facts['Gilden-Tag'] = $discord['tag']; +} + $pageTitle = ''; $publicLayout = true; +$fullBleed = true; $bodyClass = 'home-page'; -$metaDescription = 'Lumina Ascendens ist eine deutschsprachige Legion in Aion 2. Zusammenhalt, Respekt, Ehrgeiz und Freundschaft - in Raids, PvP und im Discord. Komm vorbei!'; +$metaDescription = 'Lumina Ascendens ist eine deutschsprachige Elyos-Legion in Aion 2. Zusammenhalt, Respekt, Ehrgeiz und Freundschaft - in Raids, PvP und im Discord. Komm vorbei!'; $ogImage = site_url('/assets/images/banner-og.jpg'); include __DIR__ . '/includes/header.php'; ?> -
- + Lumina Ascendens - Legion in Aion 2 -
-

Legion in Aion 2

-

Gemeinsam zu neuen Höhen

-

- Lumina Ascendens ist eine Legion im MMORPG Aion 2. - Wir sind eine aktive Gemeinschaft, die zusammen Raids bestreitet, sich im PvP beweist - und im Discord einfach eine gute Zeit hat - ob du gerade erst anfängst oder schon - jede Ecke Atreias kennst. -

- -
-
+ -
-
- 0 ? e(number_format($memberCount, 0, ',', '.')) : '—' ?> - aktive Mitglieder -
-
- Aion 2 - unser Spiel -
-
- Raids & PvP - gemeinsam unterwegs -
-
- Discord - unser Treffpunkt -
-
- -
-

⚔️ Unsere Werte

-
- -
- -

-

-
- -
-
- -
-
-

Lust, dabei zu sein?

+
+
+

Ăśber uns

+

Schön, dass du da bist.

- Schau auf unserem Discord vorbei, lern uns kennen und stell deine Fragen. Dort - erfährst du alles über Raids, Events und wie du Teil der Legion wirst. + Wir sind Lumina Ascendens, eine Legion in Aion 2. + Hinter dem Namen stecken Spielerinnen und Spieler, die das Spiel am liebsten + gemeinsam erleben: zusammen durch Raids, Seite an Seite im PvP und abends im + Discord einfach quatschen.

+

+ Bei uns zählt nicht nur, wie stark dein Charakter ist, sondern wer du bist. Ob du + gerade erst in Atreia angekommen bist oder schon jede Festung kennst: Wenn du eine + Legion suchst, in der man sich kennt und aufeinander zählen kann, bist du hier richtig. +

+

Komm einfach auf unseren Discord →

+
+ +
+ +
+
+

⚔️ Unsere Werte

+
    + +
  1. +

    +

    +
  2. + +
+
+
+ +
+
+
+ +
+

Unser Discord

+

+ +

+ online + Mitglieder +

+ +
+
+

+ Der Discord ist unser Treffpunkt: Hier planen wir Raids und Events, suchen Gruppen, + helfen uns gegenseitig und hängen abends einfach zusammen im Voice-Chat ab. Schau + vorbei, stell dich kurz vor und frag, was du wissen willst - wir beißen nicht. +

+ + Discord beitreten +
- - Discord beitreten -