Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ix5 committed Jan 27, 2024
1 parent eb59801 commit f93e2e4
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 35 deletions.
Binary file modified .doctrees/docs/reference/client-config.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
43 changes: 37 additions & 6 deletions _sources/docs/reference/client-config.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ preferably in the script tag which embeds the JS:
.. code-block:: html

<script data-isso="/prefix/"
data-isso-id="thread-id"
data-isso-css="true"
data-isso-css-url="null"
data-isso-lang="ru"
Expand Down Expand Up @@ -47,6 +46,8 @@ english translation of the ``postbox-notification`` message, you could add:
data-isso-* directives
------------------------

.. _data-isso:

data-isso
Isso usually detects the REST API automatically, but when you serve the JS
script on a different location, this may fail. Use ``data-isso`` to
Expand All @@ -56,6 +57,8 @@ data-isso

<script data-isso="/isso" src="/path/to/embed.min.js"></script>

.. _data-isso-css-url:

data-isso-css-url
Set URL from which to fetch ``isso.css``, e.g. from a CDN.
Defaults to fetching from the API endpoint.
Expand All @@ -66,6 +69,8 @@ data-isso-css-url

Default: ``"{api-endpoint}/css/isso.css"``

.. _data-isso-css:

data-isso-css
Set to ``false`` prevents Isso from automatically appending the stylesheet.

Expand All @@ -75,17 +80,20 @@ data-isso-css

Default: ``true``

.. _data-isso-lang:

data-isso-lang
Always render the Isso UI in this language, ignoring what the
user-agent says is the preferred language. The default is to
honor the user-agent's preferred language, and this can be
specified explicitly by using ``data-isso-lang=""``.

The value of this property should be a `BCP 47 language tag
<https://tools.ietf.org/html/bcp47>`_, such as "en", "ru", or "pt-BR".
<https://tools.ietf.org/html/bcp47>`_, such as ``en``, ``ru``, or
``pt-BR``.
Language tags are processed case-insensitively, and may use
underscores as separators instead of dashes (e.g. "pt_br" is treated
the same as same as "pt-BR").
underscores as separators instead of dashes (e.g. ``pt_br`` is treated the
same as same as ``pt-BR``).

You can find a list of all supported languages by browsing the
`i18n directory
Expand All @@ -94,11 +102,14 @@ data-isso-lang

Default: ``null``

.. _data-isso-default-lang:

data-isso-default-lang
Render the Isso UI in this language when the user-agent does not
specify a preferred language, or if the language it specifies is not
supported. Like ``data-isso-lang``, the value of this property should
be a BCP 47 language tag.
supported. Like :ref:`data-isso-lang`, the value of this property should
be a `BCP 47 language tag <https://tools.ietf.org/html/bcp47>`_,
such as ``en``, ``ru``, or ``pt-BR``.

If you specify both ``data-isso-default-lang`` and ``data-isso-lang``,
``data-isso-lang`` takes precedence.
Expand All @@ -107,6 +118,8 @@ data-isso-default-lang

.. versionadded:: 0.12.6

.. _data-isso-max-comments-top:

data-isso-max-comments-top
Number of top level comments to show by default. If some comments are not
shown, an "X Hidden" link is shown.
Expand All @@ -115,6 +128,8 @@ data-isso-max-comments-top

Default: ``"inf"``

.. _data-isso-max-comments-nested:

data-isso-max-comments-nested
Number of nested comments to show by default. If some comments are not
shown, an "X Hidden" link is shown.
Expand All @@ -123,23 +138,31 @@ data-isso-max-comments-nested

Default: ``5``

.. _data-isso-reveal-on-click:

data-isso-reveal-on-click
Number of comments to reveal on clicking the "X Hidden" link.

Default: ``true``

.. _data-isso-avatar:

data-isso-avatar
Enable or disable avatar generation. Ignored if gravatar is enabled on
server side, since gravatars will take precedence and disable avatar
generation.

Default: ``true``

.. _data-isso-avatar-bg:

data-isso-avatar-bg
Set avatar background color. Any valid CSS color will do.

Default: ``"#f0f0f0"``

.. _data-isso-avatar-fg:

data-isso-avatar-fg
Set avatar foreground color. Up to 8 colors are possible. The default color
scheme is based in `this color palette <http://colrd.com/palette/19308/>`_.
Expand All @@ -148,11 +171,15 @@ data-isso-avatar-fg

Default: ``"#9abf88 #5698c4 #e279a3 #9163b6 #be5168 #f19670 #e4bf80 #447c69"``

.. _data-isso-vote:

data-isso-vote
Enable or disable voting feature on the client side.

Default: ``true``

.. _data-isso-vote-levels:

data-isso-vote-levels
List of vote levels used to customize comment appearance based on score.
Provide a comma-separated values (eg. ``"0,5,10,25,100"``) or a JSON array (eg. ``"[-5,5,15]"``).
Expand All @@ -167,6 +194,8 @@ data-isso-vote-levels

Default: ``null``

.. _data-isso-page-author-hashes:

data-isso-page-author-hashes
Provide the hash (or list of hashes) of the current page's author. Any
comments made by those authors will be given the ``isso-is-page-author``
Expand Down Expand Up @@ -211,6 +240,8 @@ data-isso-page-author-hashes
.. versionadded:: 0.13


.. _data-isso-reply-notifications-default-enabled:

data-isso-reply-notifications-default-enabled
Set to ``true`` to make the reply notifications checkbox on the postbox be
checked by default. Otherwise, the user will have to manually opt-in to
Expand Down
2 changes: 1 addition & 1 deletion docs/api/_output/assets/main.bundle.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/api/_output/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<meta name="description" content="Isso API">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="assets/bootstrap.min.css?v=1705948803620" rel="stylesheet" media="screen">
<link href="assets/prism.css?v=1705948803620" rel="stylesheet" />
<link href="assets/prism-toolbar.css?v=1705948803620" rel="stylesheet" />
<link href="assets/prism-diff-highlight.css?v=1705948803620" rel="stylesheet" />
<link href="assets/main.css?v=1705948803620" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico?v=1705948803620" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png?v=1705948803620" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png?v=1705948803620" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png?v=1705948803620" rel="icon" type="image/png" sizes="16x16">
<link href="assets/bootstrap.min.css?v=1706378772505" rel="stylesheet" media="screen">
<link href="assets/prism.css?v=1706378772505" rel="stylesheet" />
<link href="assets/prism-toolbar.css?v=1706378772505" rel="stylesheet" />
<link href="assets/prism-diff-highlight.css?v=1706378772505" rel="stylesheet" />
<link href="assets/main.css?v=1706378772505" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico?v=1706378772505" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png?v=1706378772505" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png?v=1706378772505" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png?v=1706378772505" rel="icon" type="image/png" sizes="16x16">
</head>

<body class="container-fluid">
Expand Down Expand Up @@ -1042,6 +1042,6 @@ <h2>{{__ "Request Body"}}</h2>
</div>
</div>

<script src="assets/main.bundle.js?v=1705948803620"></script>
<script src="assets/main.bundle.js?v=1706378772505"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/api/assets/main.bundle.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<meta name="description" content="Isso API">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="assets/bootstrap.min.css?v=1705948803620" rel="stylesheet" media="screen">
<link href="assets/prism.css?v=1705948803620" rel="stylesheet" />
<link href="assets/prism-toolbar.css?v=1705948803620" rel="stylesheet" />
<link href="assets/prism-diff-highlight.css?v=1705948803620" rel="stylesheet" />
<link href="assets/main.css?v=1705948803620" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico?v=1705948803620" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png?v=1705948803620" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png?v=1705948803620" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png?v=1705948803620" rel="icon" type="image/png" sizes="16x16">
<link href="assets/bootstrap.min.css?v=1706378772505" rel="stylesheet" media="screen">
<link href="assets/prism.css?v=1706378772505" rel="stylesheet" />
<link href="assets/prism-toolbar.css?v=1706378772505" rel="stylesheet" />
<link href="assets/prism-diff-highlight.css?v=1706378772505" rel="stylesheet" />
<link href="assets/main.css?v=1706378772505" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico?v=1706378772505" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png?v=1706378772505" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png?v=1706378772505" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png?v=1706378772505" rel="icon" type="image/png" sizes="16x16">
</head>

<body class="container-fluid">
Expand Down Expand Up @@ -1042,6 +1042,6 @@ <h2>{{__ "Request Body"}}</h2>
</div>
</div>

<script src="assets/main.bundle.js?v=1705948803620"></script>
<script src="assets/main.bundle.js?v=1706378772505"></script>
</body>
</html>
Loading

0 comments on commit f93e2e4

Please sign in to comment.