1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Update Phabricator logo

Summary:
This updates the eye logo and removes the formal wordmark "Phabricator" as an image. Instead we'll use the new updated eye logo and plain text for "Phabricator", both of which are more friendly and less industrial.

Installs that already use the `header-logo` customization setting will need to rebuild their logo to 80px x 80px. They will then also get to use plain text to whitebox their install as they see fit.

Test Plan:
Tested new logo at desktop, tablet, and mobile sizes. Set a random instance name, saw new wordmark. Created a really long wordmark of MMMMMMMMMMMM, saw text cut off so UI doesn't break. May need some additional tweaking, but I think we covered the most edge cases here.

{F1751791, size=full}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: edibiase, bjshively, yelirekim, Korvin

Maniphest Tasks: T4214, T11096

Differential Revision: https://secure.phabricator.com/D16373
This commit is contained in:
Chad Little 2016-08-07 11:33:41 -07:00
parent 87f663ef77
commit 52c0ec2700
20 changed files with 56 additions and 160 deletions

View file

@ -7,7 +7,7 @@
*/ */
return array( return array(
'names' => array( 'names' => array(
'core.pkg.css' => '90c46327', 'core.pkg.css' => 'f12c7d47',
'core.pkg.js' => 'b562c3db', 'core.pkg.js' => 'b562c3db',
'darkconsole.pkg.js' => 'e7393ebb', 'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '3fb7f532', 'differential.pkg.css' => '3fb7f532',
@ -32,7 +32,7 @@ return array(
'rsrc/css/aphront/typeahead.css' => 'd4f16145', 'rsrc/css/aphront/typeahead.css' => 'd4f16145',
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
'rsrc/css/application/auth/auth.css' => '0877ed6e', 'rsrc/css/application/auth/auth.css' => '0877ed6e',
'rsrc/css/application/base/main-menu-view.css' => 'b623169f', 'rsrc/css/application/base/main-menu-view.css' => 'a79b6e52',
'rsrc/css/application/base/notification-menu.css' => 'f31c0bde', 'rsrc/css/application/base/notification-menu.css' => 'f31c0bde',
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
'rsrc/css/application/base/phui-theme.css' => '027ba77e', 'rsrc/css/application/base/phui-theme.css' => '027ba77e',
@ -163,7 +163,6 @@ return array(
'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5', 'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5',
'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373', 'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373',
'rsrc/css/sprite-login.css' => '60e8560e', 'rsrc/css/sprite-login.css' => '60e8560e',
'rsrc/css/sprite-menu.css' => '9dd65b92',
'rsrc/css/sprite-tokens.css' => '9cdfd599', 'rsrc/css/sprite-tokens.css' => '9cdfd599',
'rsrc/css/syntax/syntax-default.css' => '9923583c', 'rsrc/css/syntax/syntax-default.css' => '9923583c',
'rsrc/externals/d3/d3.min.js' => 'a11a5ff2', 'rsrc/externals/d3/d3.min.js' => 'a11a5ff2',
@ -320,6 +319,7 @@ return array(
'rsrc/image/icon/tango/upload.png' => '7bbb7984', 'rsrc/image/icon/tango/upload.png' => '7bbb7984',
'rsrc/image/icon/unsubscribe.png' => '25725013', 'rsrc/image/icon/unsubscribe.png' => '25725013',
'rsrc/image/lightblue-header.png' => '5c168b6d', 'rsrc/image/lightblue-header.png' => '5c168b6d',
'rsrc/image/logo/light-eye.png' => 'fcd66408',
'rsrc/image/main_texture.png' => '29a2c5ad', 'rsrc/image/main_texture.png' => '29a2c5ad',
'rsrc/image/menu_texture.png' => '5a17580d', 'rsrc/image/menu_texture.png' => '5a17580d',
'rsrc/image/people/harding.png' => '45aa614e', 'rsrc/image/people/harding.png' => '45aa614e',
@ -343,8 +343,6 @@ return array(
'rsrc/image/resize.png' => 'fd476de4', 'rsrc/image/resize.png' => 'fd476de4',
'rsrc/image/sprite-login-X2.png' => 'e3991e37', 'rsrc/image/sprite-login-X2.png' => 'e3991e37',
'rsrc/image/sprite-login.png' => '03d5af29', 'rsrc/image/sprite-login.png' => '03d5af29',
'rsrc/image/sprite-menu-X2.png' => 'cfd8fca5',
'rsrc/image/sprite-menu.png' => 'd7a99faa',
'rsrc/image/sprite-tokens-X2.png' => '804a5232', 'rsrc/image/sprite-tokens-X2.png' => '804a5232',
'rsrc/image/sprite-tokens.png' => 'b41d03da', 'rsrc/image/sprite-tokens.png' => 'b41d03da',
'rsrc/image/texture/card-gradient.png' => '815f26e8', 'rsrc/image/texture/card-gradient.png' => '815f26e8',
@ -785,7 +783,7 @@ return array(
'phabricator-flag-css' => '5337623f', 'phabricator-flag-css' => '5337623f',
'phabricator-keyboard-shortcut' => '1ae869f2', 'phabricator-keyboard-shortcut' => '1ae869f2',
'phabricator-keyboard-shortcut-manager' => '4a021c10', 'phabricator-keyboard-shortcut-manager' => '4a021c10',
'phabricator-main-menu-view' => 'b623169f', 'phabricator-main-menu-view' => 'a79b6e52',
'phabricator-nav-view-css' => '09f3d0db', 'phabricator-nav-view-css' => '09f3d0db',
'phabricator-notification' => 'ccf1cbf8', 'phabricator-notification' => 'ccf1cbf8',
'phabricator-notification-css' => '3f6c89c9', 'phabricator-notification-css' => '3f6c89c9',
@ -891,7 +889,6 @@ return array(
'releeph-request-typeahead-css' => '667a48ae', 'releeph-request-typeahead-css' => '667a48ae',
'setup-issue-css' => 'db7e9c40', 'setup-issue-css' => 'db7e9c40',
'sprite-login-css' => '60e8560e', 'sprite-login-css' => '60e8560e',
'sprite-menu-css' => '9dd65b92',
'sprite-tokens-css' => '9cdfd599', 'sprite-tokens-css' => '9cdfd599',
'syntax-default-css' => '9923583c', 'syntax-default-css' => '9923583c',
'syntax-highlighting-css' => '769d3498', 'syntax-highlighting-css' => '769d3498',
@ -1724,6 +1721,9 @@ return array(
'javelin-stratcom', 'javelin-stratcom',
'javelin-dom', 'javelin-dom',
), ),
'a79b6e52' => array(
'phui-theme-css',
),
'a80d0378' => array( 'a80d0378' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1844,9 +1844,6 @@ return array(
'javelin-dom', 'javelin-dom',
'javelin-util', 'javelin-util',
), ),
'b623169f' => array(
'phui-theme-css',
),
'b6993408' => array( 'b6993408' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -2246,7 +2243,6 @@ return array(
'aphront-tooltip-css', 'aphront-tooltip-css',
'phabricator-flag-css', 'phabricator-flag-css',
'phui-info-view-css', 'phui-info-view-css',
'sprite-menu-css',
'phabricator-main-menu-view', 'phabricator-main-menu-view',
'phabricator-notification-css', 'phabricator-notification-css',
'phabricator-notification-menu-css', 'phabricator-notification-menu-css',

View file

@ -104,7 +104,6 @@ return array(
'aphront-tooltip-css', 'aphront-tooltip-css',
'phabricator-flag-css', 'phabricator-flag-css',
'phui-info-view-css', 'phui-info-view-css',
'sprite-menu-css',
'phabricator-main-menu-view', 'phabricator-main-menu-view',
'phabricator-notification-css', 'phabricator-notification-css',

View file

@ -1,31 +0,0 @@
{
"version": 1,
"sprites": {
"dark-eye": {
"name": "dark-eye",
"rule": ".dark-eye",
"hash": "c8112e52666fa1cb509ebb2cdf3a3df5"
},
"dark-logo": {
"name": "dark-logo",
"rule": ".dark-logo",
"hash": "e3425da87e8f6737d8db0063d064cd7d"
},
"light-eye": {
"name": "light-eye",
"rule": ".light-eye",
"hash": "5b6bf7c8c10d4f7414d976f6e79ae2ff"
},
"light-logo": {
"name": "light-logo",
"rule": ".light-logo",
"hash": "bee37c0a86825ec7ded38936b1ba7b65"
}
},
"scales": [
1,
2
],
"header": "\/**\n * @provides sprite-menu-css\n * @generated\n *\/\n\n.sprite-menu {\n background-image: url(\/rsrc\/image\/sprite-menu.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-menu {\n background-image: url(\/rsrc\/image\/sprite-menu-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
"type": "standard"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -27,7 +27,6 @@ $webroot = Filesystem::readablePath($webroot);
$generator = new CeleritySpriteGenerator(); $generator = new CeleritySpriteGenerator();
$sheets = array( $sheets = array(
'menu' => $generator->buildMenuSheet(),
'tokens' => $generator->buildTokenSheet(), 'tokens' => $generator->buildTokenSheet(),
'login' => $generator->buildLoginSheet(), 'login' => $generator->buildLoginSheet(),
); );

View file

@ -2,58 +2,6 @@
final class CeleritySpriteGenerator extends Phobject { final class CeleritySpriteGenerator extends Phobject {
public function buildMenuSheet() {
$sprites = array();
$colors = array(
'dark',
'light',
);
$sources = array();
foreach ($colors as $color) {
$sources[$color.'-logo'] = array(
'x' => 96,
'y' => 40,
'css' => '.'.$color.'-logo',
);
$sources[$color.'-eye'] = array(
'x' => 40,
'y' => 40,
'css' => '.'.$color.'-eye',
);
}
$scales = array(
'1x' => 1,
'2x' => 2,
);
$template = new PhutilSprite();
foreach ($sources as $name => $spec) {
$sprite = id(clone $template)
->setName($name)
->setSourceSize($spec['x'], $spec['y'])
->setTargetCSS($spec['css']);
foreach ($scales as $scale_name => $scale) {
$path = 'menu_'.$scale_name.'/'.$name.'.png';
$path = $this->getPath($path);
$sprite->setSourceFile($path, $scale);
}
$sprites[] = $sprite;
}
$sheet = $this->buildSheet('menu', true);
$sheet->setScales($scales);
foreach ($sprites as $sprite) {
$sheet->addSprite($sprite);
}
return $sheet;
}
public function buildTokenSheet() { public function buildTokenSheet() {
$icons = $this->getDirectoryList('tokens_1x'); $icons = $this->getDirectoryList('tokens_1x');
$scales = array( $scales = array(

View file

@ -69,6 +69,14 @@ EOJSON;
" omit this if you just want a piece of text, like a copyright ". " omit this if you just want a piece of text, like a copyright ".
" notice.")) " notice."))
->addExample($example, pht('Basic Example')), ->addExample($example, pht('Basic Example')),
$this->newOption('ui.custom-wordmark', 'string', array())
->setSummary(
pht(
'Customize the text next to the logo.'))
->setDescription(
pht(
"Allows you to change the text (Phabricator by default) ".
"next to the Phabricator logo.\n\n")),
$this->newOption( $this->newOption(
'ui.custom-header', 'ui.custom-header',
'custom:PhabricatorCustomHeaderConfigType', 'custom:PhabricatorCustomHeaderConfigType',
@ -80,7 +88,7 @@ EOJSON;
'phid for a viewable image you have uploaded to Phabricator '. 'phid for a viewable image you have uploaded to Phabricator '.
'via the [[ /file/ | Files application]]. This image should '. 'via the [[ /file/ | Files application]]. This image should '.
'be:'."\n". 'be:'."\n".
' - 192px X 80px; while not enforced, images with these '. ' - 80px X 80px; while not enforced, images with these '.
'dimensions will look best across devices.'."\n". 'dimensions will look best across devices.'."\n".
' - have view policy public if [[ '. ' - have view policy public if [[ '.
'/config/edit/policy.allow-public | `policy.allow-public`]] '. '/config/edit/policy.allow-public | `policy.allow-public`]] '.

View file

@ -298,7 +298,9 @@ final class PhabricatorMainMenuView extends AphrontView {
private function renderPhabricatorLogo() { private function renderPhabricatorLogo() {
$style_logo = null; $style_logo = null;
$logo = null;
$custom_header = PhabricatorEnv::getEnvConfig('ui.custom-header'); $custom_header = PhabricatorEnv::getEnvConfig('ui.custom-header');
$custom_wordmark = PhabricatorEnv::getEnvConfig('ui.custom-wordmark');
if ($custom_header) { if ($custom_header) {
$cache = PhabricatorCaches::getImmutableCache(); $cache = PhabricatorCaches::getImmutableCache();
$cache_key_logo = 'ui.custom-header.logo-phid.v1.'.$custom_header; $cache_key_logo = 'ui.custom-header.logo-phid.v1.'.$custom_header;
@ -315,17 +317,27 @@ final class PhabricatorMainMenuView extends AphrontView {
} }
if ($logo_uri) { if ($logo_uri) {
$style_logo = $style_logo =
'background-size: 96px 40px; '. 'background-size: 40px 40px; '.
'background-position: 0px 0px; '. 'background-position: 0px 0px; '.
'background-image: url('.$logo_uri.');'; 'background-image: url('.$logo_uri.');';
} }
$logo = phutil_tag(
'span',
array(
'class' => 'phabricator-main-menu-logo',
'style' => $style_logo,
),
'');
} }
$color = PhabricatorEnv::getEnvConfig('ui.header-color'); if (!$logo) {
if ($color == 'light') { $logo = phutil_tag(
$color = 'dark'; 'span',
} else { array(
$color = 'light'; 'class' => 'phabricator-wordmark',
),
(($custom_wordmark) ? $custom_wordmark : pht('Phabricator')));
} }
return phutil_tag( return phutil_tag(
@ -344,16 +356,10 @@ final class PhabricatorMainMenuView extends AphrontView {
phutil_tag( phutil_tag(
'span', 'span',
array( array(
'class' => 'sprite-menu phabricator-main-menu-eye '.$color.'-eye', 'class' => 'phabricator-main-menu-eye',
),
''),
phutil_tag(
'span',
array(
'class' => 'sprite-menu phabricator-main-menu-logo '.$color.'-logo',
'style' => $style_logo,
), ),
''), ''),
$logo,
)); ));
} }

View file

@ -41,27 +41,20 @@
} }
.phabricator-main-menu-brand { .phabricator-main-menu-brand {
display: inline-block;
width: 148px;
height: 44px; height: 44px;
float: left; float: left;
margin-right: 4px; margin-right: 6px;
padding-left: 6px; padding-left: 6px;
} }
.phabricator-main-menu-logo {
position: absolute;
width: 96px;
height: 40px;
left: 52px;
top: 2px;
}
.phabricator-main-menu-eye { .phabricator-main-menu-eye {
position: absolute; margin: 2px 0;
width: 40px; width: 40px;
height: 40px; height: 40px;
top: 2px; float: left;
display: block;
background-image: url(/rsrc/image/logo/light-eye.png);
background-size: 40px 40px;
} }
.device-desktop .phabricator-main-menu-brand:hover { .device-desktop .phabricator-main-menu-brand:hover {
@ -69,6 +62,20 @@
cursor: hand; cursor: hand;
} }
.device-phone .phabricator-wordmark {
max-width: 112px; /* iPhone 5 limitation */
}
.phabricator-wordmark {
float: left;
color: #fff;
font-size: 18px;
margin: 9px 4px 9px 6px;
padding-right: 8px;
max-width: 175px;
overflow: hidden;
}
/* - Expand/Collapse Button ---------------------------------------------------- /* - Expand/Collapse Button ----------------------------------------------------
On phones, the menu switches to a vertical layout and uses a button to expand On phones, the menu switches to a vertical layout and uses a button to expand

View file

@ -1,36 +0,0 @@
/**
* @provides sprite-menu-css
* @generated
*/
.sprite-menu {
background-image: url(/rsrc/image/sprite-menu.png);
background-repeat: no-repeat;
}
@media
only screen and (min-device-pixel-ratio: 1.5),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx) {
.sprite-menu {
background-image: url(/rsrc/image/sprite-menu-X2.png);
background-size: 97px 123px;
}
}
.dark-logo {
background-position: 0px 0px;
}
.dark-eye {
background-position: 0px -82px;
}
.light-logo {
background-position: 0px -41px;
}
.light-eye {
background-position: -41px -82px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB