]> git.ipfire.org Git - ipfire.org.git/commitdiff
footer: Show profile information in footer
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 24 Jun 2023 15:43:26 +0000 (15:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 24 Jun 2023 15:43:26 +0000 (15:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/base.html

index 4d9eb4e47120c619d5e52eb6514d3960afc4e301..c0d2f1dfedd8ff1c337e47a59a41684bf9cefd22 100644 (file)
                                <div class="container">
                                        <div class="columns">
                                                <div class="column is-two-fifths">
-                                                       <p class="is-size-4">
-                                                               <span class="has-text-weight-bold">IPFire</span><span class="has-text-primary has-text-weight-bold">_</span>People
-                                                       </p>
-
-                                                       <p>
-                                                               Join the community and sign up for our newsletter
-                                                       </p>
-
-                                                       <a class="button is-primary is-outlined is-medium
-                                                                       has-text-black has-text-weight-bold" href="/register">
-                                                               JOIN NOW
-                                                       </a>
+                                                       {# Show some profile information for users who are logged in #}
+                                                       {% if current_user %}
+                                                               <h4 class="title is-4 mb-0">{{ _("Hello, %s!") % current_user }}</h4>
+
+                                                               <div class="level">
+                                                                       <div class="level-left">
+                                                                               <a class="level-item" href="/users/{{ current_user.uid }}">
+                                                                                       {{ _("Profile") }}
+                                                                               </a>
+
+                                                                               <a class="level-item" href="/logout">
+                                                                                       {{ _("Logout") }}
+                                                                               </a>
+                                                                       </div>
+                                                               </div>
+
+                                                       {# Otherwise encourage people to join #}
+                                                       {% else %}
+                                                               <p class="is-size-4">
+                                                                       <span class="has-text-weight-bold">IPFire</span><span class="has-text-primary has-text-weight-bold">_</span>People
+                                                               </p>
+
+                                                               <p>
+                                                                       Join the community and sign up for our newsletter
+                                                               </p>
+
+                                                               <a class="button is-primary is-outlined is-medium
+                                                                               has-text-black has-text-weight-bold" href="/register">
+                                                                       JOIN NOW
+                                                               </a>
+                                                       {% end %}
                                                </div>
 
                                                <div class="column is-one-fifth">