adasd
All checks were successful
Deploy / deploy-staging (push) Successful in 28s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-22 23:49:50 +02:00
parent 23afe81251
commit baa57bb913
5 changed files with 151 additions and 32 deletions

View File

@@ -12,6 +12,63 @@
color: var(--bc-text); color: var(--bc-text);
} }
.bc-frame {
height: 100%;
min-height: 0;
}
.bc-sidebar {
gap: 0;
}
.bc-brand {
margin-bottom: 18px;
}
.bc-nav-list {
gap: 12px;
}
.bc-nav-button {
text-decoration: none;
}
.bc-nav-button strong {
display: block;
margin-bottom: 4px;
}
.bc-main {
background: transparent;
}
.bc-panel-shell {
max-width: 1280px;
}
.bc-hero {
align-items: flex-start;
}
.bc-pill-row {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.bc-pill {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 8px 14px;
border-radius: 999px;
border: 1px solid color-mix(in srgb, var(--bc-accent) 34%, transparent);
background: color-mix(in srgb, var(--bc-accent) 10%, white);
color: var(--bc-text);
font-size: 0.86rem;
font-weight: 700;
}
.bc-page { .bc-page {
display: grid; display: grid;
gap: 16px; gap: 16px;
@@ -331,6 +388,10 @@
} }
@media (max-width: 980px) { @media (max-width: 980px) {
.bc-frame {
grid-template-columns: 1fr;
}
.bc-hero-top { .bc-hero-top {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }

View File

@@ -19,6 +19,33 @@ if (!in_array($view, $allowedViews, true)) {
$view = 'overview'; $view = 'overview';
} }
$viewMeta = [
'overview' => [
'label' => 'Ueberblick',
'title' => 'Depot-Ueberblick',
'description' => 'Kennzahlen, Kursverlauf und Performance fuer das ausgewaehlte Depot.',
'nav_description' => 'Marktueberblick, Positionen und gespeicherte Kurse.',
],
'depotverwaltung' => [
'label' => 'Depotverwaltung',
'title' => 'Depotverwaltung',
'description' => 'Depots, Positionen und manuelle Kursdaten zentral verwalten.',
'nav_description' => 'Depots pflegen, FX abrufen und Positionen bearbeiten.',
],
'aktienverwaltung' => [
'label' => 'Aktienverwaltung',
'title' => 'Aktienverwaltung',
'description' => 'Wertpapier-Stammdaten, Suche und Kursverlauf pro Aktie pflegen.',
'nav_description' => 'Ticker, ISIN, Markt und Kursverlauf pro Instrument.',
],
'setup' => [
'label' => 'Setup',
'title' => 'Setup',
'description' => 'API-Zugaenge, Datenbankoptionen und Modulvorgaben verwalten.',
'nav_description' => 'Schluessel, Timeouts und Modulkonfiguration speichern.',
],
];
$assetVersion = static function (string $relativePath): string { $assetVersion = static function (string $relativePath): string {
$fullPath = dirname(__DIR__) . '/' . ltrim($relativePath, '/'); $fullPath = dirname(__DIR__) . '/' . ltrim($relativePath, '/');
$mtime = is_file($fullPath) ? filemtime($fullPath) : false; $mtime = is_file($fullPath) ? filemtime($fullPath) : false;
@@ -91,10 +118,6 @@ $renderSetup = static function (): void {
} }
} }
echo module_shell_header('boersenchecker', [
'title' => 'Setup',
'description' => 'Modulkonfiguration, API-Zugang und optionale separate Datenbank.',
]);
?> ?>
<div class="bc-page"> <div class="bc-page">
<?php if ($error): ?> <?php if ($error): ?>
@@ -147,14 +170,19 @@ $renderSetup = static function (): void {
</form> </form>
</section> </section>
</div> </div>
<?= module_shell_footer() ?>
<?php <?php
}; };
$renderContent = static function () use ($view, $renderSetup): void { $renderContent = static function () use ($view, $renderSetup, $viewMeta): void {
?> $currentViewMeta = $viewMeta[$view] ?? $viewMeta['overview'];
<div class="boersenchecker-module-shell window-app-shell"> $navItems = [
<?php 'overview' => '/apps/boersenchecker/index.php?view=overview',
'depotverwaltung' => '/apps/boersenchecker/index.php?view=depotverwaltung',
'aktienverwaltung' => '/apps/boersenchecker/index.php?view=aktienverwaltung',
'setup' => '/apps/boersenchecker/index.php?view=setup',
];
ob_start();
if ($view === 'setup') { if ($view === 'setup') {
$renderSetup(); $renderSetup();
} elseif ($view === 'depotverwaltung') { } elseif ($view === 'depotverwaltung') {
@@ -167,7 +195,48 @@ $renderContent = static function () use ($view, $renderSetup): void {
$page = new \Modules\Boersenchecker\Support\HomePage(); $page = new \Modules\Boersenchecker\Support\HomePage();
module_tpl('boersenchecker', 'home', $page->handle()); module_tpl('boersenchecker', 'home', $page->handle());
} }
$innerContent = (string) ob_get_clean();
?> ?>
<div class="boersenchecker-module-shell window-app-shell">
<div class="window-app-frame bc-frame">
<aside class="window-app-sidebar bc-sidebar">
<div class="window-app-brand bc-brand">
<p class="window-app-kicker bc-kicker">Modul</p>
<h1>Boersenchecker</h1>
<p class="window-app-copy">Depotverwaltung fuer Aktien, Kaufdaten, Kursverlauf und Waehrungsumrechnung im Desktop-Standardlayout.</p>
</div>
<div class="window-app-nav-list bc-nav-list">
<?php foreach ($navItems as $navView => $href): ?>
<?php $meta = $viewMeta[$navView] ?? null; ?>
<?php if (!$meta): continue; endif; ?>
<a
class="window-app-nav-button bc-nav-button<?= $view === $navView ? ' is-active' : '' ?>"
href="<?= e($href) ?>"
>
<strong><?= e((string) $meta['label']) ?></strong>
<span class="window-app-meta"><?= e((string) $meta['nav_description']) ?></span>
</a>
<?php endforeach; ?>
</div>
</aside>
<main class="window-app-main bc-main">
<div class="window-app-panel bc-panel-shell">
<section class="window-app-hero bc-hero">
<div>
<p class="window-app-kicker bc-kicker">Boersenchecker</p>
<h2 class="window-app-title bc-title"><?= e((string) $currentViewMeta['title']) ?></h2>
<p class="window-app-copy"><?= e((string) $currentViewMeta['description']) ?></p>
</div>
<div class="window-app-pill-row bc-pill-row">
<span class="window-app-pill bc-pill">Desktop-App</span>
<span class="window-app-pill bc-pill">Legacy-Migration</span>
<span class="window-app-pill bc-pill">View: <?= e((string) $currentViewMeta['label']) ?></span>
</div>
</section>
<?= $innerContent ?>
</div>
</main>
</div>
</div> </div>
<?php <?php
}; };
@@ -278,6 +347,7 @@ if ($isPartial) {
.setup-field textarea { min-height: 100px; } .setup-field textarea { min-height: 100px; }
.grid { display:grid; } .grid { display:grid; }
</style> </style>
<link rel="stylesheet" href="/assets/desktop/desktop.css">
<link rel="stylesheet" href="/module-assets/index.php?module=boersenchecker&amp;path=assets/boersenchecker.css&amp;v=<?= htmlspecialchars($assetVersion('assets/boersenchecker.css'), ENT_QUOTES) ?>"> <link rel="stylesheet" href="/module-assets/index.php?module=boersenchecker&amp;path=assets/boersenchecker.css&amp;v=<?= htmlspecialchars($assetVersion('assets/boersenchecker.css'), ENT_QUOTES) ?>">
</head> </head>
<body> <body>

View File

@@ -1,7 +1,4 @@
<?php $ownerQuery = $isAdmin ? '&owner_sub=' . urlencode((string) $ownerSub) : ''; ?> <?php $ownerQuery = $isAdmin ? '&owner_sub=' . urlencode((string) $ownerSub) : ''; ?>
<?= module_shell_header('boersenchecker', [
'title' => 'Depotverwaltung',
]) ?>
<div class="bc-page"> <div class="bc-page">
<?php if ($error): ?> <?php if ($error): ?>
<section class="section-box"><div class="bc-alert bc-alert--error"><?= e($error) ?></div></section> <section class="section-box"><div class="bc-alert bc-alert--error"><?= e($error) ?></div></section>
@@ -510,4 +507,3 @@
<?php endif; ?> <?php endif; ?>
</section> </section>
</div> </div>
<?= module_shell_footer() ?>

View File

@@ -1,6 +1,3 @@
<?= module_shell_header('boersenchecker', [
'title' => 'Depot-Ueberblick',
]) ?>
<div class="bc-page" data-bc-home data-chart-endpoint="/api/boersenchecker/index.php?path=v1/chart-data"> <div class="bc-page" data-bc-home data-chart-endpoint="/api/boersenchecker/index.php?path=v1/chart-data">
<script type="application/json" data-bc-instruments-json><?= json_encode(array_map(static function (array $position): array { <script type="application/json" data-bc-instruments-json><?= json_encode(array_map(static function (array $position): array {
return [ return [
@@ -208,4 +205,3 @@
</div> </div>
</section> </section>
</div> </div>
<?= module_shell_footer() ?>

View File

@@ -1,6 +1,3 @@
<?= module_shell_header('boersenchecker', [
'title' => 'Aktienverwaltung',
]) ?>
<div class="bc-page"> <div class="bc-page">
<?php if ($error): ?> <?php if ($error): ?>
<section class="section-box"><div class="bc-alert bc-alert--error"><?= e($error) ?></div></section> <section class="section-box"><div class="bc-alert bc-alert--error"><?= e($error) ?></div></section>
@@ -185,4 +182,3 @@
<?php endif; ?> <?php endif; ?>
</section> </section>
</div> </div>
<?= module_shell_footer() ?>