frontend-js-example/index.html

29 lines
1 KiB
HTML
Raw Normal View History

2024-03-31 15:05:36 -05:00
<!DOCTYPE html>
<html>
2024-03-31 15:08:42 -05:00
<script src="frontend.js"></script>
2024-03-31 15:05:36 -05:00
<script>
2024-04-06 19:42:02 -05:00
initHead("FrontendJS Example")
2024-03-31 16:54:55 -05:00
initBody()
2024-03-31 15:05:36 -05:00
clearPage()
2024-03-31 16:54:55 -05: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 16:16:40 -05:00
createImage("moz", "https://upload.wikimedia.org/wikipedia/commons/5/5c/Mozilla_dinosaur_head_logo.png")
applyCSS("moz", "width", "25%")
2024-03-31 15:05:36 -05:00
let dino = createButton("dino", "dino sound")
2024-04-07 16:16:40 -05:00
changeAttributes(dino, {"onclick": "spin('moz'); playAudio(`https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3`, 0.4)"})
2024-04-06 20:11:08 -05:00
applyCSS("body", "background", "black")
applyCSS("body", "color", "lime")
importGoogleFont('Roboto');
applyCSS("body", "font-family", "'Roboto', sans-serif")
2024-03-31 15:05:36 -05:00
</script>
2024-04-06 19:48:31 -05:00
</html>