changeset 215:b2f0f81b2cd2

base: if `atom_url` is defined, a "subscribe" link is added to footer: also added `text--clickable` class to remove decorations and have a different background on hover. fix 279
author Goffi <goffi@goffi.org>
date Fri, 19 Jul 2019 21:22:40 +0200
parents 8308de7fc668
children 9997938fb512
files sat_templates/templates/default/base/base.html sat_templates/templates/default/static/styles.css
diffstat 2 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/default/base/base.html	Sun Jul 14 16:52:01 2019 +0200
+++ b/sat_templates/templates/default/base/base.html	Fri Jul 19 21:22:40 2019 +0200
@@ -72,6 +72,9 @@
     {% endblock favicon %}
 </head>
 <body>
+    {% if atom_url is defined %}
+        {{ icon_defs('feed') }}
+    {% endif %}
     {% if main_menu %}
         {% block main_menu %}
             {% call component.menu(main_menu, class="main_menu") %}
@@ -126,7 +129,19 @@
         {% block body %}
         {% endblock body %}
         </div>
-        <footer class="page__footer">{% block footer %}<span>{% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}</span>{% endblock %}</footer>
+        <footer class="page__footer">
+            {% block footer %}
+                <span>
+                    {% trans app_name=C.APP_NAME %}Powered by {{app_name}}{% endtrans %}
+                    {% if atom_url is defined %}
+                        –
+                        <a href="{{atom_url}}" class="text--clickable">
+                            {% trans %}subscribe{% endtrans %} {{ icon('feed', cls='icon--text')}}
+                        </a>
+                    {% endif %}
+                </span>
+            {% endblock %}
+        </footer>
     </main>
 </body>
 </html>
--- a/sat_templates/templates/default/static/styles.css	Sun Jul 14 16:52:01 2019 +0200
+++ b/sat_templates/templates/default/static/styles.css	Fri Jul 19 21:22:40 2019 +0200
@@ -243,6 +243,15 @@
     text-decoration: underline;
 }
 
+.text--clickable {
+    color: inherit;
+    text-decoration: None;
+}
+
+.text--clickable:hover {
+    background-color: var(--select-bg-color);
+}
+
 /** heading **/
 
 .heading__subtitle {