@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Multicolor headers

Summary: This adds a handful of 'Main Header' colors to change the look of Phabricator very slightly. I know I would probably set my dev header to a different color.

Test Plan: Tested each css class and color, can add more in the future.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7731

+229 -59
resources/sprite/main_header/applebloom.png

This is a binary file and will not be displayed.

resources/sprite/main_header/blue.png

This is a binary file and will not be displayed.

resources/sprite/main_header/dark.png

This is a binary file and will not be displayed.

resources/sprite/main_header/fluttershy.png

This is a binary file and will not be displayed.

resources/sprite/main_header/green.png

This is a binary file and will not be displayed.

resources/sprite/main_header/nightmaremoon.png

This is a binary file and will not be displayed.

resources/sprite/main_header/red.png

This is a binary file and will not be displayed.

resources/sprite/main_header/scootaloo.png

This is a binary file and will not be displayed.

resources/sprite/main_header/yellow.png

This is a binary file and will not be displayed.

+55
resources/sprite/manifest/main-header.json
··· 1 + { 2 + "version" : 1, 3 + "sprites" : { 4 + "main-header-applebloom" : { 5 + "name" : "main-header-applebloom", 6 + "rule" : ".main-header-applebloom", 7 + "hash" : "64822776b129e724709983db1ac5a712" 8 + }, 9 + "main-header-blue" : { 10 + "name" : "main-header-blue", 11 + "rule" : ".main-header-blue", 12 + "hash" : "b5dd317b7bd35e0592b3f4b66267437c" 13 + }, 14 + "main-header-dark" : { 15 + "name" : "main-header-dark", 16 + "rule" : ".main-header-dark", 17 + "hash" : "817815d84c0c935b4875f6ecc7dbb526" 18 + }, 19 + "main-header-fluttershy" : { 20 + "name" : "main-header-fluttershy", 21 + "rule" : ".main-header-fluttershy", 22 + "hash" : "55d4e9f813cf354693290105cf83cf78" 23 + }, 24 + "main-header-green" : { 25 + "name" : "main-header-green", 26 + "rule" : ".main-header-green", 27 + "hash" : "c230f09e307d167fab3ea0d8c3b33755" 28 + }, 29 + "main-header-nightmaremoon" : { 30 + "name" : "main-header-nightmaremoon", 31 + "rule" : ".main-header-nightmaremoon", 32 + "hash" : "9e7cc7b18d2132d2dd47586ba0cd6400" 33 + }, 34 + "main-header-red" : { 35 + "name" : "main-header-red", 36 + "rule" : ".main-header-red", 37 + "hash" : "3f12cc098afddb8e6c830ef761dcaa61" 38 + }, 39 + "main-header-scootaloo" : { 40 + "name" : "main-header-scootaloo", 41 + "rule" : ".main-header-scootaloo", 42 + "hash" : "8cedc359dccab1bbd49cbc69940f566a" 43 + }, 44 + "main-header-yellow" : { 45 + "name" : "main-header-yellow", 46 + "rule" : ".main-header-yellow", 47 + "hash" : "d920e70a6d2662cfb83e1d7e4b4000fd" 48 + } 49 + }, 50 + "scales" : [ 51 + 1 52 + ], 53 + "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", 54 + "type" : "repeat-x" 55 + }
+1
scripts/celerity/generate_sprites.php
··· 38 38 'tokens' => $generator->buildTokenSheet(), 39 39 'docs' => $generator->buildDocsSheet(), 40 40 'gradient' => $generator->buildGradientSheet(), 41 + 'main-header' => $generator->buildMainHeaderSheet(), 41 42 'login' => $generator->buildLoginSheet(), 42 43 'status' => $generator->buildStatusSheet(), 43 44 'projects' => $generator->buildProjectsSheet(),
+69 -46
src/__celerity_resource_map__.php
··· 546 546 'disk' => '/rsrc/image/phrequent_inactive.png', 547 547 'type' => 'png', 548 548 ), 549 + '/rsrc/image/search-white.png' => 550 + array( 551 + 'hash' => '5d5236170c4097fa7e7cbb32e737c9d8', 552 + 'uri' => '/res/5d523617/rsrc/image/search-white.png', 553 + 'disk' => '/rsrc/image/search-white.png', 554 + 'type' => 'png', 555 + ), 549 556 '/rsrc/image/search.png' => 550 557 array( 551 558 'hash' => 'ff7da044e6f923b8f569dec11f97e5e5', ··· 663 670 'hash' => '7d3eee260ee0beb90c12e26fbc48fd9c', 664 671 'uri' => '/res/7d3eee26/rsrc/image/sprite-login.png', 665 672 'disk' => '/rsrc/image/sprite-login.png', 673 + 'type' => 'png', 674 + ), 675 + '/rsrc/image/sprite-main-header.png' => 676 + array( 677 + 'hash' => 'a00aa3b33178899d6bd7979b475ae559', 678 + 'uri' => '/res/a00aa3b3/rsrc/image/sprite-main-header.png', 679 + 'disk' => '/rsrc/image/sprite-main-header.png', 666 680 'type' => 'png', 667 681 ), 668 682 '/rsrc/image/sprite-menu-X2.png' => ··· 3367 3381 ), 3368 3382 'phabricator-main-menu-view' => 3369 3383 array( 3370 - 'uri' => '/res/95ff522a/rsrc/css/application/base/main-menu-view.css', 3384 + 'uri' => '/res/44456bed/rsrc/css/application/base/main-menu-view.css', 3371 3385 'type' => 'css', 3372 3386 'requires' => 3373 3387 array( ··· 4268 4282 ), 4269 4283 'disk' => '/rsrc/css/sprite-login.css', 4270 4284 ), 4285 + 'sprite-main-header-css' => 4286 + array( 4287 + 'uri' => '/res/b788fd75/rsrc/css/sprite-main-header.css', 4288 + 'type' => 'css', 4289 + 'requires' => 4290 + array( 4291 + ), 4292 + 'disk' => '/rsrc/css/sprite-main-header.css', 4293 + ), 4271 4294 'sprite-menu-css' => 4272 4295 array( 4273 4296 'uri' => '/res/764ab039/rsrc/css/sprite-menu.css', ··· 4343 4366 ), array( 4344 4367 'packages' => 4345 4368 array( 4346 - '152ef0e5' => 4369 + '33d9080b' => 4347 4370 array( 4348 4371 'name' => 'core.pkg.css', 4349 4372 'symbols' => ··· 4392 4415 41 => 'phabricator-tag-view-css', 4393 4416 42 => 'phui-list-view-css', 4394 4417 ), 4395 - 'uri' => '/res/pkg/152ef0e5/core.pkg.css', 4418 + 'uri' => '/res/pkg/33d9080b/core.pkg.css', 4396 4419 'type' => 'css', 4397 4420 ), 4398 4421 '2c1dba03' => ··· 4584 4607 ), 4585 4608 'reverse' => 4586 4609 array( 4587 - 'aphront-dialog-view-css' => '152ef0e5', 4588 - 'aphront-error-view-css' => '152ef0e5', 4589 - 'aphront-list-filter-view-css' => '152ef0e5', 4590 - 'aphront-pager-view-css' => '152ef0e5', 4591 - 'aphront-panel-view-css' => '152ef0e5', 4592 - 'aphront-table-view-css' => '152ef0e5', 4593 - 'aphront-tokenizer-control-css' => '152ef0e5', 4594 - 'aphront-tooltip-css' => '152ef0e5', 4595 - 'aphront-typeahead-control-css' => '152ef0e5', 4610 + 'aphront-dialog-view-css' => '33d9080b', 4611 + 'aphront-error-view-css' => '33d9080b', 4612 + 'aphront-list-filter-view-css' => '33d9080b', 4613 + 'aphront-pager-view-css' => '33d9080b', 4614 + 'aphront-panel-view-css' => '33d9080b', 4615 + 'aphront-table-view-css' => '33d9080b', 4616 + 'aphront-tokenizer-control-css' => '33d9080b', 4617 + 'aphront-tooltip-css' => '33d9080b', 4618 + 'aphront-typeahead-control-css' => '33d9080b', 4596 4619 'differential-changeset-view-css' => '67248472', 4597 4620 'differential-core-view-css' => '67248472', 4598 4621 'differential-inline-comment-editor' => '92f459f0', ··· 4606 4629 'differential-table-of-contents-css' => '67248472', 4607 4630 'diffusion-commit-view-css' => '7aa115b4', 4608 4631 'diffusion-icons-css' => '7aa115b4', 4609 - 'global-drag-and-drop-css' => '152ef0e5', 4632 + 'global-drag-and-drop-css' => '33d9080b', 4610 4633 'inline-comment-summary-css' => '67248472', 4611 4634 'javelin-aphlict' => '2c1dba03', 4612 4635 'javelin-behavior' => '3e3be199', ··· 4681 4704 'javelin-util' => '3e3be199', 4682 4705 'javelin-vector' => '3e3be199', 4683 4706 'javelin-workflow' => '3e3be199', 4684 - 'lightbox-attachment-css' => '152ef0e5', 4707 + 'lightbox-attachment-css' => '33d9080b', 4685 4708 'maniphest-task-summary-css' => '49898640', 4686 - 'phabricator-action-list-view-css' => '152ef0e5', 4687 - 'phabricator-application-launch-view-css' => '152ef0e5', 4709 + 'phabricator-action-list-view-css' => '33d9080b', 4710 + 'phabricator-application-launch-view-css' => '33d9080b', 4688 4711 'phabricator-busy' => '2c1dba03', 4689 4712 'phabricator-content-source-view-css' => '67248472', 4690 - 'phabricator-core-css' => '152ef0e5', 4691 - 'phabricator-crumbs-view-css' => '152ef0e5', 4713 + 'phabricator-core-css' => '33d9080b', 4714 + 'phabricator-crumbs-view-css' => '33d9080b', 4692 4715 'phabricator-drag-and-drop-file-upload' => '92f459f0', 4693 4716 'phabricator-dropdown-menu' => '2c1dba03', 4694 4717 'phabricator-file-upload' => '2c1dba03', 4695 - 'phabricator-filetree-view-css' => '152ef0e5', 4696 - 'phabricator-flag-css' => '152ef0e5', 4718 + 'phabricator-filetree-view-css' => '33d9080b', 4719 + 'phabricator-flag-css' => '33d9080b', 4697 4720 'phabricator-hovercard' => '2c1dba03', 4698 - 'phabricator-jump-nav' => '152ef0e5', 4721 + 'phabricator-jump-nav' => '33d9080b', 4699 4722 'phabricator-keyboard-shortcut' => '2c1dba03', 4700 4723 'phabricator-keyboard-shortcut-manager' => '2c1dba03', 4701 - 'phabricator-main-menu-view' => '152ef0e5', 4724 + 'phabricator-main-menu-view' => '33d9080b', 4702 4725 'phabricator-menu-item' => '2c1dba03', 4703 - 'phabricator-nav-view-css' => '152ef0e5', 4726 + 'phabricator-nav-view-css' => '33d9080b', 4704 4727 'phabricator-notification' => '2c1dba03', 4705 - 'phabricator-notification-css' => '152ef0e5', 4706 - 'phabricator-notification-menu-css' => '152ef0e5', 4728 + 'phabricator-notification-css' => '33d9080b', 4729 + 'phabricator-notification-menu-css' => '33d9080b', 4707 4730 'phabricator-object-selector-css' => '67248472', 4708 4731 'phabricator-phtize' => '2c1dba03', 4709 4732 'phabricator-prefab' => '2c1dba03', 4710 4733 'phabricator-project-tag-css' => '49898640', 4711 - 'phabricator-remarkup-css' => '152ef0e5', 4734 + 'phabricator-remarkup-css' => '33d9080b', 4712 4735 'phabricator-shaped-request' => '92f459f0', 4713 - 'phabricator-side-menu-view-css' => '152ef0e5', 4714 - 'phabricator-standard-page-view' => '152ef0e5', 4715 - 'phabricator-tag-view-css' => '152ef0e5', 4736 + 'phabricator-side-menu-view-css' => '33d9080b', 4737 + 'phabricator-standard-page-view' => '33d9080b', 4738 + 'phabricator-tag-view-css' => '33d9080b', 4716 4739 'phabricator-textareautils' => '2c1dba03', 4717 4740 'phabricator-tooltip' => '2c1dba03', 4718 - 'phabricator-transaction-view-css' => '152ef0e5', 4719 - 'phabricator-zindex-css' => '152ef0e5', 4720 - 'phui-button-css' => '152ef0e5', 4721 - 'phui-form-css' => '152ef0e5', 4722 - 'phui-form-view-css' => '152ef0e5', 4723 - 'phui-header-view-css' => '152ef0e5', 4724 - 'phui-icon-view-css' => '152ef0e5', 4725 - 'phui-list-view-css' => '152ef0e5', 4726 - 'phui-object-item-list-view-css' => '152ef0e5', 4727 - 'phui-property-list-view-css' => '152ef0e5', 4728 - 'phui-spacing-css' => '152ef0e5', 4729 - 'sprite-apps-large-css' => '152ef0e5', 4730 - 'sprite-gradient-css' => '152ef0e5', 4731 - 'sprite-icons-css' => '152ef0e5', 4732 - 'sprite-menu-css' => '152ef0e5', 4733 - 'sprite-status-css' => '152ef0e5', 4734 - 'syntax-highlighting-css' => '152ef0e5', 4741 + 'phabricator-transaction-view-css' => '33d9080b', 4742 + 'phabricator-zindex-css' => '33d9080b', 4743 + 'phui-button-css' => '33d9080b', 4744 + 'phui-form-css' => '33d9080b', 4745 + 'phui-form-view-css' => '33d9080b', 4746 + 'phui-header-view-css' => '33d9080b', 4747 + 'phui-icon-view-css' => '33d9080b', 4748 + 'phui-list-view-css' => '33d9080b', 4749 + 'phui-object-item-list-view-css' => '33d9080b', 4750 + 'phui-property-list-view-css' => '33d9080b', 4751 + 'phui-spacing-css' => '33d9080b', 4752 + 'sprite-apps-large-css' => '33d9080b', 4753 + 'sprite-gradient-css' => '33d9080b', 4754 + 'sprite-icons-css' => '33d9080b', 4755 + 'sprite-menu-css' => '33d9080b', 4756 + 'sprite-status-css' => '33d9080b', 4757 + 'syntax-highlighting-css' => '33d9080b', 4735 4758 ), 4736 4759 ));
+27
src/infrastructure/celerity/CeleritySpriteGenerator.php
··· 615 615 return $sheet; 616 616 } 617 617 618 + public function buildMainHeaderSheet() { 619 + $gradients = $this->getDirectoryList('main_header'); 620 + $template = new PhutilSprite(); 621 + 622 + $sprites = array(); 623 + foreach ($gradients as $gradient) { 624 + $path = $this->getPath('main_header/'.$gradient.'.png'); 625 + $sprite = id(clone $template) 626 + ->setName('main-header-'.$gradient) 627 + ->setSourceFile($path) 628 + ->setTargetCSS('.main-header-'.$gradient); 629 + $sprite->setSourceSize(6, 44); 630 + $sprites[] = $sprite; 631 + } 632 + 633 + $sheet = $this->buildSheet('main-header', 634 + false, 635 + PhutilSpriteSheet::TYPE_REPEAT_X); 636 + 637 + foreach ($sprites as $sprite) { 638 + $sheet->addSprite($sprite); 639 + } 640 + 641 + return $sheet; 642 + } 643 + 644 + 618 645 public function buildAppsSheet() { 619 646 return $this->buildAppsSheetVariant(1); 620 647 }
+10 -2
src/view/page/menu/PhabricatorMainMenuView.php
··· 37 37 $user = $this->user; 38 38 39 39 require_celerity_resource('phabricator-main-menu-view'); 40 + require_celerity_resource('sprite-main-header-css'); 40 41 41 42 $header_id = celerity_generate_unique_node_id(); 42 43 $menus = array(); ··· 64 65 } 65 66 66 67 $application_menu = $this->renderApplicationMenu(); 68 + $classes = array(); 69 + $classes[] = 'phabricator-main-menu'; 70 + $classes[] = 'sprite-main-header'; 71 + // TODO: Let admins or users set header 72 + $classes[] = 'main-header-dark'; 67 73 68 74 return phutil_tag( 69 75 'div', 70 76 array( 71 - 'class' => 'phabricator-main-menu', 77 + 'class' => implode(' ', $classes), 72 78 'id' => $header_id, 73 79 ), 74 80 array( ··· 227 233 } 228 234 229 235 private function renderPhabricatorLogo() { 236 + $class = 'phabricator-main-menu-logo-image'; 237 + 230 238 return phutil_tag( 231 239 'a', 232 240 array( ··· 236 244 phutil_tag( 237 245 'span', 238 246 array( 239 - 'class' => 'sprite-menu phabricator-main-menu-logo-image', 247 + 'class' => 'sprite-menu menu-logo-image '.$class, 240 248 ), 241 249 '')); 242 250 }
+19 -11
webroot/rsrc/css/application/base/main-menu-view.css
··· 12 12 13 13 .phabricator-main-menu { 14 14 background: #2d3236; 15 - background-image: url(/rsrc/image/texture/phlnx-bg.png); 16 15 background-repeat: repeat-x; 17 16 position: relative; 18 17 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25); ··· 49 48 padding-left: 6px; 50 49 } 51 50 52 - .device-desktop .phabricator-main-menu-logo:hover { 53 - background-color: rgba(0,0,0,.6); 54 - } 55 - 56 - .phabricator-main-menu-logo-image { 51 + .menu-logo-image { 57 52 position: absolute; 58 53 width: 149px; 59 54 height: 26px; ··· 146 141 font-size: 13px; 147 142 border: 1px solid #333; 148 143 border-radius: 12px; 149 - background-color: #555; 144 + background-color: #222; 145 + opacity: .8; 150 146 height: 26px; 151 147 line-height: 12px; 152 148 box-shadow: 0px 1px 1px rgba(128, 128, 128, 0.25); 153 149 padding: 6px 32px 6px 10px; 154 150 } 155 151 152 + .phabricator-main-menu.main-header-dark .phabricator-main-menu-search input { 153 + background-color: #555; 154 + } 155 + 156 156 .device .phabricator-main-menu-search input { 157 157 height: 30px; 158 158 font-size: 15px; ··· 161 161 162 162 .phabricator-main-menu .phabricator-main-menu-search input:focus { 163 163 background: #fff; 164 + opacity: 1; 164 165 color: #333; 165 166 border-color: #e7e7e7; 166 167 box-shadow: none; ··· 169 170 } 170 171 171 172 .phabricator-main-menu-search input.jx-typeahead-placeholder { 172 - color: {$lightgreytext}; 173 + color: #fff; 173 174 } 174 175 175 176 .phabricator-main-menu-search button { 176 177 position: absolute; 177 178 color: transparent; 178 - background: transparent 5px 6px url(/rsrc/image/search.png) no-repeat; 179 + background: transparent 5px 6px url(/rsrc/image/search-white.png) no-repeat; 179 180 border: none; 180 181 outline: none; 181 182 box-shadow: none; ··· 353 354 display: block; 354 355 } 355 356 357 + .device-desktop .main-header-dark .phabricator-application-menu 358 + .core-menu-item.phui-list-item-view:hover, 359 + .device-desktop .main-header-dark .phabricator-main-menu-logo:hover { 360 + background-color: rgba(0,0,0,.6); 361 + } 362 + 356 363 .device-desktop .phabricator-application-menu 357 - .core-menu-item.phui-list-item-view:hover { 358 - background-color: rgba(0,0,0,.6); 364 + .core-menu-item.phui-list-item-view:hover, 365 + .device-desktop .phabricator-main-menu-logo:hover { 366 + background-color: rgba(0,0,0,.3); 359 367 } 360 368 361 369 .device-desktop .phabricator-application-menu .phui-list-item-view {
+48
webroot/rsrc/css/sprite-main-header.css
··· 1 + /** 2 + * @provides sprite-main-header-css 3 + * @generated 4 + */ 5 + 6 + .sprite-main-header { 7 + background-image: url(/rsrc/image/sprite-main-header.png); 8 + background-repeat: repeat-x; 9 + } 10 + 11 + 12 + 13 + 14 + .main-header-applebloom { 15 + background-position: 0px 0px; 16 + } 17 + 18 + .main-header-blue { 19 + background-position: 0px -45px; 20 + } 21 + 22 + .main-header-dark { 23 + background-position: 0px -90px; 24 + } 25 + 26 + .main-header-fluttershy { 27 + background-position: 0px -135px; 28 + } 29 + 30 + .main-header-green { 31 + background-position: 0px -180px; 32 + } 33 + 34 + .main-header-nightmaremoon { 35 + background-position: 0px -225px; 36 + } 37 + 38 + .main-header-red { 39 + background-position: 0px -270px; 40 + } 41 + 42 + .main-header-scootaloo { 43 + background-position: 0px -315px; 44 + } 45 + 46 + .main-header-yellow { 47 + background-position: 0px -360px; 48 + }
webroot/rsrc/image/search-white.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-main-header.png

This is a binary file and will not be displayed.