Document icons sprite sheet.
Summary: Adds 32 and 64 px images to represent basic documents. Test Plan: Differential Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5317
BIN
resources/sprite/docs_1x/audio.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/docs_1x/doc.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/docs_1x/file.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/sprite/docs_1x/image.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/sprite/docs_1x/movie.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/docs_1x/pdf.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/docs_1x/place.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/sprite/docs_1x/zip.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
resources/sprite/docs_2x/audio.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
resources/sprite/docs_2x/doc.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
resources/sprite/docs_2x/file.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
resources/sprite/docs_2x/image.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
resources/sprite/docs_2x/movie.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/sprite/docs_2x/pdf.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/sprite/docs_2x/place.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
resources/sprite/docs_2x/zip.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
51
resources/sprite/manifest/docs.json
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"version" : 1,
|
||||||
|
"sprites" : {
|
||||||
|
"docs_audio" : {
|
||||||
|
"name" : "docs_audio",
|
||||||
|
"rule" : ".docs_audio",
|
||||||
|
"hash" : "d3fccd15fc53b04b6caf22a3bb5f4634"
|
||||||
|
},
|
||||||
|
"docs_doc" : {
|
||||||
|
"name" : "docs_doc",
|
||||||
|
"rule" : ".docs_doc",
|
||||||
|
"hash" : "31496e2953350c276a6b8619b071f299"
|
||||||
|
},
|
||||||
|
"docs_file" : {
|
||||||
|
"name" : "docs_file",
|
||||||
|
"rule" : ".docs_file",
|
||||||
|
"hash" : "3d88ce46362e723cf76bf552550c82a6"
|
||||||
|
},
|
||||||
|
"docs_image" : {
|
||||||
|
"name" : "docs_image",
|
||||||
|
"rule" : ".docs_image",
|
||||||
|
"hash" : "8eaa89c50f3be46c87706d649bd304af"
|
||||||
|
},
|
||||||
|
"docs_movie" : {
|
||||||
|
"name" : "docs_movie",
|
||||||
|
"rule" : ".docs_movie",
|
||||||
|
"hash" : "859f7df4027e145290607d78d9500b45"
|
||||||
|
},
|
||||||
|
"docs_pdf" : {
|
||||||
|
"name" : "docs_pdf",
|
||||||
|
"rule" : ".docs_pdf",
|
||||||
|
"hash" : "c423839d6b35baf59e79c0cd8d3e580f"
|
||||||
|
},
|
||||||
|
"docs_place" : {
|
||||||
|
"name" : "docs_place",
|
||||||
|
"rule" : ".docs_place",
|
||||||
|
"hash" : "8ee9e4dad7df830c487227083e0091f5"
|
||||||
|
},
|
||||||
|
"docs_zip" : {
|
||||||
|
"name" : "docs_zip",
|
||||||
|
"rule" : ".docs_zip",
|
||||||
|
"hash" : "91d6be2027be6a7791477ac12cd94b6d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scales" : [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"header" : "\/**\n * @provides sprite-docs-css\n * @generated\n *\/\n\n.sprite-docs {\n background-image: url(\/rsrc\/image\/sprite-docs.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-docs {\n background-image: url(\/rsrc\/image\/sprite-docs-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n",
|
||||||
|
"type" : "standard"
|
||||||
|
}
|
|
@ -33,8 +33,7 @@ $sheets = array(
|
||||||
'conpher' => $generator->buildConpherenceSheet(),
|
'conpher' => $generator->buildConpherenceSheet(),
|
||||||
'apps-large' => $generator->buildAppsLargeSheet(),
|
'apps-large' => $generator->buildAppsLargeSheet(),
|
||||||
'tokens' => $generator->buildTokenSheet(),
|
'tokens' => $generator->buildTokenSheet(),
|
||||||
// TODO: @chad: should we actually remove this?
|
'docs' => $generator->buildDocsSheet(),
|
||||||
// 'apps-xlarge' => $generator->buildAppsXLargeSheet(),
|
|
||||||
'gradient' => $generator->buildGradientSheet(),
|
'gradient' => $generator->buildGradientSheet(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -497,6 +497,20 @@ celerity_register_resource_map(array(
|
||||||
'disk' => '/rsrc/image/sprite-conpher.png',
|
'disk' => '/rsrc/image/sprite-conpher.png',
|
||||||
'type' => 'png',
|
'type' => 'png',
|
||||||
),
|
),
|
||||||
|
'/rsrc/image/sprite-docs-X2.png' =>
|
||||||
|
array(
|
||||||
|
'hash' => '57d3286ce88133f3ec9240e35f6bb897',
|
||||||
|
'uri' => '/res/57d3286c/rsrc/image/sprite-docs-X2.png',
|
||||||
|
'disk' => '/rsrc/image/sprite-docs-X2.png',
|
||||||
|
'type' => 'png',
|
||||||
|
),
|
||||||
|
'/rsrc/image/sprite-docs.png' =>
|
||||||
|
array(
|
||||||
|
'hash' => 'b2b089072d6eddd831402a77c02b5736',
|
||||||
|
'uri' => '/res/b2b08907/rsrc/image/sprite-docs.png',
|
||||||
|
'disk' => '/rsrc/image/sprite-docs.png',
|
||||||
|
'type' => 'png',
|
||||||
|
),
|
||||||
'/rsrc/image/sprite-gradient.png' =>
|
'/rsrc/image/sprite-gradient.png' =>
|
||||||
array(
|
array(
|
||||||
'hash' => '92aebaab67dcc6baf2ea99294368d895',
|
'hash' => '92aebaab67dcc6baf2ea99294368d895',
|
||||||
|
@ -3455,6 +3469,15 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'disk' => '/rsrc/css/sprite-conpher.css',
|
'disk' => '/rsrc/css/sprite-conpher.css',
|
||||||
),
|
),
|
||||||
|
'sprite-docs-css' =>
|
||||||
|
array(
|
||||||
|
'uri' => '/res/b32f93bc/rsrc/css/sprite-docs.css',
|
||||||
|
'type' => 'css',
|
||||||
|
'requires' =>
|
||||||
|
array(
|
||||||
|
),
|
||||||
|
'disk' => '/rsrc/css/sprite-docs.css',
|
||||||
|
),
|
||||||
'sprite-gradient-css' =>
|
'sprite-gradient-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/e62e7a0f/rsrc/css/sprite-gradient.css',
|
'uri' => '/res/e62e7a0f/rsrc/css/sprite-gradient.css',
|
||||||
|
|
|
@ -256,6 +256,38 @@ final class CeleritySpriteGenerator {
|
||||||
return $sheet;
|
return $sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function buildDocsSheet() {
|
||||||
|
$icons = $this->getDirectoryList('docs_1x');
|
||||||
|
$scales = array(
|
||||||
|
'1x' => 1,
|
||||||
|
'2x' => 2,
|
||||||
|
);
|
||||||
|
$template = id(new PhutilSprite())
|
||||||
|
->setSourceSize(32, 32);
|
||||||
|
|
||||||
|
$sprites = array();
|
||||||
|
$prefix = 'docs_';
|
||||||
|
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('docs', true);
|
||||||
|
$sheet->setScales($scales);
|
||||||
|
foreach ($sprites as $sprite) {
|
||||||
|
$sheet->addSprite($sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sheet;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildGradientSheet() {
|
public function buildGradientSheet() {
|
||||||
$gradients = $this->getDirectoryList('gradients');
|
$gradients = $this->getDirectoryList('gradients');
|
||||||
|
|
||||||
|
|
51
webroot/rsrc/css/sprite-docs.css
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/**
|
||||||
|
* @provides sprite-docs-css
|
||||||
|
* @generated
|
||||||
|
*/
|
||||||
|
|
||||||
|
.sprite-docs {
|
||||||
|
background-image: url(/rsrc/image/sprite-docs.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-docs {
|
||||||
|
background-image: url(/rsrc/image/sprite-docs-X2.png);
|
||||||
|
background-size: 99px 99px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.docs_audio {
|
||||||
|
background-position: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_doc {
|
||||||
|
background-position: -33px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_file {
|
||||||
|
background-position: -66px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_image {
|
||||||
|
background-position: 0px -33px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_movie {
|
||||||
|
background-position: -33px -33px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_pdf {
|
||||||
|
background-position: -66px -33px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_place {
|
||||||
|
background-position: 0px -66px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs_zip {
|
||||||
|
background-position: -33px -66px;
|
||||||
|
}
|
BIN
webroot/rsrc/image/sprite-docs-X2.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
webroot/rsrc/image/sprite-docs.png
Normal file
After Width: | Height: | Size: 3 KiB |