Neo-Tokyo Neon Noir design pour fiches items

- Nouvelle palette : #080c14 fond, accents néon par type (#00d4d4 item, #ff3d5a kungfu, #4a9eff spell, #cc44ff supernatural)
- Nouveaux composants LESS : .cde-neon-header (clip-path angulaire + accent line), .cde-avatar (clip-path), .cde-stat-grid/.cde-stat-cell (style terminal), .cde-badge (parallélogramme), .cde-neon-tabs (underline néon animé), .cde-check-cell
- Fix layout : .cde-sheet width: 100% + height: 100% + overflow: hidden, .cde-tab-body flex: 1 + min-height: 0, .cde-notes-editor flex stretch
- Fix positions : DEFAULT_OPTIONS height explicite pour tous les types (item 620x580, spell 660x680, kungfu 720x680, supernatural 560x520)
- 4 templates items reécrits avec nouvelles classes et structure épurée

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-26 00:18:04 +01:00
commit 068fca00e5
739 changed files with 7923 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
export class CDEMessage extends ChatMessage {
async renderHTML({ canDelete, canClose = false, ...rest } = {}) {
const html = await super.renderHTML({ canDelete, canClose, ...rest })
this.#enrichChatCard(html)
return html
}
getAssociatedActor() {
if (this.speaker.scene && this.speaker.token) {
const scene = game.scenes.get(this.speaker.scene)
const token = scene?.tokens.get(this.speaker.token)
if (token) return token.actor
}
return game.actors.get(this.speaker.actor)
}
#enrichChatCard(html) {
const actor = this.getAssociatedActor()
let img
let nameText
if (this.isContentVisible) {
img = actor?.img ?? this.author.avatar
nameText = this.alias
} else {
img = this.author.avatar
nameText = this.author.name
}
const avatar = document.createElement("a")
avatar.classList.add("avatar")
if (actor) avatar.dataset.uuid = actor.uuid
const avatarImg = document.createElement("img")
Object.assign(avatarImg, { src: img, alt: nameText })
avatar.append(avatarImg)
const name = document.createElement("span")
name.classList.add("name-stacked")
const title = document.createElement("span")
title.classList.add("title")
title.append(nameText)
name.append(title)
const sender = html.querySelector(".message-sender")
sender?.replaceChildren(avatar, name)
}
}