-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhtmlGenerators.js
62 lines (51 loc) · 1.78 KB
/
htmlGenerators.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
//блочні генератори html
const htmlDetailsBlock = ({blockId, label, listId}) =>
(`
<input type="checkbox" id="${blockId}">
<label for="${blockId}" class="summary">${label}</label>
<div>
<ul id="${listId}"></ul>
</div>
`);
const htmlAchievmentsBlock = ({title, listId}) => `<h3>${title}</h3><ol class="inverted" id="${listId}"> </ol>`;
const htmlRecentBlock = ({title, listId}) => {
return `<h6>${title}</h6><div id="${listId}"> </div>`;
};
const htmlSimpleSectionBlock = ({title, listId}) => {
return `
<h3>${title}</h3>
<p class="tags small" id="${listId}" ></p>`
};
//айтемові генератори html
const htmlEventItem = ({year, eventsHTML}) => {
return (`
<p style="margin-top: 10px"><b><em>${year}</em></b></p>
<ul>${eventsHTML.map(event => `<li>${event}</li>`).join('')}</ul>
`);
};
const htmlPublicationItem = ({year, eventsHTML}) => {
return (`
<div style="margin-top: 10px" >
<div class="labels" style="height: 30px" >
<a rel="external" class="label" ><b><em>${year}</em></b></a>
</div>
<ul>${eventsHTML.map(event => `<li>${event}</li>`).join('')}</ul>
</div>
`);
};
const htmlAchievmentsItem = ({textHTML}) => {
return `<p><em>${textHTML}</em></p><br>`;
};
const htmlBackEventsItem = ({id, year, eventsHTML}) =>
(`
<input type="checkbox" id="${id}">
<label for="${id}" class="summary">
<div class="labels" style="height: 30px" >
<a rel="external" class="label" ><b><em>${year}</em></b></a>
</div>
</label>
<div>
<ul>${eventsHTML.map(e => `<li>${e}</li>`).join('')}</ul>
</div>
`);
const simpleReturn = (value) => value;