Files
laraundfelix/resources/views/public/preview-devices.blade.php
T
LarsandClaude Sonnet 5.5 1d1f0ebb1f
CI Feature / test (push) Successful in 3m50s
Binde das Favicon ein und lege Favicon und Kleingrafiken des Brand-Kits ab
Die Datei public/favicon.ico war leer; im head fehlte jeder Icon-Verweis.
- Favicon (ICO, SVG, Apple-Touch-Icon) in public/, gemeinsame Komponente
  x-site.favicon in Website-, Mitglieder- und Vorschau-Layouts
- Verwaltung: Icon per Render-Hook zur Anfragezeit statt ->favicon(asset()),
  weil asset() beim Start den falschen Host liefert
- FaviconTest (Dateien, Verweise, Adresse hinter dem Proxy)
- Brand-Kit: 15_Lara-Felix-Favicon und 16_Lara-Felix-Kleingrafiken (freigegeben)
- KIT_ERGAENZUNG_v2.1_kleingrafiken.md: Prüfung und Umsetzungsvorschlag

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 11:27:56 +01:00

60 lines
3.4 KiB
PHP

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>Vorschau {{ $page->path }} · Revision {{ $revision->id }}</title>
<x-site.favicon />
<style>
:root { color-scheme: light; --ink: #1b2838; --line: #c5d2cb; --pine: #0f6e56; }
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Source Sans 3', 'Segoe UI', sans-serif; background: #dfe6e2; color: var(--ink); }
.bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; padding: .75rem 1rem; background: var(--ink); color: #f4f7f5; }
.bar strong { font-size: 1rem; }
.bar p { margin: 0; font-size: .9rem; }
.widths { display: flex; gap: .4rem; margin-left: auto; }
.widths button { font: inherit; border: 1px solid rgb(255 255 255 / 45%); background: transparent; color: inherit; padding: .35rem .8rem; border-radius: .25rem; cursor: pointer; }
.widths button[aria-pressed='true'] { background: #f4f7f5; color: var(--ink); }
.widths button:focus-visible, .bar a:focus-visible { outline: 3px solid #fcd10a; outline-offset: 2px; }
.bar a { color: inherit; }
.stage { overflow-x: auto; padding: 1.25rem 1rem 3rem; }
.device { margin-inline: auto; background: white; box-shadow: 0 1px 4px rgb(0 0 0 / 18%); transition: none; }
.device iframe { display: block; width: 100%; height: calc(100vh - 7rem); min-height: 36rem; border: 0; }
.size { text-align: center; font-size: .85rem; margin: 0 0 .5rem; }
</style>
</head>
<body>
<div class="bar">
<strong>Vorschau {{ $page->path }}</strong>
<p>Revision {{ $revision->id }} · {{ $isLive ? 'veröffentlicht' : 'nicht veröffentlicht' }}</p>
<div class="widths" role="group" aria-label="Ansichtsbreite">
<button type="button" data-width="390" aria-pressed="false">Smartphone 390 px</button>
<button type="button" data-width="768" aria-pressed="false">Tablet 768 px</button>
<button type="button" data-width="1440" aria-pressed="true">Desktop 1440 px</button>
</div>
<p><a href="{{ route('pages.preview', $revision) }}" target="_blank" rel="noopener">Ohne Rahmen öffnen</a></p>
</div>
<div class="stage">
<p class="size" id="preview-size" aria-live="polite">Desktop, 1440 px</p>
<div class="device" id="preview-device" style="width: 1440px">
<iframe src="{{ route('pages.preview', $revision) }}" title="Seitenvorschau {{ $page->path }}"></iframe>
</div>
</div>
<script>
(() => {
const names = { 390: 'Smartphone', 768: 'Tablet', 1440: 'Desktop' };
const device = document.getElementById('preview-device');
const size = document.getElementById('preview-size');
const buttons = document.querySelectorAll('[data-width]');
buttons.forEach((button) => button.addEventListener('click', () => {
const width = Number(button.dataset.width);
device.style.width = width + 'px';
size.textContent = names[width] + ', ' + width + ' px';
buttons.forEach((other) => other.setAttribute('aria-pressed', String(other === button)));
}));
})();
</script>
</body>
</html>