mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-09 16:35:27 +00:00
Add annotator in baggy theme
+ Documentation about annotations
This commit is contained in:
parent
f38e03dc02
commit
7720cca532
12 changed files with 71 additions and 10 deletions
|
@ -29,6 +29,7 @@ The main documentation for this application is organized into a couple sections:
|
||||||
user/configuration
|
user/configuration
|
||||||
user/first_article
|
user/first_article
|
||||||
user/errors_during_fetching
|
user/errors_during_fetching
|
||||||
|
user/annotations
|
||||||
user/import
|
user/import
|
||||||
user/download_articles
|
user/download_articles
|
||||||
user/filters
|
user/filters
|
||||||
|
|
24
docs/en/user/annotations.rst
Normal file
24
docs/en/user/annotations.rst
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
Annotations
|
||||||
|
===========
|
||||||
|
|
||||||
|
In each article you read, you can write annotations. It's easier to understand with some pictures.
|
||||||
|
|
||||||
|
Select the part of the article that you want to comment and click on the pencil:
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_1.png
|
||||||
|
:alt: Select your text
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
Then, write your comment:
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_2.png
|
||||||
|
:alt: Write your comment
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
The text is now highlighted and you can read your comment if you move the mouse cursor over it.
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_3.png
|
||||||
|
:alt: Read your comment
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
You can create as many comments as you wish.
|
|
@ -30,6 +30,7 @@ La documentation principale de cette application est découpée en plusieurs sec
|
||||||
user/configuration
|
user/configuration
|
||||||
user/first_article
|
user/first_article
|
||||||
user/errors_during_fetching
|
user/errors_during_fetching
|
||||||
|
user/annotations
|
||||||
user/import
|
user/import
|
||||||
user/download_articles
|
user/download_articles
|
||||||
user/filters
|
user/filters
|
||||||
|
|
25
docs/fr/user/annotations.rst
Normal file
25
docs/fr/user/annotations.rst
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
Commentaires
|
||||||
|
============
|
||||||
|
|
||||||
|
Sur chaque article que vous lisez, vous pouvez écrire des commentaires. Puisqu'une image vaut mieux qu'un long discours,
|
||||||
|
voici ce que ça donne.
|
||||||
|
|
||||||
|
Sélectionnez la zone du texte que vous souhaitez commenter et cliquez sur le crayon :
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_1.png
|
||||||
|
:alt: Select your text
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
Ensuite, écrivez votre commentaire :
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_2.png
|
||||||
|
:alt: Write your comment
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
Le texte est maintenant surligné et vous pouvez lire le commentaire en le survolant avec votre souris.
|
||||||
|
|
||||||
|
.. image:: ../../img/user/annotations_3.png
|
||||||
|
:alt: Read your comment
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
Vous pouvez créer autant de commentaires que vous le souhaitez.
|
BIN
docs/img/user/annotations_1.png
Normal file
BIN
docs/img/user/annotations_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
docs/img/user/annotations_2.png
Normal file
BIN
docs/img/user/annotations_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
docs/img/user/annotations_3.png
Normal file
BIN
docs/img/user/annotations_3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -16,8 +16,5 @@ class WallabagCommentExtension extends Extension
|
||||||
{
|
{
|
||||||
$configuration = new Configuration();
|
$configuration = new Configuration();
|
||||||
$config = $this->processConfiguration($configuration, $configs);
|
$config = $this->processConfiguration($configuration, $configs);
|
||||||
|
|
||||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
|
||||||
$loader->load('services.yml');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
services:
|
|
||||||
# wallabag_comment.example:
|
|
||||||
# class: Wallabag\CommentBundle\Example
|
|
||||||
# arguments: ["@service_id", "plain_value", %parameter%]
|
|
|
@ -107,5 +107,25 @@
|
||||||
retrievePercent({{ entry.id }});
|
retrievePercent({{ entry.id }});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var app = new annotator.App();
|
||||||
|
app.include(annotator.ui.main, {
|
||||||
|
element: document.querySelector('article')
|
||||||
|
});
|
||||||
|
app.include(annotator.storage.http, {
|
||||||
|
prefix: '',
|
||||||
|
urls: {
|
||||||
|
create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
|
||||||
|
update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
|
||||||
|
destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
|
||||||
|
search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
app
|
||||||
|
.start()
|
||||||
|
.then(function () {
|
||||||
|
app.annotations.load({entry: {{ entry.id }}});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -198,9 +198,6 @@ app
|
||||||
.then(function () {
|
.then(function () {
|
||||||
app.annotations.load({entry: {{ entry.id }}});
|
app.annotations.load({entry: {{ entry.id }}});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue