forked from DevSankalp1894/swank-meeting-7218
-
Notifications
You must be signed in to change notification settings - Fork 0
/
append_index.js
173 lines (172 loc) · 5.39 KB
/
append_index.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
const appendLeft=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="left_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("h2");
headline.innerText=el.headline;
let details=document.createElement("p");
details.innerText=el.details;
div.append(img,headline,details);
container.append(div)
})
}
const appendCenter=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="middle_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("p");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendRight=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="right_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(headline,img);
container.append(div)
})
}
const appendD2=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD2_2=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD4=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD4_4=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD6=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD6_6=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD8=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD8_8=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD10=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
const appendD10_10=(data,container)=>{
container.innerHTML=null;
data.forEach((el)=>{
let div=document.createElement("div");
div.className="d2_div";
let img=document.createElement("img");
img.src=el.img;
let headline=document.createElement("b");
headline.innerText=el.headline;
div.append(img,headline);
container.append(div)
})
}
export { appendLeft,appendCenter,appendRight,appendD2,appendD2_2,appendD4,appendD4_4,appendD6,appendD6_6,appendD8,appendD8_8,appendD10,appendD10_10 }