From 032e0ca13ab8ebf99b5169f6f733db4184cdde6c Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Thu, 20 Feb 2014 19:28:39 +0200 Subject: a lot of refactoring: tag action is now handled by home view and uses sorting and pagination. Some small view enhacenments. Fix of #476, #461 for baggy and other themes --- themes/baggy/_menu.twig | 5 +++- themes/baggy/css/main.css | 5 ++-- themes/baggy/edit-tags.twig | 7 +++-- themes/baggy/home.twig | 5 +++- themes/baggy/tag.twig | 34 ---------------------- themes/courgette/home.twig | 4 +-- themes/default/edit-tags.twig | 15 ++++++++-- themes/default/home.twig | 8 +++-- themes/default/tag.twig | 33 --------------------- themes/default/view.twig | 11 ++++--- themes/solarized-dark/css/style-solarized-dark.css | 12 ++++++++ themes/solarized/css/style-solarized.css | 12 ++++++++ 12 files changed, 67 insertions(+), 84 deletions(-) delete mode 100644 themes/baggy/tag.twig delete mode 100644 themes/default/tag.twig (limited to 'themes') diff --git a/themes/baggy/_menu.twig b/themes/baggy/_menu.twig index 3e7a2cbf..e9cd9d4a 100644 --- a/themes/baggy/_menu.twig +++ b/themes/baggy/_menu.twig @@ -4,6 +4,9 @@
  • {% trans "favorites" %}
  • {% trans "archive" %}
  • {% trans "tags" %}
  • +
  • {% trans "save a link" %}
  • {% trans "config" %}
  • {% trans "logout" %}
  • - \ No newline at end of file + + + {% include '_pocheit-form.twig' %} diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 45211a87..3b8220d9 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -563,7 +563,8 @@ footer a { ========================================================================== */ .messages { - text-align: center; + text-align: left; + margin-top: 1em; } .messages > * { display: inline-block;} @@ -818,4 +819,4 @@ blockquote { #article_toolbar a { padding: 0.3em 0.4em 0.2em; } -} \ No newline at end of file +} diff --git a/themes/baggy/edit-tags.twig b/themes/baggy/edit-tags.twig index 9f11a2c3..9e9012ee 100644 --- a/themes/baggy/edit-tags.twig +++ b/themes/baggy/edit-tags.twig @@ -4,6 +4,9 @@ {% include '_menu.twig' %} {% endblock %} {% block content %} +
    +

    {{ entry.title|raw }} +

    {% if tags is empty %}
    no tags
    {% endif %} @@ -11,10 +14,10 @@ {% for tag in tags %}
  • {{ tag.value }}
  • {% endfor %}
    - -

    {% trans "You can enter multiple tags, separated by commas." %}

    + +

    {% trans "You can enter multiple tags, separated by commas." %}

    {% trans "return to article" %} {% endblock %} diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index 33afdbbd..4f9db063 100644 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -12,6 +12,9 @@ {% include '_menu.twig' %} {% endblock %} {% block content %} + {% if tag %} +

    {% trans "Tag" %}: {{ tag.value }}

    + {% endif %} {% if entries is empty %}

    {% trans "No articles found." %}

    {% else %} @@ -40,7 +43,7 @@

    {{ entry.content|striptags|slice(0, 300) }}...

    - + {% endfor %} {% if view == 'home' %}{% if nb_results > 1 %}{{ "Mark all the entries as read" }}{% endif %}{% endif %} diff --git a/themes/baggy/tag.twig b/themes/baggy/tag.twig deleted file mode 100644 index 141ac909..00000000 --- a/themes/baggy/tag.twig +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "layout.twig" %} -{% block title %}tag {% endblock %} -{% block menu %} -{% include '_menu.twig' %} -{% endblock %} -{% block content %} -

    {% trans "Tag" %} {{ tag.value }}

    - {% if entries is empty %} -

    {% trans "No link available here!" %}

    - {% else %} - {% block pager %} - {% if nb_results > 1 %} -
    -
    {{ nb_results }} {% trans "results" %}
    - {{ page_links | raw }} -
    - {% endif %} - {% endblock %} -
    - {% for entry in entries %} -
    -

    {{ entry.title|raw }}

    - -

    {{ entry.content|striptags|slice(0, 300) }}...

    -
    - {% endfor %} -
    - {% endif %} -{% endblock %} \ No newline at end of file diff --git a/themes/courgette/home.twig b/themes/courgette/home.twig index 1367ebe8..416cfa43 100755 --- a/themes/courgette/home.twig +++ b/themes/courgette/home.twig @@ -14,8 +14,8 @@ {% block precontent %} {% if entries|length > 1 %} {% endif %} {% endblock %} diff --git a/themes/default/edit-tags.twig b/themes/default/edit-tags.twig index 53852d39..83f04aa0 100644 --- a/themes/default/edit-tags.twig +++ b/themes/default/edit-tags.twig @@ -4,6 +4,13 @@ {% include '_menu.twig' %} {% endblock %} {% block content %} + +
    +
    +

    {{ entry.title|raw }}

    +
    +
    + {% if tags is empty %} no tags {% endif %} @@ -11,10 +18,12 @@ no tags {% for tag in tags %}
  • {{ tag.value }}
  • {% endfor %}
    - -

    {% trans "You can enter multiple tags, separated by commas." %}

    + + +

    {% trans "You can enter multiple tags, separated by commas." %}

    +
    -{% trans "return to article" %} +« {% trans "return to article" %} {% endblock %} diff --git a/themes/default/home.twig b/themes/default/home.twig index 21013ec8..165fecc6 100644 --- a/themes/default/home.twig +++ b/themes/default/home.twig @@ -14,12 +14,16 @@ {% block precontent %} {% if entries|length > 1 %} {% endif %} {% endblock %} {% block content %} + {% if tag %} +

    {% trans "Tag" %}: {{ tag.value }}

    + {% endif %} + {% if entries is empty %}

    {% trans "No articles found." %}

    {% else %} diff --git a/themes/default/tag.twig b/themes/default/tag.twig deleted file mode 100644 index 364c7cd4..00000000 --- a/themes/default/tag.twig +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "layout.twig" %} -{% block title %}tag {% endblock %} -{% block menu %} -{% include '_menu.twig' %} -{% endblock %} -{% block content %} -

    {% trans "Tag" %} {{ tag.value }}

    - {% if entries is empty %} -

    {% trans "No link available here!" %}

    - {% else %} - {% block pager %} - {% if nb_results > 1 %} -
    -
    {{ nb_results }} {% trans "results" %}
    - {{ page_links | raw }} -
    - {% endif %} - {% endblock %} - {% for entry in entries %} -
    -

    {{ entry.title|raw }}

    - -

    {{ entry.content|striptags|slice(0, 300) }}...

    -
    - {% endfor %} - {% endif %} -{% endblock %} \ No newline at end of file diff --git a/themes/default/view.twig b/themes/default/view.twig index 9858996f..916abe0d 100644 --- a/themes/default/view.twig +++ b/themes/default/view.twig @@ -20,12 +20,15 @@

    {{ entry.title|raw }}

    - + {% block tags %} + + {% endblock %}
    {{ content | raw }}
    + {{ block('tags') }} + {% endblock %} diff --git a/themes/solarized-dark/css/style-solarized-dark.css b/themes/solarized-dark/css/style-solarized-dark.css index 3b0feb2a..77a97d38 100644 --- a/themes/solarized-dark/css/style-solarized-dark.css +++ b/themes/solarized-dark/css/style-solarized-dark.css @@ -217,4 +217,16 @@ a.link span { a.bad-display span { background-image: url('../img/solarized-dark/bad-display.png'); +} + +.arrow-down { + width: 0px; + height: 0px; + border-style: solid; + border-width: 10px 10px 0 10px; + border-color: #586E75 transparent transparent transparent; + + position: absolute; + margin-top: 1.5em; + margin-left: -30px; } \ No newline at end of file diff --git a/themes/solarized/css/style-solarized.css b/themes/solarized/css/style-solarized.css index 6058d056..cf16338f 100644 --- a/themes/solarized/css/style-solarized.css +++ b/themes/solarized/css/style-solarized.css @@ -217,4 +217,16 @@ a.link span { a.bad-display span { background-image: url('../img/solarized/bad-display.png'); +} + +.arrow-down { + width: 0px; + height: 0px; + border-style: solid; + border-width: 10px 10px 0 10px; + border-color: #93A1A1 transparent transparent transparent; + + position: absolute; + margin-top: 1.5em; + margin-left: -30px; } \ No newline at end of file -- cgit v1.2.3