frontend-js-example/index.html

27 lines
926 B
HTML
Raw 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-03-31 20:05:36 +00:00
let dino = createButton("dino", "dino sound")
2024-04-07 21:01:52 +00:00
changeAttributes(dino, {"onclick": "spin('dino'); 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>