-
Notifications
You must be signed in to change notification settings - Fork 0
/
page0.js
28 lines (26 loc) · 1 KB
/
page0.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
h.title("Demo Page");
h.headtag("META","name","description","content","Demo Single Page Application created using h.js");
h.headtag("META","name","keywords","content","demo,vanilla,javascript,js,dom");
document.body.style.backgroundColor="#343330";
h.styleTag("a{color:#6ED9E5;}");
let centre = "text-align:center;";
h.addEl("div","grid","main");
h.styles("grid","font-family:'Ubuntu',Sans-Serif;color:white;");
h.add("grid",`
<h2>Sample Heading</h2>
<p>Sample paragraph tag to slot some fancy looking Lorem Ipsums into.</p>
<p>Another paragraph tag because, well, why not!</p>
`);
h.addEl("div","img","grid");
h.styles("img",centre);
h.add("img",`
<figure>
${h.pic("https://c.tadst.com/gfx/600x337/full-moon-phase2.jpg","moon")}
<figcaption>The Moon. Because science.</figcaption>
</figure>
`);
h.addEl("div","imgtest","grid");
h.styles("imgtest",centre);
h.add("imgtest",`
<a href="javascript:h.set('imgtest',h.pic('https://c.tadst.com/gfx/600x337/full-moon-phase2.jpg','moon'));">Click to add another moon!</a>
`);