Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar authored Aug 3, 2020
1 parent 82c77df commit 1ac575d
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,36 @@ Swipe through Lovelace views on mobile.
# Installation:
Follow only one of these installation methods.

<details>
<summary><b>Installation and tracking with HACS:</b></summary>

1. In "store" search for lovelace-swipe-navigation and install.

2. Refresh the Lovelace page.
</details>

<details>
<summary><b>Manual installation:</b></summary>

1. Copy `swipe-navigation.js` into `/www/lovelace-swipe-navigation/`

2. Add the resource in `ui-lovelace.yaml` or by using the "Raw Config Editor".
2. Add the resource in `ui-lovelace.yaml` or in Lovelace Resources.

```yaml
resources:
# increase this version number at end of URL after each update
- url: /local/lovelace-swipe-navigation/swipe-navigation.js?v=1.0.0
type: js
type: module
```
3. Refresh the page.
</details>
<details>
<summary><b>Installation and tracking with HACS:</b></summary>
1. In "store" search for lovelace-swipe-navigation and install.
2. Configure Lovelace to load the card:
```yaml
resources:
- url: /community_plugin/lovelace-swipe-navigation/swipe-navigation.js
type: js
```
3. Refresh the Lovelace page.
</details>
# Config:
Configuration is done in the root of your lovelace configuration.
Example:
```yaml
resources:
- url: /local/lovelace-swipe-navigation/swipe-navigation.js?v=1.0.0
type: js

swipe_nav:
wrap: false
animate: swipe
Expand All @@ -78,9 +65,10 @@ views:
| ---- | ---- | ------- | -----------
| swipe_amount | number | 15 | Minimum percent of screen needed to be swiped in order to navigate.
| skip_tabs | string | | A comma seperated list of views to skip when swiping. e.g., `1,3,5`.
| skip_hidden | boolean | true | Automatically skips hidden tabs.
| wrap | boolean | true | Wrap from first tab to last tab and vice versa.
| prevent_default | boolean | false | Prevents the browsers default horizontal swipe actions.
| animate | string | no animation | Swipe animations. Can be: `swipe`, `fade`, `flip`.
| animate | string | no animation | Swipe animations. Can be: `swipe`, `fade`, `flip`. The swipe animation should be considered experimental and depending on your setup may appear buggy.

# Thank you
Big thanks to:
Expand Down

0 comments on commit 1ac575d

Please sign in to comment.