-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharacter.js
68 lines (61 loc) · 2.72 KB
/
character.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const characters = [
{
name: 'Nguyễn Minh Đức',
age: 16,
image: './assets/character/duc.jpg',
description: 'Dáng vừa không cao không thấp, tính ngay thẳng, ngông ở mức độ vẫn còn hiểu chuyện. Sống trên thành phố từ khi còn nhỏ và không thoải mái khi về tới quê nội. Ba mẹ đưa ĐỨC về quê và sống nhờ nhà cô Ba. ',
},
{
name: 'Hà Ánh Mai',
age: 15,
image: './assets/character/nho.jpg',
description: 'Dáng cao, hiểu chuyện, hiếu thảo. Không chơi chung được với người trong xóm và sống trong lời chế giễu bàn tán của mọi người. Ở chung với nhà dì Tư, Mai chưa từng thấy dễ thở trong cuộc sống như thế.',
},
{
name: 'Park Jimin',
age: 27,
image: './assets/character/jimin.jpg',
description: 'Jimin brings joy to others with his cheerful personality and is admired for his exceptional dance skills and stage presence.',
},
{
name: 'Kim Namjoon',
age: 28,
image: './assets/character/rm.jpg',
description: 'He is known for his intelligent and thoughtful nature. RM possesses strong leadership skills and is the spokesperson for the group.',
},
{
name: 'Jung Ho-seok',
age: 29,
image: './assets/character/hope.jpeg',
description: 'He is known for his intelligent and thoughtful nature. RM possesses strong leadership skills and is the spokesperson for the group.',
},
{
name: 'Min Yoongi ',
age: 30,
image: './assets/character/suga.jpeg',
description: 'He is known for his intelligent and thoughtful nature. RM possesses strong leadership skills and is the spokesperson for the group.',
},
{
name: 'Kim Seok-jin',
age: 30,
image: './assets/character/jin.jpeg',
description: 'He is known for his intelligent and thoughtful nature. RM possesses strong leadership skills and is the spokesperson for the group.',
}
// Add more characters here
];
const introCharacterContainer = document.querySelector('.intro_character');
characters.forEach(character => {
const section = document.createElement('section');
const img = document.createElement('img');
img.src = character.image;
const blockquote = document.createElement('blockquote');
const h1 = document.createElement('h1');
const p = document.createElement('p');
h1.textContent = `${character.name} - ${character.age}`;
p.textContent = character.description;
blockquote.appendChild(h1);
blockquote.appendChild(p);
section.appendChild(img);
section.appendChild(blockquote);
introCharacterContainer.appendChild(section);
});