]> cat aescling's git repositories - mastodon.git/commitdiff
Fix NavigationBar styling
authorThibaut Girka <thib@sitedethib.com>
Wed, 19 Jun 2019 13:41:17 +0000 (15:41 +0200)
committerThibG <thib@sitedethib.com>
Thu, 20 Jun 2019 17:19:46 +0000 (19:19 +0200)
app/javascript/flavours/glitch/features/compose/components/navigation_bar.js
app/javascript/flavours/glitch/styles/components/drawer.scss

index 3148434f191e810804ea840d251d8006b17bd2de..f6bfbdd1e0802f40fd8f0c1c2185efe39f41dfce 100644 (file)
@@ -20,16 +20,18 @@ export default class NavigationBar extends ImmutablePureComponent {
           <Avatar account={this.props.account} size={48} />
         </Permalink>
 
-        <Permalink className='acct' href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
-          <strong>@{this.props.account.get('acct')}</strong>
-        </Permalink>
+        <div className='navigation-bar__profile'>
+          <Permalink className='acct' href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
+            <strong>@{this.props.account.get('acct')}</strong>
+          </Permalink>
 
-        { profileLink !== undefined && (
-          <a
-            className='edit'
-            href={ profileLink }
-          ><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
-        )}
+          { profileLink !== undefined && (
+            <a
+              className='edit'
+              href={ profileLink }
+            ><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
+          )}
+        </div>
       </div>
     );
   };
index f054ddbc065de2a66608e241d332943dc4d8ee27..0e50482f669297df35bc0fbffeeb00fdafa9f32f 100644 (file)
 .drawer--account {
   padding: 10px;
   color: $darker-text-color;
+  display: flex;
+  align-items: center;
 
-  & > a {
+  a {
     color: inherit;
     text-decoration: none;
   }
 
-  & > .avatar {
-    float: left;
-    margin-right: 10px;
-  }
-
-  & > .acct {
+  .acct {
     display: block;
     color: $secondary-text-color;
     font-weight: 500;
   }
 }
 
+.navigation-bar__profile {
+  flex: 1 1 auto;
+  margin-left: 8px;
+  overflow: hidden;
+}
+
 .drawer--results {
   background: $ui-base-color;
   overflow-x: hidden;