Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 82fc4fb

Browse files
Merge pull request #2 from JonasDoebertin/develop
Merge 1.0.0
2 parents 5f4daa3 + 987e254 commit 82fc4fb

File tree

5 files changed

+47
-16
lines changed

5 files changed

+47
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changelog
22

3-
## Version 1.0.0-rc.1
3+
## Version 1.0.0
44

55
* Initial public release

README.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ site/
3131
fields/
3232
rangeslider/
3333
assets/
34-
languages/
3534
partials/
3635
rangeslider.php
3736
```
@@ -45,12 +44,14 @@ $ cd your/project/root
4544
$ git submodule add https://github.com/JonasDoebertin/kirby-range-slider.git site/fields/rangeslider
4645
```
4746

48-
Updating all your Git submodules (eg. the Kirby core modules and any extensions added as submodules) to their latest version, all you need to do is to run these two Git commands.
47+
Updating all your Git submodules (eg. the Kirby core modules and any extensions added as submodules) to their latest version, all you need to do is to run these few Git commands:
4948

5049
```bash
5150
$ cd your/project/root
52-
$ git submodule foreach --recursive git checkout master
53-
$ git submodule foreach --recursive git pull
51+
$ git submodule foreach git checkout master
52+
$ git submodule foreach git pull
53+
$ git commit -a -m "Update submodules"
54+
$ git submodule update --init --recursive
5455
```
5556

5657
## Usage
@@ -62,20 +63,24 @@ Using the field in your blueprint couldn't be easier. After installing the plugi
6263
```yaml
6364
fields:
6465
title:
65-
label: Event Name
66-
type: text
66+
label: Event Name
67+
type: text
6768
duration:
68-
label: Event Duration
69-
type: rangeslider
70-
min: 1
71-
max: 7
72-
step: 1
69+
label: Event Duration
70+
type: rangeslider
71+
min: 1
72+
max: 7
73+
step: 1
7374
postfix: " days"
7475

7576
```
7677

7778
*Fields related part of the blueprint for the setup shown in the screenshot.*
7879

80+
### Within your templates
81+
82+
You may use any `rangeslider` field you added to your blueprints just like any other standard `number` field.
83+
7984
## Options
8085

8186
### min *(required)*
@@ -106,7 +111,7 @@ fields:
106111
107112
### step
108113
109-
Set the minimal difference between two slider values. Examples: If set to `1` the user may select integral numbers (1, 2, 3, …). If set to `0.5` the user will be able to select integral numbers or numbers end with `.5`. If a user should be able to pick a price of a product, you'd want to set this to `0.01` so the user can select numbers with to decimals.
114+
Set the minimal difference between two slider values. Examples: If set to `1` the user may select integral numbers (1, 2, 3, …). If set to `0.5` the user will be able to select integral numbers or numbers end with `.5`. If a user should be able to pick a price of a product, you'd want to set this to `0.01` so the user can select numbers with to decimals. The `step` options defaults to `1`.
110115

111116
```yaml
112117
fields:
@@ -120,4 +125,30 @@ fields:
120125

121126
### prefix
122127

128+
Setting a `prefix` allows you to make the range slider display even more user-friendly. The prefix will be prepended to the sliders number display (even though it will not be added to the stored value). This is especially useful for adding money symbols when using the range slider to pick prices (see below). The `prefix` and `postfix` options may also be used together.
129+
130+
```yaml
131+
fields:
132+
text:
133+
label: Product Price
134+
type: rangeslider
135+
min: 1
136+
max: 99
137+
step: 0.01
138+
prefix: "$ "
139+
```
140+
123141
### postfix
142+
143+
As with the `prefix` option, setting a `postfix` allows you to make the range slider display more user-friendly. The postfix will be appended to the sliders number display (even though it will not be added to the stored value). This is especially useful for adding any kind of unit (durations, distances, etc.) when using the range slider to pick these (see below). The `prefix` and `postfix` options may also be used together.
144+
145+
```yaml
146+
fields:
147+
text:
148+
label: Event Duration
149+
type: rangeslider
150+
min: 1
151+
max: 7
152+
step: 1
153+
postfix: " days"
154+
```

assets/css/rangeslider.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Range Slider Field for Kirby 2
33
*
4-
* @version 1.0.0-rc.1
4+
* @version 1.0.0
55
* @author Jonas Döbertin <[email protected]>
66
* @copyright Jonas Döbertin <[email protected]>
77
* @link https://github.com/JonasDoebertin/kirby-range-slider

assets/js/rangeslider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Range Slider Field for Kirby 2
33
*
4-
* @version 1.0.0-rc.1
4+
* @version 1.0.0
55
* @author Jonas Döbertin <[email protected]>
66
* @copyright Jonas Döbertin <[email protected]>
77
* @link https://github.com/JonasDoebertin/kirby-range-slider

rangeslider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Range Slider Field for Kirby 2
44
*
5-
* @version 1.0.0-rc.1
5+
* @version 1.0.0
66
* @author Jonas Döbertin <[email protected]>
77
* @copyright Jonas Döbertin <[email protected]>
88
* @link https://github.com/JonasDoebertin/kirby-range-slider

0 commit comments

Comments
 (0)