]> git.agnieray.net Git - galette.git/commitdiff
Vertically center content on public pages
authorGuillaume AGNIERAY <dev@agnieray.net>
Sun, 1 Oct 2023 18:46:09 +0000 (20:46 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Thu, 5 Oct 2023 04:50:20 +0000 (06:50 +0200)
galette/templates/default/public_page.html.twig
ui/semantic/galette/globals/site.overrides

index 7c727e22a90511a91db17e86923ae49d0760bfc6..d1e154a6be7b6a9487ba12a5713c5dce493d39b8 100644 (file)
 {% if login.isLogged() %}
                 {% include "elements/navigation/navigation_aside.html.twig" %}
 {% endif %}
-                <section{% if login.isLogged() %} class="content"{% endif %}>
+                <section class="{% if login.isLogged() %}content{% else %}vertically centered{% endif %}">
 {% if not login.isLogged() %}
                     <div class="ui basic center aligned fitted segment">
-                        <img src="{{ url_for("logo") }}" width="{{ logo.getOptimalWidth() }}" height="{{ logo.getOptimalHeight() }}" alt="{{ preferences.pref_nom }}" class="icon"/>
+                        <img src="{{ url_for("logo") }}" width="{{ logo.getOptimalWidth() }}" height="{{ logo.getOptimalHeight() }}" alt="{{ preferences.pref_nom }}" class="logo"/>
                         <div class="ui large header">
                             {{ preferences.pref_nom }}
                             <div class="sub header">{% if preferences.pref_slogan %}{{ __(preferences.pref_slogan) }}{% endif %}</div>
                 </section>
             </div>
         </div>
-
-        <a href="#" id="back2top" class="ui basic icon button">
+        <a href="#" id="back2top" class="circular big ui icon button" title="{{ _T("Back to top") }}">
             <i class="arrow up icon"></i>
-            {{ _T("Back to top") }}
         </a>
         {% include "elements/scripts.html.twig" %}
         {% block javascripts %}{% endblock %}
index 166f033c56a70d8539b95cc5c6ccb38e46ba9077..ab273d05d5cbc273181a6d76614264bc18e25cb0 100644 (file)
 ---------------------------------*/
 html {
   overflow: hidden;
+
+  &.public_page {
+    section.vertically.centered {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      height: 100%;
+
+      img.logo {
+        margin-top: 1rem;
+      }
+    }
+  }
 }
 
 body.pushable:not(.loggedin) > .pusher {