xccxv
All checks were successful
Deploy / deploy (push) Successful in 51s

This commit is contained in:
2026-07-24 21:09:33 +02:00
parent 5256dd4080
commit 5630ff2308
12 changed files with 139 additions and 29 deletions

View File

@@ -731,6 +731,7 @@ document.addEventListener('DOMContentLoaded', () => {
'pkt-avatar--hair-',
'pkt-avatar--beard-',
'pkt-avatar--glasses-',
'pkt-avatar--hat-',
];
const updateAvatarPreview = (form) => {
@@ -758,9 +759,12 @@ document.addEventListener('DOMContentLoaded', () => {
preview.classList.add(`pkt-avatar--hair-${readValue('avatar_hair_style')}`);
preview.classList.add(`pkt-avatar--beard-${readValue('avatar_beard_style')}`);
preview.classList.add(`pkt-avatar--glasses-${readValue('avatar_glasses_style')}`);
preview.classList.add(`pkt-avatar--hat-${readValue('avatar_hat_style')}`);
preview.style.setProperty('--avatar-skin', readColor('avatar_skin_tone'));
preview.style.setProperty('--avatar-hair', readColor('avatar_hair_color'));
preview.style.setProperty('--avatar-eye', readColor('avatar_eye_color'));
preview.style.setProperty('--avatar-hat', readColor('avatar_hat_color'));
preview.style.setProperty('--avatar-outfit', readColor('avatar_outfit_color'));
};
document.querySelectorAll('[data-avatar-builder]').forEach((form) => {