aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/common/Entry')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig83
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig3
4 files changed, 62 insertions, 46 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig
new file mode 100644
index 00000000..6df4c160
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig
@@ -0,0 +1,11 @@
1{% if tag is defined %}
2 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
3{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
4 {% set feedRoute = currentRoute %}
5 {% if currentRoute == 'homepage' %}
6 {% set feedRoute = 'unread' %}
7 {% endif %}
8 {% set feedRoute = feedRoute ~ '_feed' %}
9
10 <a rel="alternate" type="application/atom+xml" href="{{ path(feedRoute, {'username': app.user.username, 'token': app.user.config.feedToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
11{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig
deleted file mode 100644
index eb26054c..00000000
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig
+++ /dev/null
@@ -1,11 +0,0 @@
1{% if tag is defined %}
2 <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
3{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
4 {% set rssRoute = currentRoute %}
5 {% if currentRoute == 'homepage' %}
6 {% set rssRoute = 'unread' %}
7 {% endif %}
8 {% set rssRoute = rssRoute ~ '_rss' %}
9
10 <a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
11{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
index 25d09ec3..cf6f6571 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
@@ -1,34 +1,53 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"> 2<feed xmlns="http://www.w3.org/2005/Atom">
3 <channel> 3 {% if type != 'tag' %}
4 <title>wallabag - {{ type }} feed</title> 4 <title>wallabag — {{type}} feed</title>
5 <link>{{ url_html }}</link> 5 <subtitle type="html">Atom feed for {{ type }} entries</subtitle>
6 <link rel="self" href="{{ app.request.uri }}"/> 6 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}</id>
7 {% if entries.hasPreviousPage -%} 7 <link rel="alternate" type="text/html" href="{{ url(type) }}"/>
8 <link rel="previous" href="{{ url }}?page={{ entries.previousPage }}"/> 8 {% else %}
9 {% endif -%} 9 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}:{{ tag }}</id>
10 {% if entries.hasNextPage -%} 10 <link rel="alternate" type="text/html" href="{{ url('tag_entries', {'slug': tag}) }}"/>
11 <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/> 11 <title>wallabag — {{type}} {{ tag }} feed</title>
12 {% endif -%} 12 <subtitle type="html">Atom feed for entries tagged with {{ tag }}</subtitle>
13 <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/> 13 {% endif %}
14 <pubDate>{{ "now"|date(constant('DATE_RSS')) }}</pubDate> 14 {% if entries | length > 0 %}
15 <generator>wallabag</generator> 15 <updated>{{ (entries | first).createdAt | date('c') }}</updated> {# Indicates the last time the feed was modified in a significant way. #}
16 <description>wallabag {{ type }} elements</description> 16 {% endif %}
17 17 <link rel="self" type="application/atom+xml" href="{{ app.request.uri }}"/>
18 {% for entry in entries %} 18 {% if entries.hasPreviousPage %}
19 19 <link rel="previous" href="{{ url }}/{{ entries.previousPage }}"/>
20 <item> 20 {% endif -%}
21 <title><![CDATA[{{ entry.title|e }}]]></title> 21 {% if entries.hasNextPage %}
22 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source> 22 <link rel="next" href="{{ url }}/{{ entries.nextPage }}"/>
23 <link>{{ entry.url }}</link> 23 {% endif -%}
24 <guid>{{ entry.url }}</guid> 24 <link rel="last" href="{{ url }}/{{ entries.nbPages }}"/>
25 <pubDate>{{ entry.createdAt|date(constant('DATE_RSS')) }}</pubDate> 25 <generator uri="https://wallabag.org" version="{{ version }}">wallabag</generator>
26 <description> 26 <author>
27 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]> 27 <name>{{ user }}</name>
28 </description> 28 </author>
29 </item> 29 <icon>{{ asset('favicon.ico') }}</icon>
30 30 <logo>{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}</logo>
31 {% for entry in entries %}
32 <entry>
33 <title><![CDATA[{{ entry.title|e }}]]></title>
34 <link rel="alternate" type="text/html"
35 href="{{ url('view', {'id': entry.id}) }}"/>
36 <link rel="via">{{ entry.url }}</link>
37 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:entry:{{ entry.id }}</id>
38 <updated>{{ entry.updatedAt|date('c') }}</updated>
39 <published>{{ entry.createdAt|date('c') }}</published>
40 {% for tag in entry.tags %}
41 <category term="{{ tag.slug }}" label="{{ tag.label }}" />
31 {% endfor %} 42 {% endfor %}
32 43 {% for author in entry.publishedBy %}
33 </channel> 44 <author>
34</rss> 45 <name>{{ author }}</name>
46 </author>
47 {% endfor %}
48 <content type="html" {% if entry.language %}xml:lang="{{ entry.language[:2] }}"{% endif %}>
49 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
50 </content>
51 </entry>
52 {% endfor %}
53</feed>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
index e1c7aad9..4294a60d 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
@@ -29,9 +29,6 @@
29 <h1>{{ entry.title|e|raw }}</h1> 29 <h1>{{ entry.title|e|raw }}</h1>
30 <a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a> 30 <a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a>
31 <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p> 31 <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p>
32 {% if entry.previewPicture is not null %}
33 <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" />
34 {% endif %}
35 </header> 32 </header>
36 <article class="block"> 33 <article class="block">
37 {{ entry.content | raw }} 34 {{ entry.content | raw }}