Browse Source

Fix author name style

Peter Justin 3 years ago
parent
commit
a4b35a42b6

+ 8 - 3
flaskbb/templates/user/profile_layout.html

@@ -20,8 +20,8 @@
                 </div>
                 </div>
                 <div class="col d-flex flex-column flex-sm-row justify-content-between mb-3">
                 <div class="col d-flex flex-column flex-sm-row justify-content-between mb-3">
                     <div class="text-sm-left mb-2 mb-sm-0">
                     <div class="text-sm-left mb-2 mb-sm-0">
-                        <h4 class="pt-sm-2 pb-1 mb-0 text-nowrap">{{ user.username }}</h4>
-                        <p class="mb-0">{{ user.primary_group.name }}</p>
+                        <h4 class="pt-sm-2 pb-1 mb-0 text-nowrap author-name">{{ user.username }}</h4>
+                        <h5 class="author-title mb-0">{{ user.primary_group.name }}</h5>
                         <div class="text-muted">
                         <div class="text-muted">
                             <small>
                             <small>
                                 {%- if user|is_online %}
                                 {%- if user|is_online %}
@@ -37,7 +37,11 @@
                         </div>
                         </div>
                         <div class="mt-2 profile-actions">
                         <div class="mt-2 profile-actions">
 
 
-                            {% if current_user|can_edit_user %}
+                            {% if current_user == user %}
+                            <a class="btn btn-sm btn-primary" href="{{ url_for('user.settings')}}">
+                                <span class="fas fa-edit"></span> {% trans %}Edit{% endtrans %}
+                            </a>
+                            {% elif current_user|can_edit_user %}
                             <a class="btn btn-sm btn-primary" href="{{ url_for('management.edit_user', user_id=user.id)}}">
                             <a class="btn btn-sm btn-primary" href="{{ url_for('management.edit_user', user_id=user.id)}}">
                                 <span class="fas fa-edit"></span> {% trans %}Edit{% endtrans %}
                                 <span class="fas fa-edit"></span> {% trans %}Edit{% endtrans %}
                             </a>
                             </a>
@@ -51,6 +55,7 @@
                                     <span class="fas fa-ban"></span> {% trans %}Ban{% endtrans %}
                                     <span class="fas fa-ban"></span> {% trans %}Ban{% endtrans %}
                                 </button>
                                 </button>
                             </form>
                             </form>
+
                             {# Unban user #}
                             {# Unban user #}
                             {% elif current_user|can_ban_user and user.permissions['banned'] %}
                             {% elif current_user|can_ban_user and user.permissions['banned'] %}
                             <form class="d-inline" method="post" action="{{ url_for('management.unban_user', user_id=user.id) }}">
                             <form class="d-inline" method="post" action="{{ url_for('management.unban_user', user_id=user.id) }}">

+ 21 - 15
flaskbb/themes/aurora/src/scss/_topic.scss

@@ -53,8 +53,8 @@
 
 
         // scale larger (than the div) images to the size of the div
         // scale larger (than the div) images to the size of the div
         img {
         img {
-            max-width:100%;
-            max-height:100%;
+            max-width: 100%;
+            max-height: 100%;
         }
         }
 
 
         blockquote {
         blockquote {
@@ -112,7 +112,8 @@
                 margin-right: 1em;
                 margin-right: 1em;
             }
             }
 
 
-            .author-online, .author-offline {
+            .author-online,
+            .author-offline {
                 margin-top: 0.5em;
                 margin-top: 0.5em;
             }
             }
 
 
@@ -122,17 +123,6 @@
         }
         }
     }
     }
 
 
-    .author-name h4 {
-        float: left;
-        margin-bottom: 0;
-    }
-
-    .author-title h5 {
-        margin-top: 0;
-        font-weight: 600;
-        clear: both;
-    }
-
     .author-avatar {
     .author-avatar {
         margin: 0.5em 0;
         margin: 0.5em 0;
 
 
@@ -143,7 +133,8 @@
         }
         }
     }
     }
 
 
-    .author-online, .author-offline {
+    .author-online,
+    .author-offline {
         margin-top: 0.25em;
         margin-top: 0.25em;
         margin-left: 0.1em;
         margin-left: 0.1em;
         float: left;
         float: left;
@@ -164,3 +155,18 @@
         text-shadow: none;
         text-shadow: none;
     }
     }
 }
 }
+
+.author-name h4,
+h4.author-name {
+    float: left;
+    margin-bottom: 0;
+}
+
+.author-title h5,
+h5.author-title {
+    text-shadow: 0px 1px 0px #fff;
+    font-size: 1rem;
+    font-weight: 600;
+    margin-top: 0;
+    clear: both;
+}