Skip to content
/ bulma-java Public

A simple servers-side-html library based on Bulma components

License

Notifications You must be signed in to change notification settings

t1/bulma-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bulma Java badge badge

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.

For a little demo based on Quarkus and HTMX, take a look here.

Restrictions

Currently, the only icons supported, is fontawesome.

About

A simple servers-side-html library based on Bulma components

Resources

License

Stars

Watchers

Forks

Packages

No packages published