diff --git a/resources/sprite/conpher_1x/calendar_off.png b/resources/sprite/conpher_1x/calendar_off.png new file mode 100644 index 0000000000..d4bbae5dfe Binary files /dev/null and b/resources/sprite/conpher_1x/calendar_off.png differ diff --git a/resources/sprite/conpher_1x/calendar_on.png b/resources/sprite/conpher_1x/calendar_on.png new file mode 100644 index 0000000000..9759fc0546 Binary files /dev/null and b/resources/sprite/conpher_1x/calendar_on.png differ diff --git a/resources/sprite/conpher_1x/files_off.png b/resources/sprite/conpher_1x/files_off.png new file mode 100644 index 0000000000..0eb7e3996d Binary files /dev/null and b/resources/sprite/conpher_1x/files_off.png differ diff --git a/resources/sprite/conpher_1x/files_on.png b/resources/sprite/conpher_1x/files_on.png new file mode 100644 index 0000000000..5699ec5f00 Binary files /dev/null and b/resources/sprite/conpher_1x/files_on.png differ diff --git a/resources/sprite/conpher_1x/list_off.png b/resources/sprite/conpher_1x/list_off.png new file mode 100644 index 0000000000..5f64e19b74 Binary files /dev/null and b/resources/sprite/conpher_1x/list_off.png differ diff --git a/resources/sprite/conpher_1x/list_on.png b/resources/sprite/conpher_1x/list_on.png new file mode 100644 index 0000000000..5f104f217d Binary files /dev/null and b/resources/sprite/conpher_1x/list_on.png differ diff --git a/resources/sprite/conpher_1x/more_off.png b/resources/sprite/conpher_1x/more_off.png new file mode 100644 index 0000000000..bd65726e00 Binary files /dev/null and b/resources/sprite/conpher_1x/more_off.png differ diff --git a/resources/sprite/conpher_1x/more_on.png b/resources/sprite/conpher_1x/more_on.png new file mode 100644 index 0000000000..d6c1c6b12a Binary files /dev/null and b/resources/sprite/conpher_1x/more_on.png differ diff --git a/resources/sprite/conpher_1x/people_off.png b/resources/sprite/conpher_1x/people_off.png new file mode 100644 index 0000000000..372f5ecd05 Binary files /dev/null and b/resources/sprite/conpher_1x/people_off.png differ diff --git a/resources/sprite/conpher_1x/people_on.png b/resources/sprite/conpher_1x/people_on.png new file mode 100644 index 0000000000..87fd885951 Binary files /dev/null and b/resources/sprite/conpher_1x/people_on.png differ diff --git a/resources/sprite/conpher_1x/settings_off.png b/resources/sprite/conpher_1x/settings_off.png new file mode 100644 index 0000000000..d75b0f1fb7 Binary files /dev/null and b/resources/sprite/conpher_1x/settings_off.png differ diff --git a/resources/sprite/conpher_1x/settings_on.png b/resources/sprite/conpher_1x/settings_on.png new file mode 100644 index 0000000000..f90ca7820d Binary files /dev/null and b/resources/sprite/conpher_1x/settings_on.png differ diff --git a/resources/sprite/conpher_2x/calendar_off.png b/resources/sprite/conpher_2x/calendar_off.png new file mode 100644 index 0000000000..b807c6457e Binary files /dev/null and b/resources/sprite/conpher_2x/calendar_off.png differ diff --git a/resources/sprite/conpher_2x/calendar_on.png b/resources/sprite/conpher_2x/calendar_on.png new file mode 100644 index 0000000000..b60e94dc02 Binary files /dev/null and b/resources/sprite/conpher_2x/calendar_on.png differ diff --git a/resources/sprite/conpher_2x/conversation_off.png b/resources/sprite/conpher_2x/conversation_off.png new file mode 100644 index 0000000000..5c50e5ccfd Binary files /dev/null and b/resources/sprite/conpher_2x/conversation_off.png differ diff --git a/resources/sprite/conpher_2x/conversation_on.png b/resources/sprite/conpher_2x/conversation_on.png new file mode 100644 index 0000000000..8d1bf1435d Binary files /dev/null and b/resources/sprite/conpher_2x/conversation_on.png differ diff --git a/resources/sprite/conpher_2x/files_off.png b/resources/sprite/conpher_2x/files_off.png new file mode 100644 index 0000000000..b593b1437f Binary files /dev/null and b/resources/sprite/conpher_2x/files_off.png differ diff --git a/resources/sprite/conpher_2x/files_on.png b/resources/sprite/conpher_2x/files_on.png new file mode 100644 index 0000000000..a31547d8d9 Binary files /dev/null and b/resources/sprite/conpher_2x/files_on.png differ diff --git a/resources/sprite/conpher_2x/list_off.png b/resources/sprite/conpher_2x/list_off.png new file mode 100644 index 0000000000..a9add168df Binary files /dev/null and b/resources/sprite/conpher_2x/list_off.png differ diff --git a/resources/sprite/conpher_2x/list_on.png b/resources/sprite/conpher_2x/list_on.png new file mode 100644 index 0000000000..0214b6b0ca Binary files /dev/null and b/resources/sprite/conpher_2x/list_on.png differ diff --git a/resources/sprite/conpher_2x/more_off.png b/resources/sprite/conpher_2x/more_off.png new file mode 100644 index 0000000000..ce90ebc722 Binary files /dev/null and b/resources/sprite/conpher_2x/more_off.png differ diff --git a/resources/sprite/conpher_2x/more_on.png b/resources/sprite/conpher_2x/more_on.png new file mode 100644 index 0000000000..9b2b0f4321 Binary files /dev/null and b/resources/sprite/conpher_2x/more_on.png differ diff --git a/resources/sprite/conpher_2x/people_off.png b/resources/sprite/conpher_2x/people_off.png new file mode 100644 index 0000000000..ad51a2427d Binary files /dev/null and b/resources/sprite/conpher_2x/people_off.png differ diff --git a/resources/sprite/conpher_2x/people_on.png b/resources/sprite/conpher_2x/people_on.png new file mode 100644 index 0000000000..ff42ad8f95 Binary files /dev/null and b/resources/sprite/conpher_2x/people_on.png differ diff --git a/resources/sprite/conpher_2x/settings_off.png b/resources/sprite/conpher_2x/settings_off.png new file mode 100644 index 0000000000..c25d7905ac Binary files /dev/null and b/resources/sprite/conpher_2x/settings_off.png differ diff --git a/resources/sprite/conpher_2x/settings_on.png b/resources/sprite/conpher_2x/settings_on.png new file mode 100644 index 0000000000..2aa6501876 Binary files /dev/null and b/resources/sprite/conpher_2x/settings_on.png differ diff --git a/resources/sprite/manifest/conph.json b/resources/sprite/manifest/conph.json new file mode 100644 index 0000000000..f6cdb6dbb8 --- /dev/null +++ b/resources/sprite/manifest/conph.json @@ -0,0 +1,71 @@ +{ + "version" : 1, + "sprites" : { + "conpher_calendar_off" : { + "name" : "conpher_calendar_off", + "rule" : "conpher_calendar_off", + "hash" : "a8228ab90fd90f4c2500d9285179bf26" + }, + "conpher_calendar_on" : { + "name" : "conpher_calendar_on", + "rule" : "conpher_calendar_on", + "hash" : "931243bc3c414782ddb2d1d9607908ba" + }, + "conpher_files_off" : { + "name" : "conpher_files_off", + "rule" : "conpher_files_off", + "hash" : "de1aee01b9b47b354e6ac280ae68bae1" + }, + "conpher_files_on" : { + "name" : "conpher_files_on", + "rule" : "conpher_files_on", + "hash" : "9ccbbd5e86fd4ec87a11aee0c9ec8c60" + }, + "conpher_list_off" : { + "name" : "conpher_list_off", + "rule" : "conpher_list_off", + "hash" : "2611311d0c2aec04416433be74d3a30e" + }, + "conpher_list_on" : { + "name" : "conpher_list_on", + "rule" : "conpher_list_on", + "hash" : "cee6de0301c84b0d195282642642afa0" + }, + "conpher_more_off" : { + "name" : "conpher_more_off", + "rule" : "conpher_more_off", + "hash" : "3b7099bdde20a13864b48552b11e92c3" + }, + "conpher_more_on" : { + "name" : "conpher_more_on", + "rule" : "conpher_more_on", + "hash" : "b146f0cff9c2e5f0b57f7ebcfe0704d3" + }, + "conpher_people_off" : { + "name" : "conpher_people_off", + "rule" : "conpher_people_off", + "hash" : "641a6a21aa32a12416e85caf8a22e340" + }, + "conpher_people_on" : { + "name" : "conpher_people_on", + "rule" : "conpher_people_on", + "hash" : "f13745fd7036564eefb1c0ebc3502a92" + }, + "conpher_settings_off" : { + "name" : "conpher_settings_off", + "rule" : "conpher_settings_off", + "hash" : "aa9ab000d9e33e3c50c2fe70367f30b4" + }, + "conpher_settings_on" : { + "name" : "conpher_settings_on", + "rule" : "conpher_settings_on", + "hash" : "a5fe22965997f9559800ca7db5ea32c8" + } + }, + "scales" : [ + 1, + 2 + ], + "header" : "\/**\n * @provides sprite-conpher-css\n * @generated\n *\/\n\n.sprite-conpher {\n background-image: url(\/rsrc\/image\/sprite-conpher.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-conpher {\n background-image: url(\/rsrc\/image\/sprite-conpher-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 1a337e2c63..1ac4d0fc2c 100755 --- a/scripts/celerity/generate_sprites.php +++ b/scripts/celerity/generate_sprites.php @@ -30,6 +30,7 @@ $sheets = array( 'icon' => $generator->buildIconSheet(), 'menu' => $generator->buildMenuSheet(), 'apps' => $generator->buildAppsSheet(), + 'conph' => $generator->buildConpherenceSheet(), 'apps-large' => $generator->buildAppsLargeSheet(), // TODO: @chad: should we actually remove this? // 'apps-xlarge' => $generator->buildAppsXLargeSheet(), diff --git a/src/infrastructure/celerity/CeleritySpriteGenerator.php b/src/infrastructure/celerity/CeleritySpriteGenerator.php index c6b2ac23d0..bc25743b83 100644 --- a/src/infrastructure/celerity/CeleritySpriteGenerator.php +++ b/src/infrastructure/celerity/CeleritySpriteGenerator.php @@ -176,6 +176,42 @@ final class CeleritySpriteGenerator { return $sheet; } + public function buildConpherenceSheet() { + $icons = $this->getDirectoryList('conpher_1x'); + $scales = array( + '1x' => 1, + '2x' => 2, + ); + $template = id(new PhutilSprite()) + ->setSourceSize(32, 32); + + $sprites = array(); + foreach ($icons as $icon) { + $color = preg_match('/_on/', $icon) ? 'on' : 'off'; + + $prefix = 'conpher_'; + + $sprite = id(clone $template) + ->setName($prefix.$icon); + + $sprite->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('conpher', 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-conph.css b/webroot/rsrc/css/sprite-conph.css new file mode 100644 index 0000000000..6b02619ebf --- /dev/null +++ b/webroot/rsrc/css/sprite-conph.css @@ -0,0 +1,67 @@ +/** + * @provides sprite-conpher-css + * @generated + */ + +.sprite-conpher { + background-image: url(/rsrc/image/sprite-conpher.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-conpher { + background-image: url(/rsrc/image/sprite-conpher-X2.png); + background-size: 99px 132px; + } +} + + +conpher_calendar_off { + background-position: 0px 0px; +} + +conpher_calendar_on { + background-position: -33px 0px; +} + +conpher_files_off { + background-position: -66px 0px; +} + +conpher_files_on { + background-position: 0px -33px; +} + +conpher_list_off { + background-position: -33px -33px; +} + +conpher_list_on { + background-position: -66px -33px; +} + +conpher_more_off { + background-position: 0px -66px; +} + +conpher_more_on { + background-position: -33px -66px; +} + +conpher_people_off { + background-position: -66px -66px; +} + +conpher_people_on { + background-position: 0px -99px; +} + +conpher_settings_off { + background-position: -33px -99px; +} + +conpher_settings_on { + background-position: -66px -99px; +} diff --git a/webroot/rsrc/image/sprite-conph-X2.png b/webroot/rsrc/image/sprite-conph-X2.png new file mode 100644 index 0000000000..df789c68ef Binary files /dev/null and b/webroot/rsrc/image/sprite-conph-X2.png differ diff --git a/webroot/rsrc/image/sprite-conph.png b/webroot/rsrc/image/sprite-conph.png new file mode 100644 index 0000000000..41d186ef5a Binary files /dev/null and b/webroot/rsrc/image/sprite-conph.png differ