A simple servers-side-html library based on Bulma components.
Everything is fluent and chainable, i.e. no builders, no withers.
Simple example:
@Path("/")
public class Application {
@GET
@Produces(TEXT_HTML)
public String index() {
return html("Title Text").body(title("Hello World")).render();
}
}
returns:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title Text</title>
</head>
<body>
<h1 class="title">Hello World</h1>
</body>
</html>
You can also return the Renderable
and add a trivial MessageBodyWriter
.
This is JAX-RS, but works analogous in Spring or whatever.
There are no dependencies!
For more examples, look at the tests and maybe the all-tests.html
page generated by the tests.
Currently, the only icons supported, is fontawesome.