Refonte de l'interface et nouveau nom : Bobinoo
- Thème « salle de cinéma » : fond salle obscure chaud (clair = papier crème), accent ambre par défaut (l'ancien rouge par défaut passe à l'ambre, préréglage Rouge conservé), coins presque droits - Polices embarquées : Gloock (titres), Onest (texte), Sometype Mono (codes d'épisode) ; Inter retirée - Accueil : bannière en carte avec pellicule d'épisodes, billets « Reprendre » avec talon +1, jaquettes VHS pour « À voir » ; pellicule aussi sur la fiche et le revisionnage - Plus de petites capitales espacées ni de titres bicolores ; métadonnées sans points médians - Nouvelle icône (bobine), pages légales/404 et carte de partage aux nouvelles couleurs - Kino → Bobinoo partout (18 langues, PWA, pages légales) ; identifiants techniques inchangés Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
80 files changed
+697
-544
No files matched your search
+23
-22
@@ -13,7 +13,8 @@ import { formatRating } from './utils'
|
||||
|
||||
const W = 1080
|
||||
const H = 1350
|
||||
const FONT = "'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"
|
||||
const FONT = "'Onest Variable', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif"
|
||||
const DISPLAY = "'Gloock', 'Noto Serif', Georgia, serif"
|
||||
|
||||
function cssVar(name: string, fallback: string) {
|
||||
const v = getComputedStyle(document.documentElement).getPropertyValue(name).trim()
|
||||
@@ -22,14 +23,14 @@ function cssVar(name: string, fallback: string) {
|
||||
|
||||
function colors() {
|
||||
return {
|
||||
bg: '#0a0a0a',
|
||||
surface: '#161615',
|
||||
line: '#2a2a28',
|
||||
ink: '#f4f2ee',
|
||||
ink2: '#b3b0a8',
|
||||
ink3: '#8a8781',
|
||||
accent: cssVar('--color-accent', '#ef4444'),
|
||||
fill: cssVar('--color-accent-fill', '#d11f2f'),
|
||||
bg: '#14120f',
|
||||
surface: '#1d1a16',
|
||||
line: '#2f2a23',
|
||||
ink: '#f1eadd',
|
||||
ink2: '#bcb2a1',
|
||||
ink3: '#948a79',
|
||||
accent: cssVar('--color-accent', '#f0a63a'),
|
||||
fill: cssVar('--color-accent-fill', '#f0a63a'),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,19 +180,19 @@ function drawBrand(ctx: CanvasRenderingContext2D, y: number) {
|
||||
const c = colors()
|
||||
ctx.textBaseline = 'alphabetic'
|
||||
ctx.textAlign = 'left'
|
||||
ctx.font = `700 34px ${FONT}`
|
||||
const a = 'Ki'
|
||||
const total = ctx.measureText('Kino').width
|
||||
ctx.font = `400 34px ${DISPLAY}`
|
||||
const a = 'Bobin'
|
||||
const total = ctx.measureText('Bobinoo').width
|
||||
const x = (W - total) / 2
|
||||
ctx.fillStyle = c.ink
|
||||
ctx.fillText(a, x, y)
|
||||
ctx.fillStyle = c.accent
|
||||
ctx.fillText('no', x + ctx.measureText(a).width, y)
|
||||
ctx.fillText('oo', x + ctx.measureText(a).width, y)
|
||||
}
|
||||
|
||||
async function newCanvas() {
|
||||
try {
|
||||
await Promise.all([document.fonts.load(`700 40px Inter`), document.fonts.load(`400 40px Inter`), document.fonts.load(`600 40px Inter`)])
|
||||
await Promise.all([document.fonts.load(`700 40px 'Onest Variable'`), document.fonts.load(`400 40px 'Onest Variable'`), document.fonts.load(`600 40px 'Onest Variable'`), document.fonts.load(`400 40px Gloock`)])
|
||||
} catch {
|
||||
/* police système en secours */
|
||||
}
|
||||
@@ -236,7 +237,7 @@ const hiRes = (url?: string) => (url?.startsWith('https://image.tmdb.org/t/p/w34
|
||||
/**
|
||||
* Affiche d'une fiche, façon « poster minimaliste » :
|
||||
* image en haut, gros titre en capitales + année, puis une fiche technique
|
||||
* (durée, réalisation, production, casting, genres, ma note) — aux couleurs de Kino.
|
||||
* (durée, réalisation, production, casting, genres, ma note) — aux couleurs de Bobinoo.
|
||||
*/
|
||||
export async function renderItemCard(item: MediaItem, scale: RatingScale, credits?: CardCredits): Promise<Blob> {
|
||||
const { canvas, ctx } = await newCanvas()
|
||||
@@ -293,7 +294,7 @@ export async function renderItemCard(item: MediaItem, scale: RatingScale, credit
|
||||
const size = fitSize(ctx, title, 900, 104, 64, iw - yearW)
|
||||
ctx.fillStyle = c.ink
|
||||
if (size) {
|
||||
ctx.font = `900 ${size}px ${FONT}`
|
||||
ctx.font = `400 ${size}px ${DISPLAY}`
|
||||
ctx.fillText(title, ix, y)
|
||||
const tw = ctx.measureText(title).width
|
||||
if (year) {
|
||||
@@ -304,7 +305,7 @@ export async function renderItemCard(item: MediaItem, scale: RatingScale, credit
|
||||
}
|
||||
} else {
|
||||
// Titre très long : deux lignes plus petites
|
||||
ctx.font = `900 62px ${FONT}`
|
||||
ctx.font = `400 62px ${DISPLAY}`
|
||||
const lines = wrap(ctx, title, iw, 2)
|
||||
y -= 58
|
||||
lines.forEach((l, i) => ctx.fillText(l, ix, y + i * 64))
|
||||
@@ -352,13 +353,13 @@ export async function renderItemCard(item: MediaItem, scale: RatingScale, credit
|
||||
}
|
||||
ctx.textAlign = 'left'
|
||||
ctx.textBaseline = 'alphabetic'
|
||||
ctx.font = `800 30px ${FONT}`
|
||||
const brandW = ctx.measureText('Kino').width
|
||||
ctx.font = `400 30px ${DISPLAY}`
|
||||
const brandW = ctx.measureText('Bobinoo').width
|
||||
const bx = ix + iw - brandW
|
||||
ctx.fillStyle = c.ink
|
||||
ctx.fillText('Ki', bx, fy + 11)
|
||||
ctx.fillText('Bobin', bx, fy + 11)
|
||||
ctx.fillStyle = c.accent
|
||||
ctx.fillText('no', bx + ctx.measureText('Ki').width, fy + 11)
|
||||
ctx.fillText('oo', bx + ctx.measureText('Bobin').width, fy + 11)
|
||||
|
||||
return toBlob(canvas)
|
||||
}
|
||||
@@ -388,7 +389,7 @@ export async function renderTopCard(title: string, entries: (MediaItem | undefin
|
||||
const bigW = 460
|
||||
const bigH = 690
|
||||
const top = 270
|
||||
ctx.font = `900 300px ${FONT}`
|
||||
ctx.font = `400 300px ${DISPLAY}`
|
||||
ctx.lineWidth = 5
|
||||
ctx.strokeStyle = c.accent
|
||||
ctx.textBaseline = 'alphabetic'
|
||||
|
||||
Reference in new issue
Block a user