aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php2
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php8
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig14
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig28
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig26
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig47
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig75
19 files changed, 144 insertions, 80 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 91cdcae5..46fb9503 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -38,6 +38,8 @@ class ConfigController extends Controller
38 $em->persist($config); 38 $em->persist($config);
39 $em->flush(); 39 $em->flush();
40 40
41 $request->getSession()->set('_locale', $config->getLanguage());
42
41 // switch active theme 43 // switch active theme
42 $activeTheme = $this->get('liip_theme.active_theme'); 44 $activeTheme = $this->get('liip_theme.active_theme');
43 $activeTheme->setName($config->getTheme()); 45 $activeTheme->setName($config->getTheme());
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 8019df42..bbd5db5d 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -8,6 +8,7 @@ use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Entity\Tag; 8use Wallabag\CoreBundle\Entity\Tag;
9use Wallabag\CoreBundle\Tools\Utils; 9use Wallabag\CoreBundle\Tools\Utils;
10use Wallabag\CoreBundle\Repository\TagRepository; 10use Wallabag\CoreBundle\Repository\TagRepository;
11use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser;
11 12
12/** 13/**
13 * This kind of proxy class take care of getting the content from an url 14 * This kind of proxy class take care of getting the content from an url
@@ -19,6 +20,7 @@ class ContentProxy
19 protected $tagger; 20 protected $tagger;
20 protected $logger; 21 protected $logger;
21 protected $tagRepository; 22 protected $tagRepository;
23 protected $mimeGuesser;
22 24
23 public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Logger $logger) 25 public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Logger $logger)
24 { 26 {
@@ -26,6 +28,7 @@ class ContentProxy
26 $this->tagger = $tagger; 28 $this->tagger = $tagger;
27 $this->logger = $logger; 29 $this->logger = $logger;
28 $this->tagRepository = $tagRepository; 30 $this->tagRepository = $tagRepository;
31 $this->mimeGuesser = new MimeTypeExtensionGuesser();
29 } 32 }
30 33
31 /** 34 /**
@@ -79,6 +82,11 @@ class ContentProxy
79 $entry->setPreviewPicture($content['open_graph']['og_image']); 82 $entry->setPreviewPicture($content['open_graph']['og_image']);
80 } 83 }
81 84
85 // if content is an image define as a preview too
86 if (in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
87 $entry->setPreviewPicture($content['url']);
88 }
89
82 try { 90 try {
83 $this->tagger->tag($entry); 91 $this->tagger->tag($entry);
84 } catch (\Exception $e) { 92 } catch (\Exception $e) {
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index b73aff4a..1077e9d1 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Opsætning gemt. Visse ændringer vil først fremgå ved næste login.' 454 config_saved: 'Opsætning gemt.'
455 password_updated: 'Adgangskode opdateret' 455 password_updated: 'Adgangskode opdateret'
456 # password_not_updated_demo: "In demonstration mode, you can't change password for this user." 456 # password_not_updated_demo: "In demonstration mode, you can't change password for this user."
457 user_updated: 'Oplysninger opdateret' 457 user_updated: 'Oplysninger opdateret'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 5e8bb0e9..843102f4 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Konfiguration gespeichert. Einige Einstellungen werden erst nach einer erneuten Anmeldung übernommen.' 454 config_saved: 'Konfiguration gespeichert.'
455 password_updated: 'Kennwort aktualisiert' 455 password_updated: 'Kennwort aktualisiert'
456 password_not_updated_demo: "Im Testmodus kannst du das Kennwort nicht ändern." 456 password_not_updated_demo: "Im Testmodus kannst du das Kennwort nicht ändern."
457 user_updated: 'Information aktualisiert' 457 user_updated: 'Information aktualisiert'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index fe0876e7..3cee6468 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Config saved. Some parameters will be considered after disconnection.' 454 config_saved: 'Config saved.'
455 password_updated: 'Password updated' 455 password_updated: 'Password updated'
456 password_not_updated_demo: "In demonstration mode, you can't change password for this user." 456 password_not_updated_demo: "In demonstration mode, you can't change password for this user."
457 user_updated: 'Information updated' 457 user_updated: 'Information updated'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index b24bda89..480eacc4 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Configuración guardada. Algunos parámetros serán recargados cuando se vuelva a conectar.' 454 config_saved: 'Configuración guardada.'
455 password_updated: 'Contraseña actualizada' 455 password_updated: 'Contraseña actualizada'
456 password_not_updated_demo: "En modo demo, no puede cambiar la contraseña del usuario." 456 password_not_updated_demo: "En modo demo, no puede cambiar la contraseña del usuario."
457 user_updated: 'Su información personal ha sido actualizada' 457 user_updated: 'Su información personal ha sido actualizada'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index a957b9a7..619b596a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -450,7 +450,7 @@ error:
450flashes: 450flashes:
451 config: 451 config:
452 notice: 452 notice:
453 config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال می‌شود.' 453 config_saved: 'پیکربندی ذخیره شد.'
454 password_updated: 'رمز به‌روز شد' 454 password_updated: 'رمز به‌روز شد'
455 password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید." 455 password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید."
456 user_updated: 'اطلاعات به‌روز شد' 456 user_updated: 'اطلاعات به‌روز شد'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 3af5cc04..6871bbcf 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: "Les paramètres ont bien été mis à jour. Certains seront pris en compte après déconnexion." 454 config_saved: "Les paramètres ont bien été mis à jour."
455 password_updated: "Votre mot de passe a bien été mis à jour" 455 password_updated: "Votre mot de passe a bien été mis à jour"
456 password_not_updated_demo: "En démo, vous ne pouvez pas changer le mot de passe de cet utilisateur." 456 password_not_updated_demo: "En démo, vous ne pouvez pas changer le mot de passe de cet utilisateur."
457 user_updated: "Vos informations personnelles ont bien été mises à jour" 457 user_updated: "Vos informations personnelles ont bien été mises à jour"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 894eab24..eecd7882 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Configurazione salvata. Alcuni parametri verranno utilizzati dopo il logout/login.' 454 config_saved: 'Configurazione salvata.'
455 password_updated: 'Password aggiornata' 455 password_updated: 'Password aggiornata'
456 password_not_updated_demo: "In modalità demo, non puoi cambiare la password dell'utente." 456 password_not_updated_demo: "In modalità demo, non puoi cambiare la password dell'utente."
457 user_updated: 'Informazioni aggiornate' 457 user_updated: 'Informazioni aggiornate'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index efe46d9e..7fa31bce 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Los paramètres son ben estats meses a jorn. Certans seràn aplicats aprèp desconnexion.' 454 config_saved: 'Los paramètres son ben estats meses a jorn.'
455 password_updated: 'Vòstre senhal es ben estat mes a jorn' 455 password_updated: 'Vòstre senhal es ben estat mes a jorn'
456 password_not_updated_demo: "En demostration, podètz pas cambiar lo senhal d'aqueste utilizaire." 456 password_not_updated_demo: "En demostration, podètz pas cambiar lo senhal d'aqueste utilizaire."
457 user_updated: 'Vòstres informacions personnelas son ben estadas mesas a jorn' 457 user_updated: 'Vòstres informacions personnelas son ben estadas mesas a jorn'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index ca845e57..1b00fc6d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Konfiguracja zapisana. Niektóre parametry zostaną uznane po rozłączeniu' 454 config_saved: 'Konfiguracja zapisana.'
455 password_updated: 'Hasło zaktualizowane' 455 password_updated: 'Hasło zaktualizowane'
456 password_not_updated_demo: "In demonstration mode, you can't change password for this user." 456 password_not_updated_demo: "In demonstration mode, you can't change password for this user."
457 user_updated: 'Informacje zaktualizowane' 457 user_updated: 'Informacje zaktualizowane'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index d75f8ce8..54316161 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -448,7 +448,7 @@ user:
448flashes: 448flashes:
449 config: 449 config:
450 notice: 450 notice:
451 config_saved: 'Configiração salva. Alguns parâmetros podem ser considerados depois da desconexão.' 451 config_saved: 'Configiração salva.'
452 password_updated: 'Senha atualizada' 452 password_updated: 'Senha atualizada'
453 password_not_updated_demo: 'Em modo de demonstração, você não pode alterar a senha deste usuário.' 453 password_not_updated_demo: 'Em modo de demonstração, você não pode alterar a senha deste usuário.'
454 user_updated: 'Informação atualizada' 454 user_updated: 'Informação atualizada'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index f9559401..65cedfb2 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -451,7 +451,7 @@ error:
451flashes: 451flashes:
452 config: 452 config:
453 notice: 453 notice:
454 config_saved: 'Configurație salvată. Unii parametrii vor fi considerați după deconectare.' 454 config_saved: 'Configurație salvată.'
455 password_updated: 'Parolă actualizată' 455 password_updated: 'Parolă actualizată'
456 password_not_updated_demo: "In demonstration mode, you can't change password for this user." 456 password_not_updated_demo: "In demonstration mode, you can't change password for this user."
457 user_updated: 'Informație actualizată' 457 user_updated: 'Informație actualizată'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index da29456a..73fb6fce 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -450,7 +450,7 @@ error:
450flashes: 450flashes:
451 config: 451 config:
452 notice: 452 notice:
453 config_saved: 'Yapılandırma ayarları kaydedildi. Bazı yapılandırmalar tekrar giriş yaptığınızda aktif olacaktır.' 453 config_saved: 'Yapılandırma ayarları kaydedildi.'
454 password_updated: 'Şifre güncellendi' 454 password_updated: 'Şifre güncellendi'
455 password_not_updated_demo: "In demonstration mode, you can't change password for this user." 455 password_not_updated_demo: "In demonstration mode, you can't change password for this user."
456 user_updated: 'Bilgiler güncellendi' 456 user_updated: 'Bilgiler güncellendi'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
new file mode 100644
index 00000000..9f696d06
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
@@ -0,0 +1,14 @@
1<div class="card-action">
2 <span class="reading-time grey-text">
3 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
4 {{ entry.readingTime / app.user.config.readingSpeed|round }} min
5 </span>
6
7 <ul class="tools right">
8 <li>
9 <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
10 <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
11 <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
12 </li>
13 </ul>
14</div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig
new file mode 100644
index 00000000..0fdd5996
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig
@@ -0,0 +1,28 @@
1<div class="card">
2 <div class="card-body">
3 <div class="card-fullimage">
4 <ul class="card-entry-labels">
5 {% for tag in entry.tags | slice(0, 3) %}
6 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
7 {% endfor %}
8 </ul>
9 <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
10 </div>
11
12 <div class="card-content">
13 <span class="card-title dot-ellipsis dot-resize-update">
14 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
15 {{ entry.title | raw | striptags | truncate(80, true, '…') }}
16 </a>
17 </span>
18
19 <div class="original grey-text">
20 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
21 <span>{{ entry.domainName|removeWww }}</span>
22 </a>
23 </div>
24 </div>
25 </div>
26
27 {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
28</div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig
new file mode 100644
index 00000000..19a400b4
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig
@@ -0,0 +1,26 @@
1<div class="card">
2 <div class="card-body">
3 <div class="card-content">
4 <span class="card-title dot-ellipsis dot-resize-update">
5 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
6 {{ entry.title | raw | striptags | truncate(80, true, '…') }}
7 </a>
8 </span>
9
10 <div class="original grey-text">
11 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
12 <span>{{ entry.domainName|removeWww }}</span>
13 </a>
14 </div>
15
16 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
17 <ul class="card-entry-labels-hidden">
18 {% for tag in entry.tags | slice(0, 2) %}
19 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
20 {% endfor %}
21 </ul>
22 </div>
23 </div>
24
25 {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
26</div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig
new file mode 100644
index 00000000..b0e3c06d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig
@@ -0,0 +1,47 @@
1<div class="card">
2 <div class="card-body">
3 <div class="card-image waves-effect waves-block waves-light">
4 <ul class="card-entry-labels">
5 {% for tag in entry.tags | slice(0, 3) %}
6 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
7 {% endfor %}
8 </ul>
9 <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
10 </div>
11
12 <div class="card-content">
13 <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
14
15 <span class="card-title dot-ellipsis dot-resize-update">
16 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
17 {{ entry.title| striptags | truncate(80, true, '…') | raw }}
18 </a>
19 </span>
20
21 <div class="original grey-text">
22 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
23 <span>{{ entry.domainName|removeWww }}</span>
24 </a>
25 </div>
26 </div>
27 </div>
28
29 <div class="card-reveal">
30 <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
31 <span class="card-title">
32 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
33 {{ entry.title | raw | striptags | truncate(80, true, '…') }}
34 </a>
35 </span>
36
37 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
38
39 <ul class="card-entry-labels-hidden">
40 {% for tag in entry.tags %}
41 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
42 {% endfor %}
43 </ul>
44 </div>
45
46 {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
47</div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 498234b9..c610c8d2 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -22,74 +22,13 @@
22 <ul class="row data"> 22 <ul class="row data">
23 {% for entry in entries %} 23 {% for entry in entries %}
24 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12"> 24 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
25 <div class="card"> 25 {% if entry.previewPicture is null %}
26 26 {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
27 <div class="card-body"> 27 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
28 {% if not entry.previewPicture is null %} 28 {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %}
29 <div class="card-image waves-effect waves-block waves-light"> 29 {% elseif not entry.previewPicture is null %}
30 <ul class="card-entry-labels"> 30 {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %}
31 {% for tag in entry.tags | slice(0, 3) %} 31 {% endif %}
32 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
33 {% endfor %}
34 </ul>
35 <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
36 </div>
37 {% endif %}
38
39 <div class="card-content">
40 {% if not entry.previewPicture is null %}
41 <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
42 {% endif %}
43
44 <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">{{ entry.title| striptags | truncate(80, true, '…') | raw }}</a></span>
45
46 <div class="original grey-text">
47 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
48 <span>{{ entry.domainName|removeWww }}</span>
49 </a>
50 </div>
51
52 {% if entry.previewPicture is null %}
53 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
54 <ul class="card-entry-labels-hidden">
55 {% for tag in entry.tags | slice(0, 2) %}
56 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
57 {% endfor %}
58 </ul>
59 {% endif %}
60 </div>
61 </div>
62
63 {% if not entry.previewPicture is null %}
64 <div class="card-reveal">
65 <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
66 <span class="card-title" title="{{ entry.title | raw | striptags }}"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title | raw | striptags | truncate(90, true, '…') }}</a></span>
67
68 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
69
70 <ul class="card-entry-labels-hidden">
71 {% for tag in entry.tags %}
72 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
73 {% endfor %}
74 </ul>
75 </div>
76 {% endif %}
77
78 <div class="card-action">
79 <span class="reading-time grey-text">
80 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
81 {{ entry.readingTime / app.user.config.readingSpeed|round }} min
82 </span>
83
84 <ul class="tools right">
85 <li>
86 <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
87 <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
88 <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
89 </li>
90 </ul>
91 </div>
92 </div>
93 </li> 32 </li>
94 {% endfor %} 33 {% endfor %}
95 </ul> 34 </ul>