diff --git a/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/Readme.md b/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/Readme.md index 8443a2d..dd0af8c 100644 --- a/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/Readme.md +++ b/laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/Readme.md @@ -1,11 +1,15 @@ -# Custom Thymeleaf Dialect for GOV.UK Buttons +# Custom Thymeleaf Dialect ## Introduction -This project provides a custom Thymeleaf dialect to simplify the creation and customization of GOV.UK-styled buttons. Using this custom dialect, developers can generate button HTML elements with the GOV.UK Design System's standards, reducing repetitive boilerplate code and ensuring consistency. + +This project provides a custom Thymeleaf dialect to simplify the creation and customization of GOV.UK-styled buttons. +Using this custom dialect, developers can generate button HTML elements with the GOV.UK Design System's standards, +reducing repetitive boilerplate code and ensuring consistency. --- ## Installation + To use this custom Thymeleaf dialect, add the following dependency to your `build.gradle` file: ```groovy @@ -15,19 +19,28 @@ implementation 'uk.gov.laa.ccms.springboot:laa-ccms-spring-boot-starter-govuk-di --- ## How to use a Custom Dialect? + ### 1. **Simplified Syntax** -Writing GOV.UK-styled buttons often involves verbose and repetitive HTML, especially when handling attributes like `class`, `id`, `data-*`, or conditional rendering logic. With this custom dialect, you can declare buttons using clean, concise tags like: + +Writing GOV.UK-styled buttons often involves verbose and repetitive HTML, especially when handling attributes like +`class`, `id`, `data-*`, or conditional rendering logic. With this custom dialect, you can declare buttons using clean, +concise tags like: ```html + ``` -This simplifies templates and improves readability, making it easier for developers to focus on application logic rather than markup details. +This simplifies templates and improves readability, making it easier for developers to focus on application logic rather +than markup details. ### 2. **Dynamic Attribute Processing** -This dialect dynamically processes attributes like `th:*`, resolving them using Thymeleaf's expression language. For example: + +This dialect dynamically processes attributes like `th:*`, resolving them using Thymeleaf's expression language. For +example: ```html + ``` @@ -36,8 +49,11 @@ This ensures that all attributes, including conditional and computed values, are --- ## Features -- **Anchor and Button Elements:** Supports both `` and `