frontend-js-example/index.html

29 lines
1 KiB
HTML
Raw Permalink Normal View History

2024-03-31 20:05:36 +00:00
<!DOCTYPE html>
<html>
2024-03-31 20:08:42 +00:00
<script src="frontend.js"></script>
2024-03-31 20:05:36 +00:00
<script>
2024-04-07 00:42:02 +00:00
initHead("FrontendJS Example")
2024-03-31 21:54:55 +00:00
initBody()
2024-03-31 20:05:36 +00:00
clearPage()
2024-03-31 21:54:55 +00:00
writeHTML("body", markdownToHTML(`# Hello world!
This is an example of how to properly use Frontend JS.
Also it's a test if things are working.
* Air
* Water
* Fire
* Dirt
* ####ing magnets, how do they work!?!
`))
createParagraph("paragraphLorum", `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar nisl eu risus tincidunt, non aliquet metus tempor. Duis ac tortor commodo, venenatis leo at, consectetur nulla.`)
2024-04-07 21:16:40 +00:00
createImage("moz", "https://upload.wikimedia.org/wikipedia/commons/5/5c/Mozilla_dinosaur_head_logo.png")
applyCSS("moz", "width", "25%")
2024-03-31 20:05:36 +00:00
let dino = createButton("dino", "dino sound")
2024-04-07 21:16:40 +00:00
changeAttributes(dino, {"onclick": "spin('moz'); playAudio(`https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3`, 0.4)"})
2024-04-07 01:11:08 +00:00
applyCSS("body", "background", "black")
applyCSS("body", "color", "lime")
importGoogleFont('Roboto');
applyCSS("body", "font-family", "'Roboto', sans-serif")
2024-03-31 20:05:36 +00:00
</script>
2024-04-07 00:48:31 +00:00
</html>