-
Notifications
You must be signed in to change notification settings - Fork 18
/
htmlReactivity.js
192 lines (176 loc) · 12.4 KB
/
htmlReactivity.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
const fs = require("fs");
const writeFile = (lang, langValues, page, defaultHead, metaTags, defaultNav, nav4, defaultFooter) => {
let writeStream = fs.createWriteStream(lang + "/" + page + ".html");
defaultHead.forEach((heads) => {
writeStream.write(heads);
});
metaTags.forEach((tags) => {
writeStream.write(tags);
});
defaultNav.forEach((navs) => {
writeStream.write(navs);
});
writeStream.write("<h1 class='truncate'>" + langValues.reactivitySeries + "</h1>");
nav4.forEach((navs) => {
writeStream.write(navs);
});
writeStream.write("<section class='content-wrapper'>");
writeStream.write("<div class='container'>");
writeStream.write("<h1 class='py-8 text-upper text-center grayText'>");
writeStream.write(langValues.reactivitySeries + "</h1>");
writeStream.write("<div id='solubilityHeader' class='row text-upper aboutHeader text-center heavyFont'></div>");
writeStream.write("<div>");
writeStream.write("<div class='grid-container'>");
writeStream.write("<div class='reactivity-grid'>");
writeStream.write("<div class='grid-col grid-col--fixed-left'>");
writeStream.write("<div id='gridTopLeft' class='grid-item grid-item--header'><p></p></div>");
writeStream.write("<div class='grid-item'>" + langValues.caesium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.francium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.rubidium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.potassium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.sodium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.lithium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.barium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.radium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.strontium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.calcium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.magnesium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.aluminium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.titanium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.manganese + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.zinc + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.chromium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.iron + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.cadmium + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.cobalt + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.nickel + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.tin + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.lead + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.hydrogen + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.antimony + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.bismuth + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.copper + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.tungsten + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.mercury + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.silver + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.gold + "</div>");
writeStream.write("<div class='grid-item'>" + langValues.platinum + "</div>");
writeStream.write("</div>");
writeStream.write("<div class='grid-col'>");
writeStream.write("<div class='grid-item grid-item--header'>" + langValues.coldWater + "</div>");
writeStream.write("<div class='grid-item violentReaction'>" + langValues.violentReaction + "</div>");
writeStream.write("<div class='grid-item violentReaction'>" + langValues.violentReaction + "</div>");
writeStream.write("<div class='grid-item violentReaction'>" + langValues.violentReaction + "</div>");
writeStream.write("<div class='grid-item violentReaction'>" + langValues.violentReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item verySlowReaction'>" + langValues.verySlowReaction + "</div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item nonMetal'>" + langValues.nonMetal + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("</div>");
writeStream.write("<div class='grid-col'>");
writeStream.write("<div class='grid-item grid-item--header'>" + langValues.hotWater + "</div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item strongReaction'>" + langValues.strongReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item nonMetal'>" + langValues.forComparison + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("</div>");
writeStream.write("<div class='grid-col'>");
writeStream.write("<div class='grid-item grid-item--header'>" + langValues.diluteAcids + "</div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item moderateReaction'>" + langValues.moderateReaction + "</div>");
writeStream.write("<div class='grid-item slowReaction'>" + langValues.slowReaction + "</div>");
writeStream.write("<div class='grid-item slowReaction'>" + langValues.slowReaction + "</div>");
writeStream.write("<div class='grid-item slowReaction'>" + langValues.slowReaction + "</div>");
writeStream.write("<div class='grid-item'></div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("<div class='grid-item noReaction'>" + langValues.noReaction + "</div>");
writeStream.write("</div>");
writeStream.write("</div>");
writeStream.write("</div>");
writeStream.write("</div>");
writeStream.write("</div>");
writeStream.write("</section>");
defaultFooter.forEach((footers) => {
writeStream.write(footers);
});
// the finish event is emitted when all data has been flushed from the stream
writeStream.on("finish", () => {
console.log("Created " + lang + "-" + page);
});
// close the stream
writeStream.end();
};
exports.writeFile = writeFile;