Skip to content

0.5.0

Compare
Choose a tag to compare
@jcwillox jcwillox released this 15 Feb 09:11

This is a rather large release adding two of the most requested features, layouts (name & state) and templating 🎉!

Changes

Layouts

Closes #3, #28

You now have far more control over the layout of the elements in each button, and state has been broken out into its own field. The layout option is used to configure the layout. Its use is preferred over using align_icon or setting fields to false e.g. name: false.

See the layout docs for more information.

Templating

Closes #9, #21, #25, #12, #26

Templating with Jinja2 and object-based templating has been added. The name, icon, image, state and style fields can be templated. JavaScript templating is not yet supported, but I'll probably add that in the future.

See the templating docs for more information.

Breaking Changes

With the new layout feature state was broken out into its own field, this means that if you were using state_text it will just display the icon & name now. To fix this use the new layout option to show the state field e.g. add layout: icon|state to your config.

For the state and state_styles options the text property has been renamed to name, to be more consistent.

# before
style:
  text:
    color: red

# after
style:
  name:
    color: red