diff --git a/.gitignore b/.gitignore
index 08287579ff..9c20fc658f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,6 @@
# Arcanist scratch directory
/.arc
+
+# Custom Logo File
+/webroot/rsrc/image/custom/custom.png
diff --git a/conf/default.conf.php b/conf/default.conf.php
index abbdb7bf2e..5759262487 100644
--- a/conf/default.conf.php
+++ b/conf/default.conf.php
@@ -60,6 +60,15 @@ return array(
'security.hmac-key' => '[D\t~Y7eNmnQGJ;rnH6aF;m2!vJ8@v8C=Cs:aQS\.Qw',
+// -- Customization --------------------------------------------------------- //
+
+ // If you want to use a custom logo (e.g., for your company or organization),
+ // copy 'webroot/rsrc/image/custom/example_template.png' to
+ // 'webroot/rsrc/image/custom/custom.png' and set this to the URI you want it
+ // to link to (like http://www.yourcompany.com/).
+ 'phabricator.custom.logo' => null,
+
+
// -- DarkConsole ----------------------------------------------------------- //
// DarkConsole is a administrative debugging/profiling tool built into
diff --git a/src/view/page/standard/PhabricatorStandardPageView.php b/src/view/page/standard/PhabricatorStandardPageView.php
index f4903b059c..7ebecc28f2 100644
--- a/src/view/page/standard/PhabricatorStandardPageView.php
+++ b/src/view/page/standard/PhabricatorStandardPageView.php
@@ -356,13 +356,30 @@ final class PhabricatorStandardPageView extends AphrontPageView {
$admin_class = 'phabricator-admin-page-view';
}
+ $custom_logo = null;
+ $with_custom = null;
+ $custom_conf = PhabricatorEnv::getEnvConfig('phabricator.custom.logo');
+ if ($custom_conf) {
+ $with_custom = 'phabricator-logo-with-custom';
+ $custom_logo = phutil_render_tag(
+ 'a',
+ array(
+ 'class' => 'logo-custom',
+ 'href' => $custom_conf,
+ ),
+ ' ');
+ }
+
$header_chrome = null;
$footer_chrome = null;
if ($this->getShowChrome()) {
$header_chrome =
'
'.
''.
- ' | '.
+ ''.
+ $custom_logo.
+ ' '.
+ ' | '.
''.
''.
''.
diff --git a/webroot/rsrc/css/application/base/standard-page-view.css b/webroot/rsrc/css/application/base/standard-page-view.css
index 5521ccc59a..a7e851b5d7 100644
--- a/webroot/rsrc/css/application/base/standard-page-view.css
+++ b/webroot/rsrc/css/application/base/standard-page-view.css
@@ -53,15 +53,38 @@
width: 220px;
}
+.phabricator-logo-with-custom {
+ width: 440px;
+}
+
.phabricator-logo a {
display: block;
width: 220px;
height: 40px;
- background: url('/rsrc/image/phabricator_logo.png') no-repeat 0 0;
padding: 0;
margin: 0;
}
+.phabricator-logo a.logo-custom {
+ position: absolute;
+ background: url(/rsrc/image/custom/custom.png) no-repeat 0 0;
+}
+
+.phabricator-logo a.logo-standard {
+ background: url(/rsrc/image/phabricator_logo.png) no-repeat 0 0;
+ background-position-left: 220px;
+}
+
+.phabricator-admin-page-view .phabricator-logo a.logo-standard {
+ background-image: url(/rsrc/image/phabricator_logo_admin.png);
+}
+
+.phabricator-logo-with-custom a.logo-standard {
+ padding-left: 220px;
+ background-position-left: 0;
+}
+
+
.phabricator-logo a:hover {
background-position: 0 -40px;
}
@@ -108,10 +131,6 @@ td.phabricator-login-details {
background: #cc3333;
}
-.phabricator-admin-page-view .phabricator-logo a {
- background-image: url('/rsrc/image/phabricator_logo_admin.png');
-}
-
.keyboard-shortcut-help td,
.keyboard-shortcut-help th {
padding: 8px;
diff --git a/webroot/rsrc/image/custom/README b/webroot/rsrc/image/custom/README
new file mode 100644
index 0000000000..bab43c10c9
--- /dev/null
+++ b/webroot/rsrc/image/custom/README
@@ -0,0 +1,3 @@
+To customize your Phabricator install's appearance, create a 240x80 PNG like
+the examples in this folder, name it "custom.png" in this folder, and then set
+'phabricator.custom.logo' to a link URI.
diff --git a/webroot/rsrc/image/custom/example_facebook.png b/webroot/rsrc/image/custom/example_facebook.png
new file mode 100644
index 0000000000..02bd95ec9b
Binary files /dev/null and b/webroot/rsrc/image/custom/example_facebook.png differ
diff --git a/webroot/rsrc/image/custom/example_rainbow.png b/webroot/rsrc/image/custom/example_rainbow.png
new file mode 100644
index 0000000000..1cd8ab464d
Binary files /dev/null and b/webroot/rsrc/image/custom/example_rainbow.png differ
diff --git a/webroot/rsrc/image/custom/example_template.png b/webroot/rsrc/image/custom/example_template.png
new file mode 100644
index 0000000000..0b29e3ada9
Binary files /dev/null and b/webroot/rsrc/image/custom/example_template.png differ
diff --git a/webroot/rsrc/image/phabricator_logo.png b/webroot/rsrc/image/phabricator_logo.png
index a491a6055d..b758a0e7dd 100644
Binary files a/webroot/rsrc/image/phabricator_logo.png and b/webroot/rsrc/image/phabricator_logo.png differ
diff --git a/webroot/rsrc/image/phabricator_logo_admin.png b/webroot/rsrc/image/phabricator_logo_admin.png
index 235cbaec3e..4ac978153b 100644
Binary files a/webroot/rsrc/image/phabricator_logo_admin.png and b/webroot/rsrc/image/phabricator_logo_admin.png differ
|