From 3c866be27765d2be02337371d3df58bf87da6f14 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Fri, 21 Feb 2025 03:20:01 +0300 Subject: [PATCH] small styling --- README.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 73827f5..2b78466 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This card is not to be used as a means to truly protect an instance. Someone wit [![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum] -## Minimum Home Assistant Version +## Minimum Home Assistant version Home Assistant version 0.110.0 or higher is required as of release 1.2.0 of restriction-card @@ -41,17 +41,17 @@ resources: | Name | Type | Requirement | Description | | ------------- | ------- | ------------ | ----------------------------------------------------------------------------------------------- | | type | string | **Required** | `custom:restriction-card` | -| card | map | **Required** | Card to render within `restriction-card`. | -| restrictions | map | **Optional** | Additional restrictions. See [Restrictions Options](#restrictions-options). | -| exemptions | list | **Optional** | List of exemption objects. See [Exemption Options](#exemption-options). | -| condition | map | **Optional** | Conditional object to make lock active. See [Condition Options](#condition-options). | +| card | map | **Required** | Card to render within `restriction-card` | +| restrictions | map | **Optional** | Additional restrictions. See [Restrictions Options](#restrictions-options) | +| exemptions | list | **Optional** | List of exemption objects. See [Exemption Options](#exemption-options) | +| condition | map | **Optional** | Conditional object to make lock active. See [Condition Options](#condition-options) | | row | boolean | **Optional** | Set to true to give a default `margin:left: 24px` | | duration | number | **Optional** | Duration of unlock in seconds. Default is `5` | | action | string | **Optional** | Action type to trigger the unlock. Options are `tap`, `double_tap`, or `hold`. Default is `tap` | | locked_icon | string | **Optional** | Icon to show when locked. Default is `mdi:lock-outline` | | unlocked_icon | string | **Optional** | Icon to show when unlocked instead of fading the icon away | -## Restrictions Options +## Restrictions options | Name | Type | Requirement | Description | | ------- | ---- | ------------ | ------------------------------------------------------------------------- | @@ -60,7 +60,7 @@ resources: | block | map | **Optional** | Block interaction restriction. See [Block Options](#block-options). | | hide | map | **Optional** | Hide card restriction. See [Hide Options](#hide-options).. | -## Confirm Options +## Confirm options | Name | Type | Requirement | Description | | ---------- | ------ | ------------ | ------------------------------------------------------------------------------------------- | @@ -68,7 +68,7 @@ resources: | exemptions | list | **Optional** | List of exemption objects. See [Exemption Options](#exemption-options). | | condition | map | **Optional** | Conditional object to make restriction active. See [Condition Options](#condition-options). | -## Pin Options +## Pin options | Name | Type | Requirement | Description | | ----------------- | ------ | ------------ | ------------------------------------------------------------------------------------------------------------------------- | @@ -80,7 +80,7 @@ resources: | max_retries | number | **Optional** | Number of consecutive invalid retries allowed before blocking for the `max_retries_delay` seconds. Default is `unlimited` | | max_retries_delay | number | **Optional** | Number of seconds to block attempts to unlock after the `max_retries` has been reached | -## Block Options +## Block options | Name | Type | Requirement | Description | | ---------- | ------ | ------------ | ------------------------------------------------------------------------------------------- | @@ -88,20 +88,20 @@ resources: | exemptions | list | **Optional** | List of exemption objects. See [Exemption Options](#exemption-options). | | condition | map | **Optional** | Conditional object to make restriction active. See [Condition Options](#condition-options). | -## Hide Options +## Hide options | Name | Type | Requirement | Description | | ---------- | ---- | ------------ | ------------------------------------------------------------------------------------------- | | exemptions | list | **Optional** | List of exemption objects. See [Exemption Options](#exemption-options). | | condition | map | **Optional** | Conditional object to make restriction active. See [Condition Options](#condition-options). | -## Exemption Options +## Exemption options | Name | Type | Requirement | Description | | ---- | ------ | ------------ | ---------------------------------------------------------- | | user | string | **Required** | User id to exempt. This is found in the user profile `ID`. | -## Condition Options +## Condition options | Name | Type | Requirement | Description | | --------- | ------ | ------------ | --------------------------------------------------------------------------------------------------- | @@ -110,7 +110,7 @@ resources: | attribute | string | **Optional** | Attribute of the entity to use instead of the state. | | operator | string | **Optional** | Operator to use in the comparison. Can be `==`,`<=`,`<`,`>=`,`>`,`!=`, or `regex`. Default is `==`. | -## Theme Variables +## Theme variables The following variables are available and can be set in your theme to change the appearance of the lock. Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically anything supported by CSS. @@ -135,10 +135,9 @@ Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically any Note: it is not recommended to set negative values for `*-lock-*-margin-*` variables to prevent a "lock" icon to be clipped. +## Example configurations -## Example Configurations - -Simple Lock example +Simple lock example  @@ -275,7 +274,7 @@ Notes: --- -Special Consideration for Input Selects: +Special consideration for `input_select` entities: If you find that the restriction card is blocking something you don't want blocked like an input select, try adjusting the z-index using mod-card ```