diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9b87da9aed..a0482eaf84 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ */ return array( 'names' => array( - 'core.pkg.css' => 'e5517713', + 'core.pkg.css' => '75121d30', 'core.pkg.js' => '9db3e620', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => 'bb338e4b', @@ -153,8 +153,7 @@ return array( 'rsrc/css/phui/phui-workboard-view.css' => '720efdde', 'rsrc/css/phui/phui-workpanel-view.css' => '015a0cab', 'rsrc/css/sprite-login.css' => 'a3526809', - 'rsrc/css/sprite-main-header.css' => '28d01b0b', - 'rsrc/css/sprite-menu.css' => '02aa815a', + 'rsrc/css/sprite-menu.css' => 'ab8f6356', 'rsrc/css/sprite-projects.css' => 'b0d9e24f', 'rsrc/css/sprite-tokens.css' => '1706b943', 'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '5fb6fb0e', @@ -305,9 +304,8 @@ return array( 'rsrc/image/phrequent_inactive.png' => 'bfc15a69', 'rsrc/image/sprite-login-X2.png' => 'a15918f0', 'rsrc/image/sprite-login.png' => '8cee4f6e', - 'rsrc/image/sprite-main-header.png' => '39419fa6', - 'rsrc/image/sprite-menu-X2.png' => 'e8655658', - 'rsrc/image/sprite-menu.png' => 'e7e02f73', + 'rsrc/image/sprite-menu-X2.png' => 'dc41efa4', + 'rsrc/image/sprite-menu.png' => '8848c09a', 'rsrc/image/sprite-projects-X2.png' => '8c91c839', 'rsrc/image/sprite-projects.png' => 'ef9dc9b5', 'rsrc/image/sprite-tokens-X2.png' => 'b4776580', @@ -808,8 +806,7 @@ return array( 'releeph-request-typeahead-css' => '667a48ae', 'setup-issue-css' => '631c4e92', 'sprite-login-css' => 'a3526809', - 'sprite-main-header-css' => '28d01b0b', - 'sprite-menu-css' => '02aa815a', + 'sprite-menu-css' => 'ab8f6356', 'sprite-projects-css' => 'b0d9e24f', 'sprite-tokens-css' => '1706b943', 'syntax-highlighting-css' => '6b7b24d9', @@ -2070,7 +2067,6 @@ return array( 'phui-list-view-css', 'font-fontawesome', 'phui-font-icon-base-css', - 'sprite-main-header-css', 'phui-box-css', 'phui-object-box-css', 'phui-timeline-view-css', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index b261fa2e17..a981453bee 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -125,7 +125,6 @@ return array( 'font-fontawesome', 'phui-font-icon-base-css', - 'sprite-main-header-css', 'phui-box-css', 'phui-object-box-css', 'phui-timeline-view-css', diff --git a/resources/sprite/main_header/applebloom.png b/resources/sprite/main_header/applebloom.png deleted file mode 100644 index 29721ef8fd..0000000000 Binary files a/resources/sprite/main_header/applebloom.png and /dev/null differ diff --git a/resources/sprite/main_header/blindigo.png b/resources/sprite/main_header/blindigo.png deleted file mode 100644 index 827eca8887..0000000000 Binary files a/resources/sprite/main_header/blindigo.png and /dev/null differ diff --git a/resources/sprite/main_header/blue.png b/resources/sprite/main_header/blue.png deleted file mode 100644 index 7183340432..0000000000 Binary files a/resources/sprite/main_header/blue.png and /dev/null differ diff --git a/resources/sprite/main_header/dark.png b/resources/sprite/main_header/dark.png deleted file mode 100644 index f676a0d1b8..0000000000 Binary files a/resources/sprite/main_header/dark.png and /dev/null differ diff --git a/resources/sprite/main_header/fluttershy.png b/resources/sprite/main_header/fluttershy.png deleted file mode 100644 index 796158d39b..0000000000 Binary files a/resources/sprite/main_header/fluttershy.png and /dev/null differ diff --git a/resources/sprite/main_header/green.png b/resources/sprite/main_header/green.png deleted file mode 100644 index 6c84d1deaa..0000000000 Binary files a/resources/sprite/main_header/green.png and /dev/null differ diff --git a/resources/sprite/main_header/indigo.png b/resources/sprite/main_header/indigo.png deleted file mode 100644 index ac38dfbdcd..0000000000 Binary files a/resources/sprite/main_header/indigo.png and /dev/null differ diff --git a/resources/sprite/main_header/nightmaremoon.png b/resources/sprite/main_header/nightmaremoon.png deleted file mode 100644 index 2e98550795..0000000000 Binary files a/resources/sprite/main_header/nightmaremoon.png and /dev/null differ diff --git a/resources/sprite/main_header/red.png b/resources/sprite/main_header/red.png deleted file mode 100644 index 2620221ec6..0000000000 Binary files a/resources/sprite/main_header/red.png and /dev/null differ diff --git a/resources/sprite/main_header/scootaloo.png b/resources/sprite/main_header/scootaloo.png deleted file mode 100644 index 32e724ec5e..0000000000 Binary files a/resources/sprite/main_header/scootaloo.png and /dev/null differ diff --git a/resources/sprite/main_header/yellow.png b/resources/sprite/main_header/yellow.png deleted file mode 100644 index a8a4d67f0b..0000000000 Binary files a/resources/sprite/main_header/yellow.png and /dev/null differ diff --git a/resources/sprite/manifest/main-header.json b/resources/sprite/manifest/main-header.json deleted file mode 100644 index 7b6ab4342d..0000000000 --- a/resources/sprite/manifest/main-header.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": 1, - "sprites": { - "main-header-applebloom": { - "name": "main-header-applebloom", - "rule": ".main-header-applebloom", - "hash": "64822776b129e724709983db1ac5a712" - }, - "main-header-blindigo": { - "name": "main-header-blindigo", - "rule": ".main-header-blindigo", - "hash": "8c4f5b1f1f3faceb6ca6e8278a1b082f" - }, - "main-header-blue": { - "name": "main-header-blue", - "rule": ".main-header-blue", - "hash": "b5dd317b7bd35e0592b3f4b66267437c" - }, - "main-header-dark": { - "name": "main-header-dark", - "rule": ".main-header-dark", - "hash": "817815d84c0c935b4875f6ecc7dbb526" - }, - "main-header-fluttershy": { - "name": "main-header-fluttershy", - "rule": ".main-header-fluttershy", - "hash": "55d4e9f813cf354693290105cf83cf78" - }, - "main-header-green": { - "name": "main-header-green", - "rule": ".main-header-green", - "hash": "c230f09e307d167fab3ea0d8c3b33755" - }, - "main-header-indigo": { - "name": "main-header-indigo", - "rule": ".main-header-indigo", - "hash": "a27394ff1eff4d24398ec57e54d7f5fd" - }, - "main-header-nightmaremoon": { - "name": "main-header-nightmaremoon", - "rule": ".main-header-nightmaremoon", - "hash": "9e7cc7b18d2132d2dd47586ba0cd6400" - }, - "main-header-red": { - "name": "main-header-red", - "rule": ".main-header-red", - "hash": "3f12cc098afddb8e6c830ef761dcaa61" - }, - "main-header-scootaloo": { - "name": "main-header-scootaloo", - "rule": ".main-header-scootaloo", - "hash": "8cedc359dccab1bbd49cbc69940f566a" - }, - "main-header-yellow": { - "name": "main-header-yellow", - "rule": ".main-header-yellow", - "hash": "d920e70a6d2662cfb83e1d7e4b4000fd" - } - }, - "scales": [ - 1 - ], - "header": "\/**\n * @provides sprite-main-header-css\n * @generated\n *\/\n\n.sprite-main-header {\n background-image: url(\/rsrc\/image\/sprite-main-header.png);\n background-repeat: repeat-x;\n}\n\n\n", - "type": "repeat-x" -} diff --git a/resources/sprite/manifest/menu.json b/resources/sprite/manifest/menu.json index 7b8f5230a7..10f5879f7b 100644 --- a/resources/sprite/manifest/menu.json +++ b/resources/sprite/manifest/menu.json @@ -1,15 +1,65 @@ { "version": 1, "sprites": { - "eye": { - "name": "eye", - "rule": ".phabricator-main-menu-eye", - "hash": "8848ce0f1d60278ba13a306805107d62" + "blindigo-eye": { + "name": "blindigo-eye", + "rule": ".blindigo-eye", + "hash": "fcd3eb2a8d2d8babf59a952b62783282" }, - "logo": { - "name": "logo", - "rule": ".phabricator-main-menu-logo", - "hash": "346032db9e1dbaafc9574664b9581b03" + "blindigo-logo": { + "name": "blindigo-logo", + "rule": ".blindigo-logo", + "hash": "a22978e621df5126471576510303222f" + }, + "blue-eye": { + "name": "blue-eye", + "rule": ".blue-eye", + "hash": "f7505e56e452c5922f1a275a736d5326" + }, + "blue-logo": { + "name": "blue-logo", + "rule": ".blue-logo", + "hash": "4c6240f153245d56a6bf02bb6796404f" + }, + "dark-eye": { + "name": "dark-eye", + "rule": ".dark-eye", + "hash": "c8112e52666fa1cb509ebb2cdf3a3df5" + }, + "dark-logo": { + "name": "dark-logo", + "rule": ".dark-logo", + "hash": "e3425da87e8f6737d8db0063d064cd7d" + }, + "indigo-eye": { + "name": "indigo-eye", + "rule": ".indigo-eye", + "hash": "497b57bc1709a88fa68b14dc88a2a253" + }, + "indigo-logo": { + "name": "indigo-logo", + "rule": ".indigo-logo", + "hash": "c7223567a77c46fbab571170f0a76ae6" + }, + "rainbow-eye": { + "name": "rainbow-eye", + "rule": ".rainbow-eye", + "hash": "2c63171eeb8ba6acb645219fdf2585b1" + }, + "rainbow-logo": { + "name": "rainbow-logo", + "rule": ".rainbow-logo", + "hash": "eca0c685cb9524bff513a5f7eab7c6e5" + }, + "red-eye": { + "name": "red-eye", + "rule": ".red-eye", + "hash": "97a9a11ecbeee1fbb8a7c8ea406e4be4" + }, + "red-logo": { + "name": "red-logo", + "rule": ".red-logo", + "hash": "1126a79154d24242d3f72e868b95a445" } }, "scales": [ diff --git a/resources/sprite/menu_1x/blindigo-eye.png b/resources/sprite/menu_1x/blindigo-eye.png new file mode 100644 index 0000000000..13feccc9cb Binary files /dev/null and b/resources/sprite/menu_1x/blindigo-eye.png differ diff --git a/resources/sprite/menu_1x/blindigo-logo.png b/resources/sprite/menu_1x/blindigo-logo.png new file mode 100644 index 0000000000..6f4f517360 Binary files /dev/null and b/resources/sprite/menu_1x/blindigo-logo.png differ diff --git a/resources/sprite/menu_1x/blue-eye.png b/resources/sprite/menu_1x/blue-eye.png new file mode 100644 index 0000000000..1d5eebc403 Binary files /dev/null and b/resources/sprite/menu_1x/blue-eye.png differ diff --git a/resources/sprite/menu_1x/blue-logo.png b/resources/sprite/menu_1x/blue-logo.png new file mode 100644 index 0000000000..4efc4e475f Binary files /dev/null and b/resources/sprite/menu_1x/blue-logo.png differ diff --git a/resources/sprite/menu_1x/eye.png b/resources/sprite/menu_1x/dark-eye.png similarity index 100% rename from resources/sprite/menu_1x/eye.png rename to resources/sprite/menu_1x/dark-eye.png diff --git a/resources/sprite/menu_1x/logo.png b/resources/sprite/menu_1x/dark-logo.png similarity index 100% rename from resources/sprite/menu_1x/logo.png rename to resources/sprite/menu_1x/dark-logo.png diff --git a/resources/sprite/menu_1x/indigo-eye.png b/resources/sprite/menu_1x/indigo-eye.png new file mode 100644 index 0000000000..f979c5d771 Binary files /dev/null and b/resources/sprite/menu_1x/indigo-eye.png differ diff --git a/resources/sprite/menu_1x/indigo-logo.png b/resources/sprite/menu_1x/indigo-logo.png new file mode 100644 index 0000000000..b47e7ddd45 Binary files /dev/null and b/resources/sprite/menu_1x/indigo-logo.png differ diff --git a/resources/sprite/menu_1x/rainbow-eye.png b/resources/sprite/menu_1x/rainbow-eye.png new file mode 100644 index 0000000000..4844b67fac Binary files /dev/null and b/resources/sprite/menu_1x/rainbow-eye.png differ diff --git a/resources/sprite/menu_1x/rainbow-logo.png b/resources/sprite/menu_1x/rainbow-logo.png new file mode 100644 index 0000000000..61fa756594 Binary files /dev/null and b/resources/sprite/menu_1x/rainbow-logo.png differ diff --git a/resources/sprite/menu_1x/red-eye.png b/resources/sprite/menu_1x/red-eye.png new file mode 100644 index 0000000000..e652e32e05 Binary files /dev/null and b/resources/sprite/menu_1x/red-eye.png differ diff --git a/resources/sprite/menu_1x/red-logo.png b/resources/sprite/menu_1x/red-logo.png new file mode 100644 index 0000000000..662647280e Binary files /dev/null and b/resources/sprite/menu_1x/red-logo.png differ diff --git a/resources/sprite/menu_2x/blindigo-eye.png b/resources/sprite/menu_2x/blindigo-eye.png new file mode 100644 index 0000000000..99856af5ec Binary files /dev/null and b/resources/sprite/menu_2x/blindigo-eye.png differ diff --git a/resources/sprite/menu_2x/blindigo-logo.png b/resources/sprite/menu_2x/blindigo-logo.png new file mode 100644 index 0000000000..26494bbee5 Binary files /dev/null and b/resources/sprite/menu_2x/blindigo-logo.png differ diff --git a/resources/sprite/menu_2x/blue-eye.png b/resources/sprite/menu_2x/blue-eye.png new file mode 100644 index 0000000000..d3816c1749 Binary files /dev/null and b/resources/sprite/menu_2x/blue-eye.png differ diff --git a/resources/sprite/menu_2x/blue-logo.png b/resources/sprite/menu_2x/blue-logo.png new file mode 100644 index 0000000000..574a7cce3b Binary files /dev/null and b/resources/sprite/menu_2x/blue-logo.png differ diff --git a/resources/sprite/menu_2x/eye.png b/resources/sprite/menu_2x/dark-eye.png similarity index 100% rename from resources/sprite/menu_2x/eye.png rename to resources/sprite/menu_2x/dark-eye.png diff --git a/resources/sprite/menu_2x/logo.png b/resources/sprite/menu_2x/dark-logo.png similarity index 100% rename from resources/sprite/menu_2x/logo.png rename to resources/sprite/menu_2x/dark-logo.png diff --git a/resources/sprite/menu_2x/indigo-eye.png b/resources/sprite/menu_2x/indigo-eye.png new file mode 100644 index 0000000000..28f88770fa Binary files /dev/null and b/resources/sprite/menu_2x/indigo-eye.png differ diff --git a/resources/sprite/menu_2x/indigo-logo.png b/resources/sprite/menu_2x/indigo-logo.png new file mode 100644 index 0000000000..d985edcf2d Binary files /dev/null and b/resources/sprite/menu_2x/indigo-logo.png differ diff --git a/resources/sprite/menu_2x/rainbow-eye.png b/resources/sprite/menu_2x/rainbow-eye.png new file mode 100644 index 0000000000..ad333bfb7d Binary files /dev/null and b/resources/sprite/menu_2x/rainbow-eye.png differ diff --git a/resources/sprite/menu_2x/rainbow-logo.png b/resources/sprite/menu_2x/rainbow-logo.png new file mode 100644 index 0000000000..f1ff24433a Binary files /dev/null and b/resources/sprite/menu_2x/rainbow-logo.png differ diff --git a/resources/sprite/menu_2x/red-eye.png b/resources/sprite/menu_2x/red-eye.png new file mode 100644 index 0000000000..a3e1441a7a Binary files /dev/null and b/resources/sprite/menu_2x/red-eye.png differ diff --git a/resources/sprite/menu_2x/red-logo.png b/resources/sprite/menu_2x/red-logo.png new file mode 100644 index 0000000000..49766fd38e Binary files /dev/null and b/resources/sprite/menu_2x/red-logo.png differ diff --git a/scripts/celerity/generate_sprites.php b/scripts/celerity/generate_sprites.php index 97e3f70a19..0fbdff60ab 100755 --- a/scripts/celerity/generate_sprites.php +++ b/scripts/celerity/generate_sprites.php @@ -29,7 +29,6 @@ $generator = new CeleritySpriteGenerator(); $sheets = array( 'menu' => $generator->buildMenuSheet(), 'tokens' => $generator->buildTokenSheet(), - 'main-header' => $generator->buildMainHeaderSheet(), 'login' => $generator->buildLoginSheet(), 'projects' => $generator->buildProjectsSheet(), ); diff --git a/src/applications/celerity/CeleritySpriteGenerator.php b/src/applications/celerity/CeleritySpriteGenerator.php index 10f3215d64..a3180b8d01 100644 --- a/src/applications/celerity/CeleritySpriteGenerator.php +++ b/src/applications/celerity/CeleritySpriteGenerator.php @@ -5,18 +5,28 @@ final class CeleritySpriteGenerator { public function buildMenuSheet() { $sprites = array(); - $sources = array( - 'logo' => array( + $colors = array( + 'dark', + 'red', + 'blue', + 'indigo', + 'blindigo', + 'rainbow', + ); + + $sources = array(); + foreach ($colors as $color) { + $sources[$color.'-logo'] = array( 'x' => 96, 'y' => 40, - 'css' => '.phabricator-main-menu-logo', - ), - 'eye' => array( + 'css' => '.'.$color.'-logo', + ); + $sources[$color.'-eye'] = array( 'x' => 40, 'y' => 40, - 'css' => '.phabricator-main-menu-eye', - ), - ); + 'css' => '.'.$color.'-eye', + ); + } $scales = array( '1x' => 1, @@ -144,32 +154,6 @@ final class CeleritySpriteGenerator { return $sheet; } - public function buildMainHeaderSheet() { - $gradients = $this->getDirectoryList('main_header'); - $template = new PhutilSprite(); - - $sprites = array(); - foreach ($gradients as $gradient) { - $path = $this->getPath('main_header/'.$gradient.'.png'); - $sprite = id(clone $template) - ->setName('main-header-'.$gradient) - ->setSourceFile($path) - ->setTargetCSS('.main-header-'.$gradient); - $sprite->setSourceSize(6, 44); - $sprites[] = $sprite; - } - - $sheet = $this->buildSheet('main-header', - false, - PhutilSpriteSheet::TYPE_REPEAT_X); - - foreach ($sprites as $sprite) { - $sheet->addSprite($sprite); - } - - return $sheet; - } - private function getPath($to_path = null) { $root = dirname(phutil_get_library_root('phabricator')); return $root.'/resources/sprite/'.$to_path; diff --git a/src/applications/config/option/PhabricatorUIConfigOptions.php b/src/applications/config/option/PhabricatorUIConfigOptions.php index 8b84a6b4b2..a12da52723 100644 --- a/src/applications/config/option/PhabricatorUIConfigOptions.php +++ b/src/applications/config/option/PhabricatorUIConfigOptions.php @@ -20,16 +20,18 @@ final class PhabricatorUIConfigOptions } public function getOptions() { - $manifest = PHUIIconView::getSheetManifest('main-header'); $custom_header_example = PhabricatorCustomHeaderConfigType::getExampleConfig(); $experimental_link = 'https://secure.phabricator.com/T4214'; - $options = array(); - foreach (array_keys($manifest) as $sprite_name) { - $key = substr($sprite_name, strlen('main-header-')); - $options[$key] = $key; - } + $options = array( + 'blindigo' => 'blindigo', + 'blue' => 'blue', + 'dark' => 'dark', + 'indigo' => 'indigo', + 'red' => 'red', + 'rainbow' => 'rainbow', + ); $example = << 'sprite-menu phabricator-main-menu-eye', + 'class' => 'sprite-menu phabricator-main-menu-eye '.$color.'-eye', ), ''), phutil_tag( 'span', array( - 'class' => 'sprite-menu phabricator-main-menu-logo', + 'class' => 'sprite-menu phabricator-main-menu-logo '.$color.'-logo', 'style' => $style_logo, ), ''), diff --git a/webroot/rsrc/css/sprite-main-header.css b/webroot/rsrc/css/sprite-main-header.css deleted file mode 100644 index 5df6b70074..0000000000 --- a/webroot/rsrc/css/sprite-main-header.css +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @provides sprite-main-header-css - * @generated - */ - -.sprite-main-header { - background-image: url(/rsrc/image/sprite-main-header.png); - background-repeat: repeat-x; -} - - - - -.main-header-applebloom { - background-position: 0px 0px; -} - -.main-header-blindigo { - background-position: 0px -45px; -} - -.main-header-blue { - background-position: 0px -90px; -} - -.main-header-dark { - background-position: 0px -135px; -} - -.main-header-fluttershy { - background-position: 0px -180px; -} - -.main-header-green { - background-position: 0px -225px; -} - -.main-header-indigo { - background-position: 0px -270px; -} - -.main-header-nightmaremoon { - background-position: 0px -315px; -} - -.main-header-red { - background-position: 0px -360px; -} - -.main-header-scootaloo { - background-position: 0px -405px; -} - -.main-header-yellow { - background-position: 0px -450px; -} diff --git a/webroot/rsrc/css/sprite-menu.css b/webroot/rsrc/css/sprite-menu.css index 1957d632d9..d0d4bf423a 100644 --- a/webroot/rsrc/css/sprite-menu.css +++ b/webroot/rsrc/css/sprite-menu.css @@ -13,15 +13,55 @@ only screen and (min-device-pixel-ratio: 1.5), only screen and (-webkit-min-device-pixel-ratio: 1.5) { .sprite-menu { background-image: url(/rsrc/image/sprite-menu-X2.png); - background-size: 97px 82px; + background-size: 194px 205px; } } -.phabricator-main-menu-logo { +.dark-logo { background-position: 0px 0px; } -.phabricator-main-menu-eye { +.dark-eye { + background-position: 0px -82px; +} + +.red-logo { + background-position: -97px 0px; +} + +.red-eye { + background-position: -41px -82px; +} + +.blue-logo { background-position: 0px -41px; } + +.blue-eye { + background-position: -82px -82px; +} + +.indigo-logo { + background-position: -97px -41px; +} + +.indigo-eye { + background-position: -123px -82px; +} + +.blindigo-logo { + background-position: 0px -123px; +} + +.blindigo-eye { + background-position: -97px -123px; +} + +.rainbow-logo { + background-position: 0px -164px; +} + +.rainbow-eye { + background-position: -97px -164px; +} diff --git a/webroot/rsrc/image/sprite-main-header.png b/webroot/rsrc/image/sprite-main-header.png deleted file mode 100644 index 998a723bda..0000000000 Binary files a/webroot/rsrc/image/sprite-main-header.png and /dev/null differ diff --git a/webroot/rsrc/image/sprite-menu-X2.png b/webroot/rsrc/image/sprite-menu-X2.png index 15e28f1df1..ce0361e111 100644 Binary files a/webroot/rsrc/image/sprite-menu-X2.png and b/webroot/rsrc/image/sprite-menu-X2.png differ diff --git a/webroot/rsrc/image/sprite-menu.png b/webroot/rsrc/image/sprite-menu.png index e9dc9fea91..770ae4589f 100644 Binary files a/webroot/rsrc/image/sprite-menu.png and b/webroot/rsrc/image/sprite-menu.png differ