Fix header preview box and brand color swatch for mobile

- Header preview: max-width 1200px, white background, no border-radius on img
- Brand color swatch: change span to div with min-width/min-height and
  flex-shrink:0 to prevent collapse on mobile flex layouts
- Remove headerPreviewWrapper brand color tinting (wrapper stays white)
- Fix swatch border from white-alpha to black-alpha for visibility on white cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-02-01 07:50:25 -08:00
parent db5cd90875
commit 69c51b90cb
2 changed files with 3 additions and 7 deletions

View file

@ -579,8 +579,8 @@
<div>
<label style="display: block; margin-bottom: 8px; font-weight: 500;">Header Image</label>
<p style="color: #666; font-size: 13px; margin-bottom: 8px;">Displayed at the top of your menu. Recommended: 1200x400px</p>
<div id="headerPreviewWrapper" style="width: 100%; border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: #f0f0f0;">
<img id="headerPreview" src="" alt="" style="width: 100%; display: none; border-radius: 8px;">
<div id="headerPreviewWrapper" style="max-width: 1200px; border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: #fff;">
<img id="headerPreview" src="" alt="" style="width: 100%; display: none;">
</div>
<button class="btn btn-secondary" onclick="Portal.uploadHeader()" style="width: 100%;">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 8px;">
@ -593,7 +593,7 @@
<label style="display: block; margin-bottom: 8px; font-weight: 500;">Brand Color</label>
<p style="color: #666; font-size: 13px; margin-bottom: 8px;">Used for accents and fallback backgrounds</p>
<div style="display: flex; gap: 12px; align-items: center;">
<span id="brandColorSwatch" style="width: 40px; height: 40px; border-radius: 8px; background: #1B4D3E; border: 2px solid rgba(255,255,255,0.2); cursor: pointer;" onclick="Portal.showBrandColorPicker()"></span>
<div id="brandColorSwatch" style="min-width: 40px; width: 40px; min-height: 40px; height: 40px; border-radius: 8px; background: #1B4D3E; border: 2px solid rgba(0,0,0,0.1); cursor: pointer; flex-shrink: 0;" onclick="Portal.showBrandColorPicker()"></div>
<button class="btn btn-secondary" onclick="Portal.showBrandColorPicker()" style="flex: 1;">
Change Color
</button>

View file

@ -742,8 +742,6 @@ const Portal = {
this.brandColor = brandColor;
const swatch = document.getElementById('brandColorSwatch');
if (swatch) swatch.style.background = brandColor;
const headerWrapper = document.getElementById('headerPreviewWrapper');
if (headerWrapper) headerWrapper.style.background = brandColor;
}
// Load header preview
@ -1247,8 +1245,6 @@ const Portal = {
this.brandColor = color;
const swatch = document.getElementById('brandColorSwatch');
if (swatch) swatch.style.background = color;
const headerWrapper = document.getElementById('headerPreviewWrapper');
if (headerWrapper) headerWrapper.style.background = color;
this.closeModal();
this.toast('Brand color saved!', 'success');
} else {