فهرست منبع

Merge pull request #1410 from sharelatex/ew-make-logout-area-clickable

make area around logout button clickable

GitOrigin-RevId: 8f080c6bedb7dce2ac39d877e8076b83241a4c12
Ersun Warncke 7 سال پیش
والد
کامیت
87b2c72449

+ 3 - 4
services/web/app/views/layout/navbar.pug

@@ -91,7 +91,6 @@ nav.navbar.navbar-default.navbar-main
 									a(href="/user/subscription") #{translate('subscription')}
 							li.divider
 							li
-								a(href="#")
-									form(method="POST" action="/logout")
-										input(name='_csrf', type='hidden', value=csrfToken)
-										button.btn-unstyled #{translate('log_out')}
+								form(method="POST" action="/logout")
+									input(name='_csrf', type='hidden', value=csrfToken)
+									button.btn-link.text-left.dropdown-menu-button #{translate('log_out')}

+ 0 - 12
services/web/public/stylesheets/components/buttons.less

@@ -121,18 +121,6 @@
   }
 }
 
-// Unstyled button
-// -------------------------
-
-// Remove styling from button so that text is style like parent
-.btn-unstyled {
-  background: none;
-  border: none;
-  margin: 0;
-  outline: none;
-  padding: 0;
-}
-
 // Button Sizes
 // --------------------------------------------------
 

+ 9 - 2
services/web/public/stylesheets/components/dropdowns.less

@@ -60,7 +60,7 @@
   }
 
   // Links and other items within the dropdown menu
-  > li > a,div {
+  > li > a,div, .dropdown-menu-button {
     display: block;
     padding: @dropdown-item-padding;
     clear: both;
@@ -75,10 +75,17 @@
       color: #7a7a7a
     }
   }
+
+  // button specific styles
+  .dropdown-menu-button {
+    border: none;
+    outline: none;
+    width: 100%;
+  }
 }
 
 // Hover/Focus state
-.dropdown-menu > li > a {
+.dropdown-menu > li > a, .dropdown-menu .dropdown-menu-button {
   &:hover,
   &:focus {
     text-decoration: none;