Add Basic Prototype of Level Card Component

This commit is contained in:
copecone committed 2026-04-24 08:01:02 +09:00
1 parent 96894c81e0
commit 31f78de70b
9 files changed
+88 -2

No files matched your search

@@ -1,9 +1,11 @@
import {
afterNextRender, ChangeDetectionStrategy,
afterNextRender,
ChangeDetectionStrategy,
Component,
effect,
ElementRef,
inject,
input,
NgZone,
OnDestroy,
viewChild,
@@ -24,6 +26,8 @@ export class BrandAccent implements OnDestroy {
private ctx!: CanvasRenderingContext2D;
private settingsService = inject(SettingsService);
drawGrid = input<boolean>(true);
private canvasNativeSize: [number, number] = [0, 0];
private bgGradient!: CanvasGradient;
private gridGradient!: CanvasGradient;
@@ -235,6 +239,8 @@ export class BrandAccent implements OnDestroy {
// this.ctx.drawImage(this.offscreenCanvas, 0, 0, this.canvasNativeSize[0], this.canvasNativeSize[1]);
}
if (!this.drawGrid()) return;
if (!isDark) {
this.ctx.globalCompositeOperation = 'multiply';
} else {
@@ -0,0 +1,6 @@
<section class="information">
<div class="soundtrack">
<span class="artist">かめりあ (Camellia)</span>
<span class="track-name">Tentaclar Aliens' Epic Extraterretterrestrial Jungle Dance Party Inside Of A Super-Ultra-Mega-Gigantic U.F.O. (It Maybe U.U.F.O.) Silently Flying Over Illinois St.

</span>
</div>
</section>
@@ -0,0 +1,37 @@
:host {
width: 400px;
height: 160px;
border-radius: 8px;
outline: light-dark(oklch(0 0 0 / 20%), oklch(1 0 0 / 20%)) 2px solid;
padding: 12px;
section.information {
.soundtrack {
display: flex;
flex-direction: column;
gap: 6px;
.artist {
height: 19px;
font-size: 14px;
align-content: center;
font-weight: 800;
}
.track-name {
font-size: 18px;
line-height: 20px;
height: 40px;
font-weight: 900;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
@@ -0,0 +1,9 @@
import { Component } from '@angular/core';
@Component({
selector: 'level-card',
imports: [],
templateUrl: './level-card.html',
styleUrl: './level-card.scss',
})
export class LevelCard {}