Skip to content

ultraq/thymeleaf-layout-dialect-js

Repository files navigation

Thymeleaf Layout Dialect JS

Build Status Coverage Status Bower GitHub Release License

In-browser version of the Thymeleaf Layout Dialect, used for static prototyping.

Installation

A browser that supports the fetch API and a large chunk of the ES6 spec is currently required.

Many front-end development projects these days use a mock server for rapid development of static assets, eg: webpack dev server, or Express.js. This project currently works using those mock servers as you can't retrieve other resources (ie: your layout templates) using the file:// protocol.

Bower

This project is available via Bower and can be installed with the following command from a directory within your own project:

bower install thymeleaf-layout-dialect --save-dev

Usage

With those in place, add the following script line somewhere in your template, preferably the <head> section:

<script src="(path-to-thymeleaf-layout-dialect-js)/thymeleaf-layout-dialect.js" th:remove="all"></script>

The th:remove directive is there so that when your template is processed for real by your app server, Thymeleaf will remove this line.

About

In-browser version of the Thymeleaf Layout Dialect, used for static prototyping

Resources

License

Stars

Watchers

Forks

Packages

No packages published