Merge pull request #3525 from Simounet/fix/empty-card-title-link

Fix empty card title link
This commit is contained in:
Nicolas Lœuillet 2017-12-26 16:00:58 +01:00 committed by GitHub
commit 3473e600b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 58 additions and 85 deletions

View file

@ -25,7 +25,6 @@ main {
max-height: 80px;
font-size: 19px;
font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #313131;
}
.card-stacked .card-content .card-title {
@ -251,6 +250,10 @@ a.original:not(.waves-effect) {
float: right;
max-width: 6em;
}
.tags {
display: inline-block;
}
}
#content .collection .collection-item {

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
# default_title: 'Title of the entry'
page_titles:
# unread: 'Unread entries'
# starred: 'Starred entries'

View file

@ -161,6 +161,7 @@ config:
notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>'
entry:
default_title: 'Titel des Eintrags'
page_titles:
unread: 'Ungelesene Einträge'
starred: 'Favorisierte Einträge'

View file

@ -161,6 +161,7 @@ config:
notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
default_title: 'Title of the entry'
page_titles:
unread: 'Unread entries'
starred: 'Starred entries'

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
default_title: 'Título del artículo'
page_titles:
unread: 'Artículos no leídos'
starred: 'Artículos favoritos'

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
# default_title: 'Title of the entry'
page_titles:
unread: 'مقاله‌های خوانده‌نشده'
starred: 'مقاله‌های برگزیده'

View file

@ -161,6 +161,7 @@ config:
notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>"
entry:
default_title: "Titre de larticle"
page_titles:
unread: "Articles non lus"
starred: "Articles favoris"

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
default_title: "Titolo del contenuto"
page_titles:
unread: 'Contenuti non letti'
starred: 'Contenuti preferiti'

View file

@ -161,6 +161,7 @@ config:
notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example:<code>title notmatches "football"</code>'
entry:
default_title: "Títol de l'article"
page_titles:
unread: 'Articles pas legits'
starred: 'Articles favorits'

View file

@ -161,6 +161,7 @@ config:
notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>'
entry:
default_title: 'Tytuł wpisu'
page_titles:
unread: 'Nieprzeczytane wpisy'
starred: 'Wpisy oznaczone gwiazdką'

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
default_title: 'Título da entrada'
page_titles:
unread: 'Entradas não lidas'
starred: 'Entradas destacadas'

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
# default_title: 'Title of the entry'
page_titles:
# unread: 'Unread entries'
# starred: 'Starred entries'

View file

@ -156,6 +156,7 @@ config:
matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>'
entry:
default_title: 'Название записи'
page_titles:
unread: 'Непрочитанные записи'
starred: 'Помеченные записи'

View file

@ -161,6 +161,7 @@ config:
notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>'
entry:
default_title: 'หัวข้อรายการ'
page_titles:
unread: 'รายการที่ไม่ได้อ่าน'
starred: 'รายการที่แสดง'

View file

@ -161,6 +161,7 @@ config:
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
entry:
default_title: 'Makalenin başlığı'
page_titles:
# unread: 'Unread entries'
# starred: 'Starred entries'

View file

@ -38,7 +38,7 @@
{% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}">
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title|e|raw }}</a></h2>
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }}</a></h2>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<div class="estimatedTime">

View file

@ -1,11 +1,11 @@
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block title %}{{ entry.title|e|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block content %}
<div id="article">
<header class="mbm">
<h1>{{ entry.title|e|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
<h1>{{ entry.title|e|raw |default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header>
<div id="article_toolbar">

View file

@ -0,0 +1,15 @@
<div class="card-content">
{% if withPreview is defined %}
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
{% endif %}
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}" class="card-title dot-ellipsis dot-resize-update">
{{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }}
</a>
<div class="{{ subClass|default('original grey-text') }}">
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a>
{% if withTags is defined %}
{% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'listClass': ' hide-on-med-and-down'} only %}
{% endif %}
</div>
</div>

View file

@ -10,20 +10,7 @@
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
</div>
<div class="card-content">
<span class="card-title dot-ellipsis dot-resize-update">
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}">
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
</a>
</span>
<div class="original grey-text">
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
<span>{{ entry.domainName|removeWww }}</span>
</a>
</div>
</div>
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
</div>
{% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}

View file

@ -6,24 +6,7 @@
</a>
{% endif %}
</div>
<div class="card-content">
<span class="card-title dot-ellipsis dot-resize-update">
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
{{ entry.title| striptags | truncate(120, true, '…') | raw }}
</a>
</span>
<div class="metadata">
<a href="{{ entry.url|e }}" class="grey-text domain" target="_blank" title="{{ entry.domainName|removeWww }}">
<span>{{ entry.domainName|removeWww }}</span>
</a>
{% for tag in entry.tags | slice(0, 3) %}
<span class="chip hide-on-med-and-down">
<a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
</span>
{% endfor %}
</div>
</div>
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}
<ul class="tools-list hide-on-small-only">
<li>
<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 %}unarchive{% endif %}</i></a>

View file

@ -1,25 +1,6 @@
<div class="card">
<div class="card-body">
<div class="card-content">
<span class="card-title dot-ellipsis dot-resize-update">
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
</a>
</span>
<div class="original grey-text">
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
<span>{{ entry.domainName|removeWww }}</span>
</a>
</div>
<p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
<ul class="card-entry-labels-hidden">
{% for tag in entry.tags | slice(0, 2) %}
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %}
</ul>
</div>
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
</div>
{% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}

View file

@ -10,22 +10,7 @@
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
</div>
<div class="card-content">
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
<span class="card-title dot-ellipsis dot-resize-update">
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
</a>
</span>
<div class="original grey-text">
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
<span>{{ entry.domainName|removeWww }}</span>
</a>
</div>
</div>
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %}
</div>
<div class="card-reveal">

View file

@ -0,0 +1,14 @@
{% if tags is iterable and tags is not empty %}
<ul class="tags{{ listClass|default("")}}">
{% for tag in tags %}
<li class="chip">
<a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
{% if withRemove %}
<a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')">
<i class="material-icons vertical-align-middle">delete</i>
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}

View file

@ -1,6 +1,6 @@
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ entry.title|striptags|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block title %}{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block body_class %}entry{% endblock %}
@ -223,7 +223,7 @@
{% block content %}
<div id="article">
<header class="mbm">
<h1>{{ entry.title|striptags|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
<h1>{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header>
<aside>
<div class="tools">
@ -268,16 +268,7 @@
</li>
{% endif %}
</ul>
<ul class="tags">
{% for tag in entry.tags %}
<li class="chip">
<a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
<a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')">
<i class="material-icons vertical-align-middle">delete</i>
</a>
</li>
{% endfor %}
</ul>
{% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %}
</div>
<div class="input-field nav-panel-add-tag" style="display: none">

File diff suppressed because one or more lines are too long