UI Skins
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
$payloadJson = json_encode($desktopPayload, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);
|
||||
$activeSkin = $desktopPayload['meta']['active_skin'];
|
||||
$baseSkinProfile = $desktopPayload['meta']['base_skin_profile'];
|
||||
$skinProfile = $desktopPayload['meta']['skin_profile'];
|
||||
$wallpaper = $desktopPayload['desktop']['wallpaper'];
|
||||
?><!DOCTYPE html>
|
||||
<html lang="de">
|
||||
@@ -12,9 +14,37 @@ $wallpaper = $desktopPayload['desktop']['wallpaper'];
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= htmlspecialchars($desktopPayload['meta']['title'], ENT_QUOTES) ?></title>
|
||||
<link rel="stylesheet" href="/assets/desktop/desktop.css">
|
||||
<?php if (!empty($baseSkinProfile['css_path'])): ?>
|
||||
<link rel="stylesheet" href="<?= htmlspecialchars((string) $baseSkinProfile['css_path'], ENT_QUOTES) ?>">
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($skinProfile['css_path']) && $skinProfile['css_path'] !== $baseSkinProfile['css_path']): ?>
|
||||
<link rel="stylesheet" href="<?= htmlspecialchars((string) $skinProfile['css_path'], ENT_QUOTES) ?>">
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body data-skin="<?= htmlspecialchars($activeSkin, ENT_QUOTES) ?>" style="--wallpaper: <?= htmlspecialchars($wallpaper, ENT_QUOTES) ?>;">
|
||||
<body
|
||||
data-skin="<?= htmlspecialchars($activeSkin, ENT_QUOTES) ?>"
|
||||
data-skin-family="<?= htmlspecialchars((string) ($skinProfile['family'] ?? $activeSkin), ENT_QUOTES) ?>"
|
||||
data-taskbar-mode="<?= htmlspecialchars((string) ($skinProfile['taskbar_mode'] ?? 'taskbar'), ENT_QUOTES) ?>"
|
||||
style="--wallpaper: <?= htmlspecialchars($wallpaper, ENT_QUOTES) ?>;"
|
||||
>
|
||||
<div class="desktop-shell">
|
||||
<?php if (($skinProfile['top_bar'] ?? false) === true): ?>
|
||||
<header class="system-bar">
|
||||
<div class="system-bar-left">
|
||||
<span class="system-brand"><?= htmlspecialchars((string) ($skinProfile['label'] ?? ''), ENT_QUOTES) ?></span>
|
||||
<span class="system-divider"></span>
|
||||
<span>Finder</span>
|
||||
<span>Ablage</span>
|
||||
<span>Bearbeiten</span>
|
||||
<span>Fenster</span>
|
||||
</div>
|
||||
<div class="system-bar-right">
|
||||
<div class="tray-skins system-skins" id="tray-skins-top"></div>
|
||||
<span class="system-divider"></span>
|
||||
<time id="clock-top"></time>
|
||||
</div>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<main class="desktop-stage">
|
||||
<div class="desktop-icons" id="desktop-icons"></div>
|
||||
|
||||
@@ -61,7 +91,10 @@ $wallpaper = $desktopPayload['desktop']['wallpaper'];
|
||||
</section>
|
||||
|
||||
<footer class="taskbar">
|
||||
<button class="start-button" id="start-button" type="button">Menu</button>
|
||||
<button class="start-button" id="start-button" type="button">
|
||||
<span class="start-button-icon"><?= htmlspecialchars((string) ($skinProfile['taskbar_icon'] ?? ''), ENT_QUOTES) ?></span>
|
||||
<span class="start-button-label"><?= htmlspecialchars((string) ($skinProfile['taskbar_label'] ?? 'Menu'), ENT_QUOTES) ?></span>
|
||||
</button>
|
||||
<div class="taskbar-apps" id="taskbar-apps"></div>
|
||||
<div class="tray">
|
||||
<?php foreach ($desktopPayload['tray'] as $trayItem): ?>
|
||||
@@ -76,5 +109,11 @@ $wallpaper = $desktopPayload['desktop']['wallpaper'];
|
||||
|
||||
<script id="desktop-payload" type="application/json"><?= $payloadJson ?></script>
|
||||
<script src="/assets/desktop/desktop.js"></script>
|
||||
<?php if (!empty($baseSkinProfile['js_path'])): ?>
|
||||
<script src="<?= htmlspecialchars((string) $baseSkinProfile['js_path'], ENT_QUOTES) ?>"></script>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($skinProfile['js_path']) && $skinProfile['js_path'] !== $baseSkinProfile['js_path']): ?>
|
||||
<script src="<?= htmlspecialchars((string) $skinProfile['js_path'], ENT_QUOTES) ?>"></script>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user