Files
Nexumi/landingpage/index.php
TheOnlyMace 8c02b95934 Update README and localization files to remove "self-hosted" references
- Revised the README.md to simplify the description of Nexumi.
- Updated layout.tsx to reflect the change in the bot's description.
- Modified German and English localization files to remove "self-hosted" from the bot's description and terms of service.
2026-07-22 19:10:17 +02:00

193 lines
7.4 KiB
PHP

<?php
declare(strict_types=1);
$config = require __DIR__ . '/config.php';
$clientId = (string) $config['bot_client_id'];
$inviteUrl = 'https://discord.com/api/oauth2/authorize?' . http_build_query([
'client_id' => $clientId,
'permissions' => '8',
'scope' => 'bot applications.commands',
], '', '&', PHP_QUERY_RFC3986);
$dashboardUrl = rtrim((string) $config['dashboard_url'], '/');
$loginUrl = $dashboardUrl . '/login';
$supportUrl = isset($config['support_url']) && $config['support_url'] !== ''
? (string) $config['support_url']
: null;
$guildCount = 0;
$userCount = 0;
$statsApi = (string) ($config['stats_api_url'] ?? '');
if ($statsApi !== '') {
$ctx = stream_context_create([
'http' => [
'timeout' => 3,
'header' => "Accept: application/json\r\n",
],
]);
$raw = @file_get_contents($statsApi, false, $ctx);
if ($raw !== false) {
$json = json_decode($raw, true);
if (is_array($json)) {
$guildCount = (int) ($json['guildCount'] ?? 0);
$userCount = (int) ($json['approximateUserCount'] ?? 0);
}
}
}
$year = (int) date('Y');
$groups = [
'moderation' => [
'label' => 'Moderation',
'modules' => [
['label' => 'Moderation', 'description' => 'Bans, Verwarnungen, Timeouts und das Fall-System'],
['label' => 'Auto-Moderation', 'description' => 'Spam-, Raid- und Nuke-Schutz'],
['label' => 'Logging', 'description' => 'Log-Kanäle für Server-Events'],
],
],
'engagement' => [
'label' => 'Engagement',
'modules' => [
['label' => 'Willkommen & Abschied', 'description' => 'Join- und Leave-Nachrichten, Autoroles'],
['label' => 'Verifizierung', 'description' => 'Button- und Captcha-Verifizierung'],
['label' => 'Leveling & XP', 'description' => 'Text- und Voice-XP, Rollen-Belohnungen'],
['label' => 'Economy', 'description' => 'Währung, Shop und Spiele'],
['label' => 'Fun & Spiele', 'description' => 'Minispiele und Medien-Commands'],
],
],
'community' => [
'label' => 'Community',
'modules' => [
['label' => 'Giveaways', 'description' => 'Button-basierte Giveaways'],
['label' => 'Tickets', 'description' => 'Support-Ticket-Panels und Transkripte'],
['label' => 'Self Roles', 'description' => 'Reaktions-, Button- und Dropdown-Rollenpanels'],
['label' => 'Starboard', 'description' => 'Beliebte Nachrichten hervorheben'],
['label' => 'Vorschläge', 'description' => 'Community-Vorschläge mit Abstimmung'],
['label' => 'Geburtstage', 'description' => 'Geburtstags-Ankündigungen und -Rollen'],
],
],
'utility' => [
'label' => 'Utility',
'modules' => [
['label' => 'Tags', 'description' => 'Custom Commands und Auto-Responder'],
['label' => 'Temp-Voice', 'description' => 'Join-to-Create Voice-Kanäle'],
],
],
'integrations' => [
'label' => 'Integrationen',
'modules' => [
['label' => 'Server-Statistiken', 'description' => 'Automatische Statistik-Kanäle und Invites'],
['label' => 'Social Feeds', 'description' => 'Twitch-, YouTube-, RSS- und Reddit-Benachrichtigungen'],
['label' => 'Scheduler', 'description' => 'Geplante und wiederkehrende Ankündigungen'],
['label' => 'Backups', 'description' => 'Server-Backup und -Wiederherstellung'],
],
],
];
function h(?string $value): string
{
return htmlspecialchars((string) $value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nexumi</title>
<meta name="description" content="Discord-Bot mit Moderations-, Community- und Integrationsmodulen sowie Web-Dashboard.">
<link rel="icon" href="assets/nexumi-logo.svg" type="image/svg+xml">
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<div class="shell">
<header class="border-b">
<div class="container bar">
<a class="brand" href="/">
<img src="assets/nexumi-logo.svg" alt="Nexumi" width="28" height="28">
Nexumi
</a>
<nav>
<a class="btn btn-ghost" href="<?= h((string) $config['status_url']) ?>">Status</a>
<a class="btn btn-ghost" href="<?= h($inviteUrl) ?>" target="_blank" rel="noreferrer">Einladen</a>
<?php if ($supportUrl): ?>
<a class="btn btn-ghost" href="<?= h($supportUrl) ?>" target="_blank" rel="noreferrer">Support</a>
<?php endif; ?>
<a class="btn btn-primary" href="<?= h($loginUrl) ?>">Anmelden</a>
</nav>
</div>
</header>
<main>
<section class="border-b">
<div class="container hero">
<div class="hero-brand">
<img src="assets/nexumi-logo.svg" alt="" width="48" height="48">
<h1>Nexumi</h1>
</div>
<p>Discord-Bot mit Moderations-, Community- und Integrationsmodulen sowie Web-Dashboard.</p>
<div class="actions">
<a class="btn btn-lg btn-primary" href="<?= h($inviteUrl) ?>" target="_blank" rel="noreferrer">Bot einladen</a>
<a class="btn btn-lg btn-secondary" href="<?= h($loginUrl) ?>">Zum Dashboard</a>
<?php if ($supportUrl): ?>
<a class="btn btn-lg btn-outline" href="<?= h($supportUrl) ?>" target="_blank" rel="noreferrer">Support-Server</a>
<?php endif; ?>
</div>
</div>
</section>
<section class="border-b">
<div class="container stats">
<div class="card">
<p class="card-label">Server</p>
<p class="card-value"><?= h(number_format($guildCount, 0, ',', '.')) ?></p>
</div>
<div class="card">
<p class="card-label">Nutzer (ca.)</p>
<p class="card-value"><?= h(number_format($userCount, 0, ',', '.')) ?></p>
</div>
</div>
</section>
<section>
<div class="container features">
<div class="intro">
<h2>Module</h2>
<p>Funktionen, die Nexumi pro Server bereitstellt.</p>
</div>
<?php foreach ($groups as $group): ?>
<div class="group">
<h3><?= h($group['label']) ?></h3>
<div class="grid">
<?php foreach ($group['modules'] as $module): ?>
<div class="card">
<p class="module-title"><?= h($module['label']) ?></p>
<p class="module-desc"><?= h($module['description']) ?></p>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</section>
</main>
<footer class="border-t">
<div class="container bar">
<p>© <?= $year ?> Nexumi</p>
<nav>
<a href="<?= h((string) $config['status_url']) ?>">Status</a>
<a href="<?= h((string) $config['impressum_url']) ?>">Impressum</a>
<a href="<?= h((string) $config['privacy_url']) ?>">Datenschutz</a>
<a href="<?= h((string) $config['terms_url']) ?>">Nutzungsbedingungen</a>
<a href="<?= h($dashboardUrl . '/dashboard') ?>">Dashboard</a>
</nav>
</div>
</footer>
</div>
</body>
</html>