]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add previewPicture on baggy theme 1417/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 13 Sep 2015 08:03:53 +0000 (10:03 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 13 Sep 2015 08:03:53 +0000 (10:03 +0200)
src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/css/main.css

index 3f5cf46090e7a3739b70d912df9fb737424252cc..0d295431ec2c2268a7436b9042cf6be51fbe4f1c 100644 (file)
                     <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li>
                     <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName }}</span></a></li>
                 </ul>
-                <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+                {% if entry.previewPicture is null %}
+                    <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+                {% else %}
+                    <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />
+                {% endif %}
             </div>
         {% endfor %}
     {% endif %}
index 18cfd59d2d036e586980fe14e8439dd161fe8acf..f58d0399bbe3a70a63e395e9f5c9f8f51635b3c4 100644 (file)
@@ -31,6 +31,9 @@
             {% for tag in entry.tags %}<span class="mdi-action-label-outline">{{ tag.label }}</span>{% endfor %}
             {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
         </aside>
+        {% if entry.previewPicture is not null %}
+            <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
+        {% endif %}
         <article>
             {{ entry.content | raw }}
         </article>
index 6090face60914b1592bbb7b4c03b1149f2904a34..72a7b20542ecb207f38afc7128071a771dc7deff 100755 (executable)
@@ -448,6 +448,10 @@ footer a {
 }
 */
 
+img.preview {
+    max-width: 100%;
+}
+
 .entry p {
   color: #666;
   font-size: 0.9em;