feat: Redesign homepage to a split layout with a brand sidebar, removing the interactive ASCII art controls.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -270,9 +270,12 @@ export class AsciiController {
|
||||
async calculateGrid(): Promise<GridCache | undefined> {
|
||||
if (!this.currentImgUrl) return;
|
||||
|
||||
const parent = this.canvas.parentElement;
|
||||
if (!parent) return;
|
||||
|
||||
const fontAspectRatio = 0.55;
|
||||
const marginRatio = 0.2;
|
||||
const screenW = window.innerWidth;
|
||||
const marginRatio = 0.05; // Reduced margin for container fit
|
||||
const screenW = parent.clientWidth;
|
||||
const availW = screenW * (1 - marginRatio);
|
||||
|
||||
let widthCols = Math.floor(availW / 6);
|
||||
@@ -337,12 +340,16 @@ export class AsciiController {
|
||||
}
|
||||
|
||||
private updateCanvasSize(): void {
|
||||
const parent = this.canvas.parentElement;
|
||||
if (!parent) return;
|
||||
|
||||
const fontAspectRatio = 0.55;
|
||||
const gridAspect = (this.cachedGrid.widthCols * fontAspectRatio) / this.cachedGrid.heightRows;
|
||||
const screenW = window.innerWidth;
|
||||
const screenH = window.innerHeight;
|
||||
const maxW = screenW * 0.95;
|
||||
const maxH = screenH * 0.95;
|
||||
|
||||
const screenW = parent.clientWidth;
|
||||
const screenH = parent.clientHeight;
|
||||
const maxW = screenW * 0.98;
|
||||
const maxH = screenH * 0.98;
|
||||
|
||||
let finalW: number, finalH: number;
|
||||
if (gridAspect > maxW / maxH) {
|
||||
|
||||
Reference in New Issue
Block a user