Add Rust logo pipeline: trim, metrics, knockout and Branding settings
Logos (PNG, JPEG, WebP) are decoded, trimmed to their ink box, downscaled to 1200 px and re-encoded as a content-addressed print PNG plus a white knockout variant when the logo has alpha; aspect, ink density, mean colour and kind (wordmark, mark, tall) are stored with the settings and frozen in the issue snapshot. Legacy logos are derived at startup. The Test Vendor logo PDF shrinks from 334 KB to 92 KB. Settings gains a Branding section with white and dark previews and a business-name toggle (migration M5).
This commit is contained in:
@@ -396,3 +396,59 @@ body {
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
/* ---------- Logo preview (Settings -> Branding) ---------- */
|
||||
.voiced-logo-preview {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.voiced-logo-preview__item {
|
||||
margin: 0;
|
||||
width: 14rem;
|
||||
}
|
||||
|
||||
.voiced-logo-preview__surface {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
height: 6rem;
|
||||
padding: 1rem;
|
||||
border: 1px solid var(--cds-border-subtle-01);
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 4rem;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.voiced-logo-preview__surface--light {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.voiced-logo-preview__surface--dark {
|
||||
background: #161616;
|
||||
}
|
||||
|
||||
.voiced-logo-preview__chip {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
padding: 0.5rem 0.75rem;
|
||||
background: #ffffff;
|
||||
border-radius: 0.5rem;
|
||||
|
||||
img {
|
||||
max-height: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.voiced-logo-preview__item figcaption {
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user