Formatempfehlung bei Produkt- und Kachelbildern im Admin
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvuGvHpbAQ4syfuLuRvutL
This commit is contained in:
parent
c50774440d
commit
f38db8e837
3 changed files with 4 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ function CategoryFields({ c }: { c: C }) {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span className="sm-field__label">Kachelbild</span>
|
<span className="sm-field__label">Kachelbild</span>
|
||||||
<ImageManager name="image" initial={c.image ? [c.image] : []} multiple={false} />
|
<ImageManager name="image" initial={c.image ? [c.image] : []} multiple={false} hint="Format 3:4 im Hochformat, ideal 1500 × 2000 px. Andere Formate werden mittig zugeschnitten. Das Motiv möglichst groß und mittig zeigen, eher Nahaufnahme als ganze Raumszene. Im unteren Fünftel liegt das Feld mit dem Namen." />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function send(fd: FormData, onProgress: (p: number) => void): Promise<{ urls: st
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ImageManager({ name, initial, multiple = true }: { name: string; initial: string[]; multiple?: boolean }) {
|
export function ImageManager({ name, initial, multiple = true, hint }: { name: string; initial: string[]; multiple?: boolean; hint?: string }) {
|
||||||
const [images, setImages] = useState<string[]>(initial);
|
const [images, setImages] = useState<string[]>(initial);
|
||||||
const [progress, setProgress] = useState<number | null>(null);
|
const [progress, setProgress] = useState<number | null>(null);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
@ -77,7 +77,7 @@ export function ImageManager({ name, initial, multiple = true }: { name: string;
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{error && <span className="sm-field__error" role="alert"><Icon name="alert" /> {error}</span>}
|
{error && <span className="sm-field__error" role="alert"><Icon name="alert" /> {error}</span>}
|
||||||
{multiple && <p className="caption ad-muted" style={{ marginTop: "var(--space-2)" }}>Das erste Bild ist das Hauptbild. Empfohlenes Format 4:5, z. B. 1600 × 2000 px.</p>}
|
{hint && <p className="caption ad-muted" style={{ marginTop: "var(--space-2)" }}>{hint}</p>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export function ProductForm({ values, categories, canStock }: { values: ProductF
|
||||||
</section>
|
</section>
|
||||||
<section className="ad-card">
|
<section className="ad-card">
|
||||||
<div className="ad-card__head"><div><h2>Bilder</h2><p>Ziehen ist nicht nötig: Mit dem Pfeil rückt ein Bild nach vorne.</p></div></div>
|
<div className="ad-card__head"><div><h2>Bilder</h2><p>Ziehen ist nicht nötig: Mit dem Pfeil rückt ein Bild nach vorne.</p></div></div>
|
||||||
<div className="ad-card__body"><ImageManager name="images" initial={values.images} /></div>
|
<div className="ad-card__body"><ImageManager name="images" initial={values.images} hint="Das erste Bild ist das Hauptbild. Format 4:5 im Hochformat, ideal 1600 × 2000 px. Andere Formate werden mittig zugeschnitten. Das Produkt möglichst groß und mittig zeigen." /></div>
|
||||||
</section>
|
</section>
|
||||||
<section className="ad-card">
|
<section className="ad-card">
|
||||||
<div className="ad-card__head"><h2>Preis</h2></div>
|
<div className="ad-card__head"><h2>Preis</h2></div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue