1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 02:42:40 +01:00
phorge-phorge/webroot/rsrc/css/application/base/main-menu-view.css
epriestley 87012d60f1 Show icons and disabled/archived/closed results in typahead dynamic list
Summary:
Ref T4420. This is mostly a design change, but addresses two functional issues:

  # Many sources exclude disabled accounts, system agents, archived projects, etc. It is rare to select these, but excluding them completely is too severe, and we've made more than a handful of changes over time to replace a "users" endpoint with an "accounts" endpoint (to include disabled users) or similar. Instead, always show these results, but sort them last and use a special style to clearly mark them as closed, disabled, or otherwise unusual.
    - As a practical consequence, all the similar endpoints can now be merged, so "accounts" and "users" return the exact same result sets.
  # Increasingly, sources can return multiple object types in a single list. For example, "CC" can have a user or mailing list, and soon a project or repository. However, the result list is fairly homogenous across types and it isn't easy to quickly pick out projects vs users. To help with this, add icons showing the result type.

Test Plan:
{F113079}

(The main search results get touched here too, I verified they didn't blow up.)

Reviewers: chad, btrahan

Reviewed By: chad

CC: chad, aran, mbishopim3

Maniphest Tasks: T4420

Differential Revision: https://secure.phabricator.com/D8231
2014-02-14 10:24:11 -08:00

433 lines
8.9 KiB
CSS

/**
* @provides phabricator-main-menu-view
*/
/* - Main Menu -----------------------------------------------------------------
Main menu at the top of every page that has chrome. It reacts to resolution
changes in order to behave reasonably on tablets and phones.
*/
.phabricator-main-menu {
background: #2d3236;
background-repeat: repeat-x;
position: relative;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25);
min-height: 44px;
}
.device-desktop .phabricator-main-menu {
height: 44px;
padding-right: 4px;
}
.phabricator-main-menu a:hover {
text-decoration: none;
}
/* - Logo ----------------------------------------------------------------------
The "Phabricator" logo group in the main menu. On tablet and phone devices,
this shows a "reveal" button to expand/collapse the rest of the menu.
*/
.device-desktop .phabricator-main-menu-group-logo {
float: left;
}
.phabricator-main-menu-logo {
display: inline-block;
width: 149px;
height: 44px;
float: left;
margin-right: 6px;
padding-right: 6px;
padding-left: 6px;
}
.menu-logo-image {
position: absolute;
width: 149px;
height: 26px;
top: 9px;
}
.device-phone .phabricator-main-menu-logo {
margin-left: -45px;
}
.device .phabricator-main-menu-logo:hover {
background-color: transparent;
}
/* - Expand/Collapse Button ----------------------------------------------------
On phones, the menu switches to a vertical layout and uses a button to expand
or collapse the items.
*/
.phabricator-menu-button-icon {
width: 24px;
height: 24px;
float: left;
margin: 10px 10px 0 5px;
}
.phabricator-expand-application-menu,
.phabricator-expand-search-menu {
float: right;
}
.device-desktop .phabricator-main-menu-search-button,
.device-desktop .phabricator-main-menu-expand-button {
display: none;
}
/* - Search --------------------------------------------------------------------
The main search input in the menu bar.
*/
.device-desktop .phabricator-main-menu-search {
width: 220px;
}
.device .phabricator-main-menu-search {
height: 40px;
}
.phabricator-main-menu-search-container {
padding: 9px 0 10px 0;
position: relative;
height: 24px;
margin: 0 8px;
}
.phabricator-main-menu-search-target {
position: absolute;
top: 46px;
}
.device-desktop .phabricator-main-menu-search-target {
width: 320px;
margin-left: -150px;
}
.device .phabricator-main-menu-search-target {
width: 100%;
margin-left: -25px;
}
.device .phabricator-main-menu-search-container {
padding: 4px 0;
}
.phabricator-main-menu .phabricator-main-menu-search input {
outline: 0;
margin: 0;
box-shadow: none;
transition: none;
color: {$lightgreytext};
width: 100%;
right: 0;
position: absolute;
font-size: 13px;
border: 1px solid #333;
border-radius: 12px;
background-color: #222;
opacity: .8;
height: 26px;
line-height: 12px;
box-shadow: 0px 1px 1px rgba(128, 128, 128, 0.25);
padding: 6px 32px 6px 10px;
}
.phabricator-main-menu.main-header-dark .phabricator-main-menu-search input {
background-color: #555;
}
.device .phabricator-main-menu-search input {
height: 30px;
font-size: 15px;
border-radius: 15px;
}
.phabricator-main-menu .phabricator-main-menu-search input:focus {
background: #fff;
opacity: 1;
color: #333;
border-color: #e7e7e7;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
.phabricator-main-menu-search input.jx-typeahead-placeholder {
color: #fff;
}
.phabricator-main-menu-search button {
position: absolute;
color: transparent;
background: transparent 5px 6px url(/rsrc/image/search-white.png) no-repeat;
border: none;
outline: none;
box-shadow: none;
text-shadow: none;
min-width: 0;
height: 20px;
width: 20px;
top: 10px;
right: 6px;
}
.device .phabricator-main-menu-search button {
top: 7px;
}
.phabricator-main-menu-search-target div.jx-typeahead-results {
background: #ffffff;
word-wrap: break-word;
overflow-y: auto;
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.5);
border: 2px solid #33393d;
border-radius: 3px;
margin-left: 40px;
}
.phabricator-main-search-typeahead-result {
display: block;
padding: 6px 12px 6px 46px;
background-position: 12px 9px;
background-size: 25px 25px;
background-repeat: no-repeat;
}
.phabricator-main-search-typeahead-result .result-name {
display: block;
font-size: 12px;
font-weight: bold;
color: #333;
}
.phabricator-main-search-typeahead-result .result-type {
color: {$lightgreytext};
font-size: 11px;
font-weight: normal;
}
.device .phabricator-application-menu-expanded.phabricator-search-menu-expanded
.phabricator-search-menu {
padding: 0;
}
/* - Alert ---------------------------------------------------------------------
Alert menus are like icon menus but don't obey collapse rules.
*/
.phabricator-main-menu-alerts {
display: inline-block;
border-radius: 15px;
float: left;
background: rgba(0,0,0,.5);
height: 20px;
padding: 2px 10px 3px 8px;
margin-top: 10px;
}
.phabricator-main-menu-alert-icon,
.phabricator-main-menu-message-icon {
width: 18px;
height: 18px;
display: block;
float: left;
margin: 2px 0 0 0;
}
.alert-notifications .phabricator-main-menu-message-icon {
margin: 2px 0 0 6px;
}
.phabricator-main-menu-alert-count,
.phabricator-main-menu-message-count {
font-weight: bold;
line-height: 20px;
color: #ffffff;
text-align: center;
display: none;
float: left;
margin-left: 3px;
}
.alert-unread .phabricator-main-menu-alert-count,
.message-unread .phabricator-main-menu-message-count {
display: block;
}
/* - Dark Menu -----------------------------------------------------------------
Styles shared between the "core" menu (left button on mobile) and
"application" menu (right button on mobile). These styles give the menu a
white-on-black appearance.
*/
.device .phabricator-dark-menu,
.device .phabricator-dark-menu a.phui-list-item-href {
color: #fff;
}
.device .phabricator-dark-menu .phui-list-item-type-label {
text-transform: uppercase;
font-size: 12px;
background-color: #151719;
padding: 5px 0;
display: block;
font-weight: bold;
}
.device .phabricator-dark-menu .phui-list-item-href {
border-width: 1px 0;
border-style: solid;
border-color: #34373b transparent #282c2d;
background-image: url(/rsrc/image/texture/dark-menu.png);
padding: 4px 0;
display: block;
}
/* - Core Menu -----------------------------------------------------------------
Styles unique to the core menu (left button on mobile).
*/
.phabricator-core-menu-profile-image {
background-size: 28px 28px;
}
.device .phabricator-search-menu {
display: none;
}
.device-desktop .phabricator-search-menu {
float: right;
}
.device .phabricator-search-menu-expanded .phabricator-search-menu {
display: block;
padding-top: 44px;
}
.device .phabricator-dark-menu .phui-list-item-type-link {
font-size: 15px;
min-height: 30px;
line-height: 28px;
}
.device .phui-list-item-type-link
.phabricator-core-menu-icon + .phui-list-item-name {
margin-left: 30px;
}
.device-desktop .phabricator-application-menu {
float: right;
}
.device-desktop .phabricator-application-menu .phui-list-item-view,
.device-desktop .phabricator-application-menu .phui-list-item-name {
display: none;
}
.device-desktop .phabricator-application-menu .phui-list-item-view.core-menu-item {
display: block;
}
.device-desktop .main-header-dark .phabricator-application-menu
.core-menu-item.phui-list-item-view:hover,
.device-desktop .main-header-dark .phabricator-main-menu-logo:hover {
background-color: rgba(0,0,0,.6);
}
.device-desktop .phabricator-application-menu
.core-menu-item.phui-list-item-view:hover,
.device-desktop .phabricator-main-menu-logo:hover {
background-color: rgba(0,0,0,.3);
box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
border-radius: 3px;
}
.device-desktop .phabricator-application-menu .phui-list-item-view {
float: left;
position: relative;
min-width: 36px;
height: 36px;
margin-top: 4px;
}
.device-desktop .phabricator-core-menu-icon {
top: 5px;
left: 4px;
}
.device .phabricator-core-menu-icon {
left: 6px;
}
.phabricator-core-menu-icon {
position: absolute;
display: block;
width: 28px;
height: 28px;
}
.phabricator-main-menu-dropdown {
position: absolute;
background: #fff;
top: 38px;
padding: 2px;
border: 1px solid {$lightblueborder};
border-bottom: 1px solid {$blueborder};
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
}
/* - Application Menu ----------------------------------------------------------
Styles unique to the application menu (right button on mobile).
*/
.device .phabricator-application-menu-expanded .phabricator-application-menu {
display: block;
padding-top: 44px;
}
.device .phabricator-application-menu,
.device-desktop .phabricator-dark-menu .phui-list-item-type-label {
display: none;
}
.phabricator-application-menu .phui-list-item-name {
padding-left: 12px;
}
/* - Print ---------------------------------------------------------------------
*/
!print .phabricator-main-menu {
display: none;
}