devluke commited on
Commit
bd20c53
Β·
verified Β·
1 Parent(s): 621557a

Upload index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +22 -4
templates/index.html CHANGED
@@ -838,6 +838,11 @@
838
  document.getElementById('btnEN').classList.toggle('active', lang === 'en');
839
  document.getElementById('btnID').classList.toggle('active', lang === 'id');
840
  document.documentElement.lang = lang === 'id' ? 'id' : 'en';
 
 
 
 
 
841
  }
842
 
843
  // ── Palette data per undertone ──────────────────────────────────────
@@ -856,7 +861,10 @@
856
  { hex: '#f0fdf4', name: 'Mint White' },
857
  { hex: '#c7d2fe', name: 'Periwinkle' },
858
  ],
859
- desc: 'Cool undertones suit jewel tones, icy blues, purples & true whites. Avoid yellow-based oranges.'
 
 
 
860
  },
861
  neutral: {
862
  swatch: '#fb923c',
@@ -872,7 +880,10 @@
872
  { hex: '#6b7280', name: 'Cool Grey' },
873
  { hex: '#fef3c7', name: 'Cream' },
874
  ],
875
- desc: 'Neutral undertones are the most versatile β€” warm & cool tones both work. Earthy nudes and balanced jewels shine.'
 
 
 
876
  },
877
  warm: {
878
  swatch: '#f59e0b',
@@ -888,7 +899,10 @@
888
  { hex: '#fca5a5', name: 'Peach' },
889
  { hex: '#f9a8d4', name: 'Coral Pink' },
890
  ],
891
- desc: 'Warm undertones glow in earthy oranges, golds, browns & warm greens. Avoid icy or ashy tones.'
 
 
 
892
  }
893
  };
894
 
@@ -1015,7 +1029,11 @@
1015
  chips.innerHTML = palette.colors.map(c =>
1016
  `<div class="palette-chip" style="background:${c.hex}" title="${c.name}"></div>`
1017
  ).join('');
1018
- document.getElementById('paletteDesc').textContent = palette.desc;
 
 
 
 
1019
 
1020
  document.getElementById('resultPanel').classList.remove('d-none');
1021
  }
 
838
  document.getElementById('btnEN').classList.toggle('active', lang === 'en');
839
  document.getElementById('btnID').classList.toggle('active', lang === 'id');
840
  document.documentElement.lang = lang === 'id' ? 'id' : 'en';
841
+
842
+ const pDesc = document.getElementById('paletteDesc');
843
+ if (pDesc && pDesc.dataset.palette) {
844
+ pDesc.textContent = PALETTES[pDesc.dataset.palette].desc[lang];
845
+ }
846
  }
847
 
848
  // ── Palette data per undertone ──────────────────────────────────────
 
861
  { hex: '#f0fdf4', name: 'Mint White' },
862
  { hex: '#c7d2fe', name: 'Periwinkle' },
863
  ],
864
+ desc: {
865
+ en: 'Cool undertones suit jewel tones, icy blues, purples & true whites. Avoid yellow-based oranges.',
866
+ id: 'Undertone cool (dingin) cocok dengan warna permata, biru es, ungu & putih bersih. Hindari warna oranye berbasis kuning.'
867
+ }
868
  },
869
  neutral: {
870
  swatch: '#fb923c',
 
880
  { hex: '#6b7280', name: 'Cool Grey' },
881
  { hex: '#fef3c7', name: 'Cream' },
882
  ],
883
+ desc: {
884
+ en: 'Neutral undertones are the most versatile β€” warm & cool tones both work. Earthy nudes and balanced jewels shine.',
885
+ id: 'Undertone netral adalah yang paling serbaguna β€” warna hangat & dingin sama-sama cocok. Warna nude bumi dan permata seimbang terlihat bersinar.'
886
+ }
887
  },
888
  warm: {
889
  swatch: '#f59e0b',
 
899
  { hex: '#fca5a5', name: 'Peach' },
900
  { hex: '#f9a8d4', name: 'Coral Pink' },
901
  ],
902
+ desc: {
903
+ en: 'Warm undertones glow in earthy oranges, golds, browns & warm greens. Avoid icy or ashy tones.',
904
+ id: 'Undertone warm (hangat) bercahaya dalam warna oranye bumi, emas, cokelat & hijau hangat. Hindari warna es atau keabuan.'
905
+ }
906
  }
907
  };
908
 
 
1029
  chips.innerHTML = palette.colors.map(c =>
1030
  `<div class="palette-chip" style="background:${c.hex}" title="${c.name}"></div>`
1031
  ).join('');
1032
+
1033
+ const pDesc = document.getElementById('paletteDesc');
1034
+ const paletteKey = PALETTES[resLabel] ? resLabel : 'neutral';
1035
+ pDesc.dataset.palette = paletteKey;
1036
+ pDesc.textContent = palette.desc[currentLang];
1037
 
1038
  document.getElementById('resultPanel').classList.remove('d-none');
1039
  }