diff options
author | Tomasz Mieszkowski <tomasz.mieszkowski@ext.allegro.pl> | 2014-08-28 08:54:15 +0200 |
---|---|---|
committer | Tomasz Mieszkowski <tomasz.mieszkowski@ext.allegro.pl> | 2014-08-28 08:54:15 +0200 |
commit | 60c073a6ed451cf91d9877a3305407756b9ffdce (patch) | |
tree | 955542ec282745e31d78d1b2b9515d8cebe67e78 /doc/tile__text.rst | |
download | tipboard-60c073a6ed451cf91d9877a3305407756b9ffdce.tar.gz tipboard-60c073a6ed451cf91d9877a3305407756b9ffdce.tar.bz2 tipboard-60c073a6ed451cf91d9877a3305407756b9ffdce.zip |
Tipboard got open-sourced!1.4.0
Diffstat (limited to 'doc/tile__text.rst')
-rw-r--r-- | doc/tile__text.rst | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/tile__text.rst b/doc/tile__text.rst new file mode 100644 index 0000000..e9318a7 --- /dev/null +++ b/doc/tile__text.rst @@ -0,0 +1,61 @@ +======== +``text`` +======== + +.. image:: img/smaller/text.png + +**Description** + +Simple text-tile designated to display... (surprise!) text. + +**Content** + +:: + + data = {"text": "<text_content>"} + +where: + +.. describe:: text_content + + A textual content to be displayed. + +Example:: + + curl http://localhot:7272/api/v0.1/<api_key>/push + -X POST + -d "tile=text" + -d "key=mytext" + -d 'data={"text": "Hello world!"}' + +**Configuration** + +:: + + value = {"<config_element>": "<config_value>"} + +where: + +.. describe:: config_element + + One of three attributes of displayed text (i.e. ``font_size``, ``color`` and + ``font_weight``). + +.. describe:: config_value + + Value matching above. + +Example:: + + curl http://localhost:7272/api/v0.1/<api_key>/tileconfig/mytext + -X POST + -d 'value={"font_color": "#00FF00"}' + +.. note:: + + Parameter ``font_size`` can be specified in two ways - as a number (e.g. + ``"font_size": 10``) or as a string (e.g. ``"font_size": "10px"``) - both of + them have the same effect. + + Keys ``font_size``, ``color``, ``font_weight`` with empty ``config_value`` + are ignored (in such case, they will inherit those values from parent CSS). |