Merge pull request #2460 from wallabag/ui-changes

UI Changes
This commit is contained in:
Nicolas Lœuillet 2016-11-04 08:49:52 +01:00 committed by GitHub
commit 2db9142bfc
13 changed files with 232 additions and 134 deletions

View file

@ -8,3 +8,7 @@ indent_style = space
indent_size = 4 indent_size = 4
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[*.css]
indent_style = space
indent_size = 2

View file

@ -581,7 +581,6 @@ img.preview {
div.pagination ul { div.pagination ul {
text-align: right; text-align: right;
margin-bottom: 50px;
} }
.nb-results { .nb-results {

View file

@ -17,12 +17,11 @@
0 = Common 0 = Common
========================================================================== */ ========================================================================== */
@font-face { /**
font-family: icomoon; *
src: url("../fonts/IcoMoon-Free.ttf"); * Material icons
font-weight: normal; *
font-style: normal; */
}
@font-face { @font-face {
font-family: 'Material Icons'; font-family: 'Material Icons';
@ -62,6 +61,33 @@
font-feature-settings: 'liga'; font-feature-settings: 'liga';
} }
/* Rules for sizing the icon. */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
/* Rules for using icons as black on a light background. */
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
/* Rules for using icons as white on a dark background. */
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }
/**
*
* Icomoon icons
*
*/
@font-face {
font-family: icomoon;
src: url("../fonts/IcoMoon-Free.ttf");
font-weight: normal;
font-style: normal;
}
[class^="icon-"]::before, [class^="icon-"]::before,
[class*=" icon-"]::before { [class*=" icon-"]::before {
font-family: icomoon; font-family: icomoon;
@ -207,8 +233,17 @@ div.pagination ul .next.disabled {
color: #fff; color: #fff;
} }
.page-footer .footer-copyright {
min-width: 50px;
height: auto !important;
line-height: 1em !important;
}
.page-footer .footer-copyright p { .page-footer .footer-copyright p {
display: inline; text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
} }
.hidden { .hidden {
@ -397,13 +432,23 @@ main ul.row {
} }
.data .card .card-body { .data .card .card-body {
height: 22em; height: 19em;
overflow: hidden; overflow: hidden;
} }
.card .card-content .card-title { .card .card-content .card-title,
line-height: 32px; .card .card-reveal .card-title {
max-height: 64px; line-height: 22.8px;
max-height: 80px;
font-size: 19px;
font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #313131;
}
.card .card-content .activator,
.card .card-reveal .activator {
cursor: pointer;
font-family: "Material Icons";
} }
.card .card-content i.right, .card .card-content i.right,
@ -411,6 +456,18 @@ main ul.row {
margin-left: 0; margin-left: 0;
} }
.card .card-content .original {
line-height: 24px;
font-size: 15px;
}
a.original {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
}
.card .card-entry-labels { .card .card-entry-labels {
position: absolute; position: absolute;
top: 10px; top: 10px;
@ -433,7 +490,7 @@ main ul.row {
} }
.card .card-entry-labels-hidden { .card .card-entry-labels-hidden {
margin-top: 5px; margin: 2.5px auto;
} }
.card .card-entry-labels-hidden li { .card .card-entry-labels-hidden li {
@ -464,8 +521,8 @@ main ul.row {
margin-bottom: 10px; margin-bottom: 10px;
} }
.card .card-action .original { .card .card-action {
line-height: 24px; padding: 10px 5px 10px 15px;
} }
.card .card-action ul.links { .card .card-action ul.links {
@ -483,6 +540,11 @@ main ul.row {
color: #fff; color: #fff;
} }
.card .card-action .reading-time {
display: inline-flex;
vertical-align: middle;
}
.quickstart .card .card-action a, .quickstart .card .card-action a,
.quickstart .card .card-action a:hover { .quickstart .card .card-action a:hover {
color: #fff !important; color: #fff !important;
@ -499,7 +561,7 @@ main ul.row {
} }
.card .card-image { .card .card-image {
height: 14em; height: 10em;
} }
.card .card-image .preview { .card .card-image .preview {
@ -526,7 +588,8 @@ main ul.row {
} }
#article > header > h1 { #article > header > h1 {
font-size: 1.6em; font-size: 2em;
margin: 2.1rem 0 0.68rem;
} }
.reader-mode { .reader-mode {
@ -565,9 +628,21 @@ main ul.row {
z-index: 9999; z-index: 9999;
} }
#article aside .link { #article aside .tools {
color: #000;
font-size: 0.8em; font-size: 0.8em;
display: flex;
flex-flow: row wrap;
margin: 0 auto;
}
#article aside .tools li {
display: inline-flex;
vertical-align: middle;
margin: auto 10px;
}
#article aside .tools a {
color: #000;
text-decoration: none; text-decoration: none;
} }
@ -578,10 +653,11 @@ main ul.row {
#article aside .chip { #article aside .chip {
background-color: rgba(0, 151, 167, 0.85); background-color: rgba(0, 151, 167, 0.85);
color: #fff;
padding: 0 15px 0 10px; padding: 0 15px 0 10px;
margin: auto 2px;
} }
#article aside .chip a,
#article aside .chip i { #article aside .chip i {
color: #fff; color: #fff;
} }
@ -608,7 +684,6 @@ main ul.row {
} }
#article { #article {
padding: 15px;
max-width: 35em; max-width: 35em;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -652,7 +727,14 @@ main ul.row {
} }
} }
@media only screen and (min-width: 993px) and (max-width: 1180px) { @media only screen and (min-width: 1200px) and (max-width: 1650px) {
.row .col.l3 {
width: 33.33333%;
margin-left: 0;
}
}
@media only screen and (min-width: 993px) and (max-width: 1200px) {
.row .col.l1 { .row .col.l1 {
width: 25%; width: 25%;
margin-left: 0; margin-left: 0;
@ -708,6 +790,14 @@ main ul.row {
.nb-results { .nb-results {
display: none; display: none;
} }
main ul.row {
padding: 0;
}
.row .col {
padding: 0;
}
} }
/* ========================================================================== /* ==========================================================================

View file

@ -9,7 +9,17 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %}
<div class="results">
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
<i class="btn-clickable download-btn material-icons md-36">file_download</i>
<i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div>
</div>
{% for entry in entries %} {% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entry"> <div id="entry-{{ entry.id|e }}" class="entry">
@ -50,6 +60,10 @@
</div> </div>
{% endfor %} {% endfor %}
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
<!-- Export --> <!-- Export -->
<aside id="download-form"> <aside id="download-form">
{% set currentRoute = app.request.attributes.get('_route') %} {% set currentRoute = app.request.attributes.get('_route') %}
@ -75,7 +89,7 @@
<!-- Filter --> <!-- Filter -->
{% if form is not null %} {% if form is not null %}
<div id="filters" class=""> <div id="filters">
<form method="get" action="{{ path('all') }}"> <form method="get" action="{{ path('all') }}">
<h2>{{ 'entry.filters.title'|trans }}</h2> <h2>{{ 'entry.filters.title'|trans }}</h2>
<a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a> <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>

View file

@ -1,12 +0,0 @@
{% block pager %}
<div class="results">
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
<i class="btn-clickable download-btn material-icons md-36">file_download</i>
<i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div>
</div>
{% endblock %}

View file

@ -9,11 +9,19 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} <div class="results clearfix">
<div class="nb-results left">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
</div>
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div>
<br /> <br />
<ul class="row data"> <ul class="row data">
{% for entry in entries %} {% for entry in entries %}
<li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
@ -30,24 +38,19 @@
<div class="card-content"> <div class="card-content">
{% if not entry.previewPicture is null %} {% if not entry.previewPicture is null %}
<i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
{% endif %} {% endif %}
<span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|raw }}</a></span> <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>
<div class="estimatedTime grey-text"> <div class="original grey-text">
<span class="tool reading-time"> <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %} <span>{{ entry.domainName|removeWww }}</span>
{% if readingTime > 0 %} </a>
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
{% endif %}
</span>
</div> </div>
{% if entry.previewPicture is null %} {% if entry.previewPicture is null %}
<p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p> <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
<ul class="card-entry-labels-hidden"> <ul class="card-entry-labels-hidden">
{% for tag in entry.tags | slice(0, 2) %} {% for tag in entry.tags | slice(0, 2) %}
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
@ -59,16 +62,10 @@
{% if not entry.previewPicture is null %} {% if not entry.previewPicture is null %}
<div class="card-reveal"> <div class="card-reveal">
<i class="card-title grey-text text-darken-4 material-icons right">clear</i> <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
<span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> <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>
<div class="estimatedTime grey-text"> <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
<span class="tool reading-time">
{% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %}
</span>
</div>
<p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
<ul class="card-entry-labels-hidden"> <ul class="card-entry-labels-hidden">
{% for tag in entry.tags %} {% for tag in entry.tags %}
@ -79,8 +76,9 @@
{% endif %} {% endif %}
<div class="card-action"> <div class="card-action">
<span class="bold"> <span class="reading-time grey-text">
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a> <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
{{ entry.readingTime / app.user.config.readingSpeed }} min
</span> </span>
<ul class="tools right"> <ul class="tools right">
@ -96,6 +94,10 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
<!-- Export --> <!-- Export -->
<div id="export" class="side-nav fixed right-aligned"> <div id="export" class="side-nav fixed right-aligned">
{% set currentRoute = app.request.attributes.get('_route') %} {% set currentRoute = app.request.attributes.get('_route') %}

View file

@ -212,27 +212,38 @@
<h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header> </header>
<aside> <aside>
<ul class="tools">
<li>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %} {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<i class="material-icons">timer</i> <i class="material-icons">timer</i>
<span class="link">
{% if readingTime > 0 %} {% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %} {% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %} {% endif %}
</span> </li>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i><span class="link">{{ entry.createdAt|date('Y-m-d') }}</span> <li>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
{{ entry.createdAt|date('Y-m-d') }}
</li>
<li>
<i class="material-icons link">link</i>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
<i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span> {{ entry.domainName|removeWww }}
</a> </a>
<span class="tool"><i class="material-icons link">comment</i></span> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> </li>
<div id="list"> <li>
<i class="material-icons link">comment</i>
{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
</li>
<li id="list">
{% for tag in entry.tags %} {% for tag in entry.tags %}
<div class="chip"> <div class="chip">
<a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a> <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a>
</div> </div>
{% endfor %} {% endfor %}
</div> </li>
</ul>
<div class="input-field nav-panel-add-tag" style="display: none"> <div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}

View file

@ -1,10 +0,0 @@
{% block pager %}
<div class="results clearfix">
<div class="nb-results left">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
</div>
{% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% endif %}
</div>
{% endblock %}

View file

@ -127,12 +127,12 @@
<div class="footer-copyright"> <div class="footer-copyright">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col s8"> <div class="col m12 l8 hide-on-small-only">
<p> <p title="{{ display_stats() | raw | striptags }}">
{{ display_stats() }} {{ display_stats() }}
</p> </p>
</div> </div>
<div class="col s4"> <div class="col s12 l4">
<p> <p>
{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a>
<a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a> <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long