import { Component, ChangeDetectionStrategy, input, output, computed } from '@angular/core'; import { Block, HslColor } from '../../models'; import { getColorOfTag } from '../../utils/color'; /** * A block rendered as a small COLORED SQUARE (1/6 of tower width). * Only DONE blocks appear here; pending blocks appear in the tasks accordion. * Clicking opens the block-edit modal in the parent tower component. */ @Component({ selector: 'lt-block', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: `
`, styles: ` @import '../../../library/main'; :host { position: relative; width: calc(100% / 6); padding-bottom: calc(100% / 6); div { position: absolute; width: 100%; height: 100%; cursor: pointer; @media (hover: hover) and (pointer: fine) { transition: transform $long-animation-time; &:hover, &.hovered { transform: translateY(4px); } } } } `, }) export class BlockComponent { readonly block = input.required