Skip to content
In-browser version of the Thymeleaf Layout Dialect, used for static prototyping
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Use extracted object utilities module Apr 30, 2017
test
.babelrc
.eslintrc.json Retrieve the layout template using fetch Dec 29, 2016
.gitignore
.nycrc Code coverage stats! 😁 Apr 30, 2017
.travis.yml Code coverage stats! 😁 Apr 30, 2017
CHANGELOG.md Swap webpack out for rollup for smaller bundles Apr 30, 2017
LICENSE.txt
README.md Add code coverage badge (of shame) Apr 30, 2017
bower.json Fix license ID and git URLs Apr 11, 2017
package.json
rollup.config.js
thymeleaf-layout-dialect.js Use extracted object utilities module Apr 30, 2017
thymeleaf-layout-dialect.min.js Use extracted object utilities module Apr 30, 2017

README.md

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.

You can’t perform that action at this time.