2 Commits
Author SHA1 Message Date
rick a44f5ab9cf Merge branch 'impl/perfectdraft-card' 2026-04-18 19:46:08 +02:00
rick d1b64fd9c7 Emoji grid fills zone: stretch rows, bigger emojis (v0.1.4)
- Grid rows use 1fr to stretch vertically across full zone height
- Each glass is a flex container filling its grid cell
- Emoji font-size: min(7vw, 5em) — roughly 150% of previous
- Grid align-content: stretch instead of center

Made-with: Cursor
2026-04-18 19:45:56 +02:00
3 changed files with 23 additions and 16 deletions
+12 -9
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@ import type { PerfectDraftCardConfig } from "./types.js";
import { GLASS_SIZES, DEFAULT_GLASS_SIZE, DOMAIN } from "./const.js";
import { getAllBeers } from "./beer-catalog.js";
const EDITOR_VERSION = "0.1.3";
const EDITOR_VERSION = "0.1.4";
interface DiscoveredDevice {
deviceId: string;
+10 -6
View File
@@ -226,6 +226,7 @@ export class PerfectDraftCard extends LitElement {
private _renderEmojiGrid(count: number): TemplateResult {
const maxGlasses = Math.floor(KEG_TOTAL_VOLUME_ML / this._glassSize);
const cols = maxGlasses <= 10 ? 5 : 6;
const rows = Math.ceil(maxGlasses / cols);
const slots = [];
for (let i = 0; i < maxGlasses; i++) {
slots.push(i < count
@@ -234,7 +235,7 @@ export class PerfectDraftCard extends LitElement {
);
}
return html`
<div class="emoji-grid" style="grid-template-columns: repeat(${cols}, 1fr);">
<div class="emoji-grid" style="grid-template-columns: repeat(${cols}, 1fr); grid-template-rows: repeat(${rows}, 1fr);">
${slots}
</div>
`;
@@ -458,18 +459,21 @@ export class PerfectDraftCard extends LitElement {
/* === KEG EMOJI GRID === */
.emoji-grid {
display: grid;
gap: 2px;
justify-items: center;
align-items: center;
align-content: stretch;
width: 100%;
height: 100%;
flex: 1;
align-content: center;
padding: 0;
font-size: min(4.5vw, 3.5em);
}
.glass {
line-height: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: min(7vw, 5em);
}
.glass.empty {
opacity: 0.15;