feat: 第 2 页新增灯笼与酒水单前景列表

右上角以链/笼/灯/穗拼出灯笼;前景标题「酒水单」下按 references/节目单.txt
排两列曲目(前 5 后 7,数字与曲名各自左对齐);酒杯改为深绿玻璃色。
This commit is contained in:
rogerwang2008 committed 2026-11-11 03:25:00 +08:00
1 parent b84340fac1
commit f253c8acf2
3 files changed
+123 -18

No files matched your search

+60 -14
View File
@@ -55,21 +55,67 @@
...block(25, 39, 2, 3, '酒', 'wine'),
...block(24, 42, 4, 1, '桶', 'barrel'),
/* 吊灯:右上角,9 格宽;吊线—倒锥灯罩—T 形灯泡 */
...block(23, 0, 1, 3, '灯', 'lamp'),
...block(21, 3, 5, 1, '灯', 'lamp'),
...block(20, 4, 7, 1, '灯', 'lamp'),
...block(19, 5, 9, 1, '灯', 'lamp'),
/* 灯笼:右上角,4 格宽;灰链—橙笼作顶盖—橙侧边去角,内里亮黄灯芯 */
{ text: '链', x: 23, y: 0, cls: 'chain' },
...block(22, 1, 2, 1, '链', 'chain'),
{ text: '链', x: 22, y: 2, cls: 'chain' },
...block(22, 3, 2, 1, '笼', 'cap'),
...block(21, 4, 1, 3, '笼', 'shade'),
...block(24, 4, 1, 3, '笼', 'shade'),
...block(22, 4, 2, 3, '灯', 'core'),
...block(22, 7, 2, 1, '笼', 'shade'),
/* 光:灯泡四周的暗黄光晕,上方被灯罩遮住不放 */
...block(21, 6, 1, 2, '光', 'glow'),
...block(25, 6, 1, 2, '光', 'glow'),
...block(22, 7, 1, 1, '光', 'glow'),
...block(24, 7, 1, 1, '光', 'glow'),
...block(22, 8, 3, 1, '光', 'glow'),
...block(22, 6, 3, 1, '灯', 'bulb'),
{ text: '灯', x: 23, y: 7, cls: 'bulb' },
/* 穗:灯笼底下四字,上行两格、下行左右分开 */
...block(22, 8, 2, 1, '穗', 'tassel'),
{ text: '穗', x: 21, y: 9, cls: 'tassel' },
{ text: '穗', x: 23, y: 9, cls: 'tassel' },
],
});
const scene = document.querySelector('.scene');
const listing = document.createElement('h1');
listing.className = 'listing';
listing.textContent = '酒水单';
scene.append(listing);
/* 酒水单:前景两列,前 5 后 7;罗马数字与曲目名各自左对齐 */
const PROGRAM = [
['I', '听'], ['II', '酒歌'], ['III', '眼睛'], ['IV', '黑'], ['V', '天'],
['VI', '麻雀'], ['VII', '业火'], ['VIII', '问'], ['IX', '难'], ['X', '画'],
['XI', '田'], ['XII', '今生'],
];
const programColumn = (items) => {
const col = document.createElement('div');
col.className = 'program-col';
for (const [no, name] of items) {
const row = document.createElement('div');
row.className = 'program-item';
const numeral = document.createElement('span');
numeral.className = 'program-no';
numeral.textContent = no;
const label = document.createElement('span');
label.className = 'program-name';
label.textContent = name;
row.append(numeral, label);
col.append(row);
}
return col;
};
const program = document.createElement('div');
program.className = 'program';
const first = programColumn(PROGRAM.slice(0, 5));
const second = programColumn(PROGRAM.slice(5));
first.classList.add('program-col-1');
second.classList.add('program-col-2');
program.append(first, second);
scene.append(program);
})();