diff --git a/resources/sprite/login_1x/Amazon.png b/resources/sprite/login_1x/Amazon.png new file mode 100644 index 0000000000..1b70b07863 Binary files /dev/null and b/resources/sprite/login_1x/Amazon.png differ diff --git a/resources/sprite/login_1x/Asana.png b/resources/sprite/login_1x/Asana.png new file mode 100644 index 0000000000..812ef52f7d Binary files /dev/null and b/resources/sprite/login_1x/Asana.png differ diff --git a/resources/sprite/login_1x/Disqus.png b/resources/sprite/login_1x/Disqus.png new file mode 100644 index 0000000000..0c6b7a1095 Binary files /dev/null and b/resources/sprite/login_1x/Disqus.png differ diff --git a/resources/sprite/login_1x/Dropbox.png b/resources/sprite/login_1x/Dropbox.png new file mode 100644 index 0000000000..dd5c24764c Binary files /dev/null and b/resources/sprite/login_1x/Dropbox.png differ diff --git a/resources/sprite/login_1x/Facebook.png b/resources/sprite/login_1x/Facebook.png new file mode 100644 index 0000000000..252a018177 Binary files /dev/null and b/resources/sprite/login_1x/Facebook.png differ diff --git a/resources/sprite/login_1x/Generic.png b/resources/sprite/login_1x/Generic.png new file mode 100644 index 0000000000..21963932f7 Binary files /dev/null and b/resources/sprite/login_1x/Generic.png differ diff --git a/resources/sprite/login_1x/Github.png b/resources/sprite/login_1x/Github.png new file mode 100644 index 0000000000..c7dfa948ee Binary files /dev/null and b/resources/sprite/login_1x/Github.png differ diff --git a/resources/sprite/login_1x/Google.png b/resources/sprite/login_1x/Google.png new file mode 100644 index 0000000000..bad6db7fcb Binary files /dev/null and b/resources/sprite/login_1x/Google.png differ diff --git a/resources/sprite/login_1x/HTTP.png b/resources/sprite/login_1x/HTTP.png new file mode 100644 index 0000000000..22c1fcedb9 Binary files /dev/null and b/resources/sprite/login_1x/HTTP.png differ diff --git a/resources/sprite/login_1x/LDAP.png b/resources/sprite/login_1x/LDAP.png new file mode 100644 index 0000000000..1abc9e8e47 Binary files /dev/null and b/resources/sprite/login_1x/LDAP.png differ diff --git a/resources/sprite/login_1x/Linkedin.png b/resources/sprite/login_1x/Linkedin.png new file mode 100644 index 0000000000..3ef9daa9c0 Binary files /dev/null and b/resources/sprite/login_1x/Linkedin.png differ diff --git a/resources/sprite/login_1x/Openid.png b/resources/sprite/login_1x/Openid.png new file mode 100644 index 0000000000..71571c35aa Binary files /dev/null and b/resources/sprite/login_1x/Openid.png differ diff --git a/resources/sprite/login_1x/Phabricator.png b/resources/sprite/login_1x/Phabricator.png new file mode 100644 index 0000000000..865a4866b6 Binary files /dev/null and b/resources/sprite/login_1x/Phabricator.png differ diff --git a/resources/sprite/login_1x/Twitter.png b/resources/sprite/login_1x/Twitter.png new file mode 100644 index 0000000000..f57645b166 Binary files /dev/null and b/resources/sprite/login_1x/Twitter.png differ diff --git a/resources/sprite/login_1x/Yahoo.png b/resources/sprite/login_1x/Yahoo.png new file mode 100644 index 0000000000..51703e34e3 Binary files /dev/null and b/resources/sprite/login_1x/Yahoo.png differ diff --git a/resources/sprite/login_2x/Amazon.png b/resources/sprite/login_2x/Amazon.png new file mode 100644 index 0000000000..db0ddbca45 Binary files /dev/null and b/resources/sprite/login_2x/Amazon.png differ diff --git a/resources/sprite/login_2x/Asana.png b/resources/sprite/login_2x/Asana.png new file mode 100644 index 0000000000..36cae4b6d1 Binary files /dev/null and b/resources/sprite/login_2x/Asana.png differ diff --git a/resources/sprite/login_2x/Disqus.png b/resources/sprite/login_2x/Disqus.png new file mode 100644 index 0000000000..c4ad2a7a1c Binary files /dev/null and b/resources/sprite/login_2x/Disqus.png differ diff --git a/resources/sprite/login_2x/Dropbox.png b/resources/sprite/login_2x/Dropbox.png new file mode 100644 index 0000000000..81105f70a8 Binary files /dev/null and b/resources/sprite/login_2x/Dropbox.png differ diff --git a/resources/sprite/login_2x/Facebook.png b/resources/sprite/login_2x/Facebook.png new file mode 100644 index 0000000000..11ed70826d Binary files /dev/null and b/resources/sprite/login_2x/Facebook.png differ diff --git a/resources/sprite/login_2x/Generic.png b/resources/sprite/login_2x/Generic.png new file mode 100644 index 0000000000..49e4af00dc Binary files /dev/null and b/resources/sprite/login_2x/Generic.png differ diff --git a/resources/sprite/login_2x/Github.png b/resources/sprite/login_2x/Github.png new file mode 100644 index 0000000000..414a1f8f01 Binary files /dev/null and b/resources/sprite/login_2x/Github.png differ diff --git a/resources/sprite/login_2x/Google.png b/resources/sprite/login_2x/Google.png new file mode 100644 index 0000000000..8f0820ba8e Binary files /dev/null and b/resources/sprite/login_2x/Google.png differ diff --git a/resources/sprite/login_2x/HTTP.png b/resources/sprite/login_2x/HTTP.png new file mode 100644 index 0000000000..0dee976db1 Binary files /dev/null and b/resources/sprite/login_2x/HTTP.png differ diff --git a/resources/sprite/login_2x/LDAP.png b/resources/sprite/login_2x/LDAP.png new file mode 100644 index 0000000000..060cab2ab2 Binary files /dev/null and b/resources/sprite/login_2x/LDAP.png differ diff --git a/resources/sprite/login_2x/Linkedin.png b/resources/sprite/login_2x/Linkedin.png new file mode 100644 index 0000000000..e8acef97ca Binary files /dev/null and b/resources/sprite/login_2x/Linkedin.png differ diff --git a/resources/sprite/login_2x/Openid.png b/resources/sprite/login_2x/Openid.png new file mode 100644 index 0000000000..cd3b04d999 Binary files /dev/null and b/resources/sprite/login_2x/Openid.png differ diff --git a/resources/sprite/login_2x/Phabricator.png b/resources/sprite/login_2x/Phabricator.png new file mode 100644 index 0000000000..e3c92532a9 Binary files /dev/null and b/resources/sprite/login_2x/Phabricator.png differ diff --git a/resources/sprite/login_2x/Twitter.png b/resources/sprite/login_2x/Twitter.png new file mode 100644 index 0000000000..7f3b1ebe6e Binary files /dev/null and b/resources/sprite/login_2x/Twitter.png differ diff --git a/resources/sprite/login_2x/Yahoo.png b/resources/sprite/login_2x/Yahoo.png new file mode 100644 index 0000000000..511742369d Binary files /dev/null and b/resources/sprite/login_2x/Yahoo.png differ diff --git a/resources/sprite/manifest/login.json b/resources/sprite/manifest/login.json new file mode 100644 index 0000000000..03516e3486 --- /dev/null +++ b/resources/sprite/manifest/login.json @@ -0,0 +1,86 @@ +{ + "version" : 1, + "sprites" : { + "login_Amazon" : { + "name" : "login_Amazon", + "rule" : ".login_Amazon", + "hash" : "5961e41c525ef46c88558616fcf23272" + }, + "login_Asana" : { + "name" : "login_Asana", + "rule" : ".login_Asana", + "hash" : "30df492eab339fa64c9ae9b21bb46a18" + }, + "login_Disqus" : { + "name" : "login_Disqus", + "rule" : ".login_Disqus", + "hash" : "5f46ac50a5d9d13245971c298f49e13b" + }, + "login_Dropbox" : { + "name" : "login_Dropbox", + "rule" : ".login_Dropbox", + "hash" : "572ab36301762414365b68c0bc185ac5" + }, + "login_Facebook" : { + "name" : "login_Facebook", + "rule" : ".login_Facebook", + "hash" : "2b1511f5b4d12076dd9086d1bb187b28" + }, + "login_Generic" : { + "name" : "login_Generic", + "rule" : ".login_Generic", + "hash" : "60d75c38668ffd6eea91a40e66186601" + }, + "login_Github" : { + "name" : "login_Github", + "rule" : ".login_Github", + "hash" : "633696beb8c1eaac642ce4955be917d8" + }, + "login_Google" : { + "name" : "login_Google", + "rule" : ".login_Google", + "hash" : "b7d3962a31df1e6c13e0a3c97c08f11d" + }, + "login_HTTP" : { + "name" : "login_HTTP", + "rule" : ".login_HTTP", + "hash" : "6fcf0f666c0f6f1e1cd8f397b41ed176" + }, + "login_LDAP" : { + "name" : "login_LDAP", + "rule" : ".login_LDAP", + "hash" : "5b4e01ddf35cd40c8f061c90abc89b6c" + }, + "login_Linkedin" : { + "name" : "login_Linkedin", + "rule" : ".login_Linkedin", + "hash" : "0dd89825046fa4fd0fe402aa2cd55fd1" + }, + "login_Openid" : { + "name" : "login_Openid", + "rule" : ".login_Openid", + "hash" : "9267ffbb8d4e6dee409c4d8fa2d50c0a" + }, + "login_Phabricator" : { + "name" : "login_Phabricator", + "rule" : ".login_Phabricator", + "hash" : "fad258eb347a1ccf5800b0ee2d8e6e49" + }, + "login_Twitter" : { + "name" : "login_Twitter", + "rule" : ".login_Twitter", + "hash" : "0b64983507a720b365474b778a966bab" + }, + "login_Yahoo" : { + "name" : "login_Yahoo", + "rule" : ".login_Yahoo", + "hash" : "1cc6fceee294045fe6d1c1d3aa31d2c1" + } + }, + "scales" : [ + 1, + 2 + ], + "header" : "\/**\n * @provides sprite-login-css\n * @generated\n *\/\n\n.sprite-login {\n background-image: url(\/rsrc\/image\/sprite-login.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) {\n .sprite-login {\n background-image: url(\/rsrc\/image\/sprite-login-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n", + "type" : "standard" +} diff --git a/scripts/celerity/generate_sprites.php b/scripts/celerity/generate_sprites.php index 2eb0b08033..b2081a0af2 100755 --- a/scripts/celerity/generate_sprites.php +++ b/scripts/celerity/generate_sprites.php @@ -38,6 +38,7 @@ $sheets = array( 'tokens' => $generator->buildTokenSheet(), 'docs' => $generator->buildDocsSheet(), 'gradient' => $generator->buildGradientSheet(), + 'login' => $generator->buildLoginSheet(), ); list($err) = exec_manual('optipng'); diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 7613122d95..2f7bf0a307 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -623,6 +623,20 @@ celerity_register_resource_map(array( 'disk' => '/rsrc/image/sprite-icons.png', 'type' => 'png', ), + '/rsrc/image/sprite-login-X2.png' => + array( + 'hash' => '0836f6f5ae0f181d32814811998c84ce', + 'uri' => '/res/0836f6f5/rsrc/image/sprite-login-X2.png', + 'disk' => '/rsrc/image/sprite-login-X2.png', + 'type' => 'png', + ), + '/rsrc/image/sprite-login.png' => + array( + 'hash' => 'e11c22448d143e85e6be034894e138c5', + 'uri' => '/res/e11c2244/rsrc/image/sprite-login.png', + 'disk' => '/rsrc/image/sprite-login.png', + 'type' => 'png', + ), '/rsrc/image/sprite-menu-X2.png' => array( 'hash' => '867092041ce0a62b7e50136213ca7be1', @@ -3968,6 +3982,15 @@ celerity_register_resource_map(array( ), 'disk' => '/rsrc/css/sprite-icons.css', ), + 'sprite-login-css' => + array( + 'uri' => '/res/7294661a/rsrc/css/sprite-login.css', + 'type' => 'css', + 'requires' => + array( + ), + 'disk' => '/rsrc/css/sprite-login.css', + ), 'sprite-menu-css' => array( 'uri' => '/res/e4e428f9/rsrc/css/sprite-menu.css', diff --git a/src/infrastructure/celerity/CeleritySpriteGenerator.php b/src/infrastructure/celerity/CeleritySpriteGenerator.php index 0d98aede4a..ee088e5990 100644 --- a/src/infrastructure/celerity/CeleritySpriteGenerator.php +++ b/src/infrastructure/celerity/CeleritySpriteGenerator.php @@ -442,6 +442,38 @@ final class CeleritySpriteGenerator { return $sheet; } + public function buildLoginSheet() { + $icons = $this->getDirectoryList('login_1x'); + $scales = array( + '1x' => 1, + '2x' => 2, + ); + $template = id(new PhutilSprite()) + ->setSourceSize(34, 34); + + $sprites = array(); + $prefix = 'login_'; + foreach ($icons as $icon) { + $sprite = id(clone $template) + ->setName($prefix.$icon) + ->setTargetCSS('.'.$prefix.$icon); + + foreach ($scales as $scale_key => $scale) { + $path = $this->getPath($prefix.$scale_key.'/'.$icon.'.png'); + $sprite->setSourceFile($path, $scale); + } + $sprites[] = $sprite; + } + + $sheet = $this->buildSheet('login', true); + $sheet->setScales($scales); + foreach ($sprites as $sprite) { + $sheet->addSprite($sprite); + } + + return $sheet; + } + public function buildGradientSheet() { $gradients = $this->getDirectoryList('gradients'); diff --git a/webroot/rsrc/css/sprite-login.css b/webroot/rsrc/css/sprite-login.css new file mode 100644 index 0000000000..b696a32c35 --- /dev/null +++ b/webroot/rsrc/css/sprite-login.css @@ -0,0 +1,79 @@ +/** + * @provides sprite-login-css + * @generated + */ + +.sprite-login { + background-image: url(/rsrc/image/sprite-login.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) { + .sprite-login { + background-image: url(/rsrc/image/sprite-login-X2.png); + background-size: 140px 140px; + } +} + + +.login_Amazon { + background-position: 0px 0px; +} + +.login_Asana { + background-position: -35px 0px; +} + +.login_Disqus { + background-position: -70px 0px; +} + +.login_Dropbox { + background-position: -105px 0px; +} + +.login_Facebook { + background-position: 0px -35px; +} + +.login_Generic { + background-position: -35px -35px; +} + +.login_Github { + background-position: -70px -35px; +} + +.login_Google { + background-position: -105px -35px; +} + +.login_HTTP { + background-position: 0px -70px; +} + +.login_LDAP { + background-position: -35px -70px; +} + +.login_Linkedin { + background-position: -70px -70px; +} + +.login_Openid { + background-position: -105px -70px; +} + +.login_Phabricator { + background-position: 0px -105px; +} + +.login_Twitter { + background-position: -35px -105px; +} + +.login_Yahoo { + background-position: -70px -105px; +} diff --git a/webroot/rsrc/image/sprite-login-X2.png b/webroot/rsrc/image/sprite-login-X2.png new file mode 100644 index 0000000000..98a736f8d5 Binary files /dev/null and b/webroot/rsrc/image/sprite-login-X2.png differ diff --git a/webroot/rsrc/image/sprite-login.png b/webroot/rsrc/image/sprite-login.png new file mode 100644 index 0000000000..9fd79d62bb Binary files /dev/null and b/webroot/rsrc/image/sprite-login.png differ