Examples
Your basic configuration of a web application built with Ice Cream is provided here, there are 3 branches in the GitHub example repository.
main
javascript
typescript
NOTE
main
and javascript
are the same because the default Ice Cream variant is JavaScript.
More examples of Ice Cream apps are
- Hello, world!
render('app',`
<h1>Hello, world!</h1>
`,
`
body {
font-family:Arial, sans-serif;
}
`)
render('app',`
<h1>Hello, world!</h1>
`,
`
body {
font-family:Arial, sans-serif;
}
`)
- Returning functions
function myCSS() {
return (
```
body {
font-family:Arial, sans-serif;
}
```
)
}
render('app',`
<h1>Hello, world!</h1>
`,
`
${myCSS()}
`)
render('app',`
<h1>Hello, world!</h1>
`,
`
body {
font-family:Arial, sans-serif;
}
`)
There is no difference between TypeScript and JavaScript's variant of the render()
function, since you're just writing HTML and CSS code.
Make Your Own Example!
To make your own example project fork the example project over on Replit and open an issue on the .github
repository on our GitHub over here linking your fork of the Replit project, and it'll be linked in the Community Examples section of this page.
Community Examples
These are all community examples reviewed by @myferr on GitHub.
There are no community examples currently.
What's Next?
Next up you'll check out the rest of the documentation.